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

Method Event_OnSignal

neo/d3xp/script/Script_Thread.cpp:1432–1451  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1430================
1431*/
1432void 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================

Callers

nothing calls this directly

Calls 3

ErrorFunction · 0.50
FindFunctionMethod · 0.45
SetSignalMethod · 0.45

Tested by

no test coverage detected