/* ================ idThread::Event_GetTraceFraction ================ */ void idThread::Event_GetTraceFraction( void ) { ReturnFloat( trace.fraction ); }
/* ================ idThread::Event_VecDotProduct ================ */ void idThread::Event_VecDotProduct( idVec3 &vec1, idVec3 &vec2 ) { ReturnFloat( vec1 * vec2 ); }
/* ================ 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 ); }
/* ================ idThread::Event_GetSquareRoot ================ */ void idThread::Event_GetSquareRoot( float theSquare ) { ReturnFloat( idMath::Sqrt( theSquare ) ); }
/* ================ idThread::Event_VecLength ================ */ void idThread::Event_VecLength( idVec3 &vec ) { ReturnFloat( vec.Length() ); }
/* ================ idThread::Event_GetPersistantFloat ================ */ void idThread::Event_GetPersistantFloat( const char *key ) { float result; gameLocal.persistentLevelInfo.GetFloat( key, "0", result ); ReturnFloat( result ); }
/* ================ idThread::Event_GetCosine ================ */ void idThread::Event_GetCosine( float angle ) { ReturnFloat( idMath::Cos( DEG2RAD( angle ) ) ); }
/* ================ idThread::Event_SpawnFloat ================ */ void idThread::Event_SpawnFloat( const char *key, float defaultvalue ) { float result; spawnArgs.GetFloat( key, va( "%f", defaultvalue ), result ); ReturnFloat( result ); }
/* ================ idThread::Event_GetTime ================ */ void idThread::Event_GetTime( void ) { ReturnFloat( MS2SEC( gameLocal.realClientTime ) ); }
/* ================ idThread::Event_Random ================ */ void idThread::Event_Random( float range ) const { float result; result = gameLocal.random.RandomFloat(); ReturnFloat( range * result ); }
/* ================ idThread::Event_GetArcCosine ================ */ void idThread::Event_GetArcCosine( float a ) { ReturnFloat(RAD2DEG(idMath::ACos(a))); }
void idThread::Event_RandomInt( int range ) const { int result; result = gameLocal.random.RandomInt(range); ReturnFloat(result); }