예제 #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);
}