MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / ClearSignalThread

Method ClearSignalThread

neo/game/Entity.cpp:3238–3262  ·  view source on GitHub ↗

================ idEntity::ClearSignalThread ================ */

Source from the content-addressed store, hash-verified

3236================
3237*/
3238void idEntity::ClearSignalThread( signalNum_t signalnum, idThread *thread ) {
3239 int i;
3240 int num;
3241 int threadnum;
3242
3243 assert( thread );
3244
3245 if ( ( signalnum < 0 ) || ( signalnum >= NUM_SIGNALS ) ) {
3246 gameLocal.Error( "Signal out of range" );
3247 }
3248
3249 if ( !signals ) {
3250 return;
3251 }
3252
3253 threadnum = thread->GetThreadNum();
3254
3255 num = signals->signal[ signalnum ].Num();
3256 for( i = 0; i < num; i++ ) {
3257 if ( signals->signal[ signalnum ][ i ].threadnum == threadnum ) {
3258 signals->signal[ signalnum ].RemoveIndex( i );
3259 return;
3260 }
3261 }
3262}
3263
3264/*
3265================

Callers 1

Calls 4

ErrorMethod · 0.45
GetThreadNumMethod · 0.45
NumMethod · 0.45
RemoveIndexMethod · 0.45

Tested by

no test coverage detected