MCPcopy Create free account
hub / github.com/JACoders/OpenJK / G_CheckTasksCompleted

Function G_CheckTasksCompleted

code/game/g_main.cpp:991–1012  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

989*/
990
991static void G_CheckTasksCompleted (gentity_t *ent)
992{
993 if ( Q3_TaskIDPending( ent, TID_CHAN_VOICE ) )
994 {
995 if ( !gi.VoiceVolume[ent->s.number] )
996 {//not playing a voice sound
997 //return task_complete
998 Q3_TaskIDComplete( ent, TID_CHAN_VOICE );
999 }
1000 }
1001
1002 if ( Q3_TaskIDPending( ent, TID_LOCATION ) )
1003 {
1004 char *currentLoc = G_GetLocationForEnt( ent );
1005
1006 if ( currentLoc && currentLoc[0] && Q_stricmp( ent->message, currentLoc ) == 0 )
1007 {//we're in the desired location
1008 Q3_TaskIDComplete( ent, TID_LOCATION );
1009 }
1010 //FIXME: else see if were in other trigger_locations?
1011 }
1012}
1013
1014static void G_CheckSpecialPersistentEvents( gentity_t *ent )
1015{//special-case alerts that would be a pain in the ass to have the ent's think funcs generate

Callers 1

G_RunFrameFunction · 0.70

Calls 4

Q_stricmpFunction · 0.85
Q3_TaskIDPendingFunction · 0.70
Q3_TaskIDCompleteFunction · 0.70
G_GetLocationForEntFunction · 0.70

Tested by

no test coverage detected