================ idThread::Event_OnSignal ================ */
| 1430 | ================ |
| 1431 | */ |
| 1432 | void idThread::Event_OnSignal( int signal, idEntity *ent, const char *func ) { |
| 1433 | const function_t *function; |
| 1434 | |
| 1435 | assert( func ); |
| 1436 | |
| 1437 | if ( !ent ) { |
| 1438 | Error( "Entity not found" ); |
| 1439 | } |
| 1440 | |
| 1441 | if ( ( signal < 0 ) || ( signal >= NUM_SIGNALS ) ) { |
| 1442 | Error( "Signal out of range" ); |
| 1443 | } |
| 1444 | |
| 1445 | function = gameLocal.program.FindFunction( func ); |
| 1446 | if ( !function ) { |
| 1447 | Error( "Function '%s' not found", func ); |
| 1448 | } |
| 1449 | |
| 1450 | ent->SetSignal( ( signalNum_t )signal, this, function ); |
| 1451 | } |
| 1452 | |
| 1453 | /* |
| 1454 | ================ |
nothing calls this directly
no test coverage detected