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

Method Event_OnSignal

neo/game/script/Script_Thread.cpp:1352–1371  ·  view source on GitHub ↗

================ idThread::Event_OnSignal ================ */

Source from the content-addressed store, hash-verified

1350================
1351*/
1352void 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================

Callers

nothing calls this directly

Calls 3

ErrorFunction · 0.50
FindFunctionMethod · 0.45
SetSignalMethod · 0.45

Tested by

no test coverage detected