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

Method ClearSignalThread

neo/d3xp/Entity.cpp:3334–3358  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

3332================
3333*/
3334void idEntity::ClearSignalThread( signalNum_t signalnum, idThread *thread ) {
3335 int i;
3336 int num;
3337 int threadnum;
3338
3339 assert( thread );
3340
3341 if ( ( signalnum < 0 ) || ( signalnum >= NUM_SIGNALS ) ) {
3342 gameLocal.Error( "Signal out of range" );
3343 }
3344
3345 if ( !signals ) {
3346 return;
3347 }
3348
3349 threadnum = thread->GetThreadNum();
3350
3351 num = signals->signal[ signalnum ].Num();
3352 for( i = 0; i < num; i++ ) {
3353 if ( signals->signal[ signalnum ][ i ].threadnum == threadnum ) {
3354 signals->signal[ signalnum ].RemoveIndex( i );
3355 return;
3356 }
3357 }
3358}
3359
3360/*
3361================

Callers 1

Calls 4

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

Tested by

no test coverage detected