================ idThread::Event_OnSignal ================ */
| 1350 | ================ |
| 1351 | */ |
| 1352 | void idThread::Event_OnSignal( int signal, idEntity *ent, const char *func ) { |
| 1353 | const function_t *function; |
| 1354 | |
| 1355 | assert( func ); |
| 1356 | |
| 1357 | if ( !ent ) { |
| 1358 | Error( "Entity not found" ); |
| 1359 | } |
| 1360 | |
| 1361 | if ( ( signal < 0 ) || ( signal >= NUM_SIGNALS ) ) { |
| 1362 | Error( "Signal out of range" ); |
| 1363 | } |
| 1364 | |
| 1365 | function = gameLocal.program.FindFunction( func ); |
| 1366 | if ( !function ) { |
| 1367 | Error( "Function '%s' not found", func ); |
| 1368 | } |
| 1369 | |
| 1370 | ent->SetSignal( ( signalNum_t )signal, this, function ); |
| 1371 | } |
| 1372 | |
| 1373 | /* |
| 1374 | ================ |
nothing calls this directly
no test coverage detected