Пример #1
0
/*
================
idThread::Event_GetTraceFraction
================
*/
void idThread::Event_GetTraceFraction( void ) {
	ReturnFloat( trace.fraction );
}
Пример #2
0
/*
================
idThread::Event_VecDotProduct
================
*/
void idThread::Event_VecDotProduct( idVec3 &vec1, idVec3 &vec2 ) {
	ReturnFloat( vec1 * vec2 );
}
Пример #3
0
/*
================
idThread::Event_TracePoint
================
*/
void idThread::Event_TracePoint( const idVec3 &start, const idVec3 &end, int contents_mask, idEntity *passEntity ) {
	gameLocal.clip.TracePoint( trace, start, end, contents_mask, passEntity );
	ReturnFloat( trace.fraction );
}
Пример #4
0
/*
================
idThread::Event_GetSquareRoot
================
*/
void idThread::Event_GetSquareRoot( float theSquare ) {
	ReturnFloat( idMath::Sqrt( theSquare ) );
}
Пример #5
0
/*
================
idThread::Event_VecLength
================
*/
void idThread::Event_VecLength( idVec3 &vec ) {
	ReturnFloat( vec.Length() );
}
Пример #6
0
/*
================
idThread::Event_GetPersistantFloat
================
*/
void idThread::Event_GetPersistantFloat( const char *key ) {
	float result;
	gameLocal.persistentLevelInfo.GetFloat( key, "0", result );
	ReturnFloat( result );
}
Пример #7
0
/*
================
idThread::Event_GetCosine
================
*/
void idThread::Event_GetCosine( float angle ) {
	ReturnFloat( idMath::Cos( DEG2RAD( angle ) ) );
}
Пример #8
0
/*
================
idThread::Event_SpawnFloat
================
*/
void idThread::Event_SpawnFloat( const char *key, float defaultvalue ) {
	float result;
	spawnArgs.GetFloat( key, va( "%f", defaultvalue ), result );
	ReturnFloat( result );
}
Пример #9
0
/*
================
idThread::Event_GetTime
================
*/
void idThread::Event_GetTime( void ) {
	ReturnFloat( MS2SEC( gameLocal.realClientTime ) );
}
Пример #10
0
/*
================
idThread::Event_Random
================
*/
void idThread::Event_Random( float range ) const {
	float result;
	result = gameLocal.random.RandomFloat();
	ReturnFloat( range * result );
}
Пример #11
0
/*
================
idThread::Event_GetArcCosine
================
*/
void idThread::Event_GetArcCosine( float a ) {
	ReturnFloat(RAD2DEG(idMath::ACos(a)));
}
Пример #12
0
void idThread::Event_RandomInt( int range ) const {
	int result;
	result = gameLocal.random.RandomInt(range);
	ReturnFloat(result);
}