mirror of
https://github.com/hermansimensen/eventqueue-fix.git
synced 2025-12-06 18:08:27 +00:00
speculative bug fix. please don't break
This commit is contained in:
parent
c6af8a5f16
commit
0f286a13ef
@ -280,9 +280,6 @@ public Action OnTrigger(const char[] output, int caller, int activator, float de
|
||||
|
||||
int FindEntityByName(int startEntity, char[] targetname, int searchingEnt, int activator, int caller)
|
||||
{
|
||||
if(!IsValidEntity(activator) || !IsValidEntity(caller) || !IsValidEntity(searchingEnt))
|
||||
return -1;
|
||||
|
||||
Address targetEntityAddr = SDKCall(g_hFindEntityByName, startEntity, targetname, searchingEnt, activator, caller, 0);
|
||||
|
||||
if(targetEntityAddr == Address_Null)
|
||||
@ -295,6 +292,9 @@ public void ServiceEvent(event_t event)
|
||||
{
|
||||
int targetEntity = -1;
|
||||
|
||||
if(!IsValidEntity(event.caller))
|
||||
event.caller = 0;
|
||||
|
||||
// In the context of the event, the searching entity is also the caller
|
||||
while ((targetEntity = FindEntityByName(targetEntity, event.target, event.caller, event.activator, event.caller)) != -1)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user