Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions scripting/eventqueuefix.sp
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,19 @@ public void ServiceEvent(event_t event)
}

bool byTargetname = false;
int attemptCount = 0;

// In the context of the event, the searching entity is also the caller
while ((targetEntity = FindEntityByName(targetEntity, event.target, caller, activator, caller)) != -1)
{
byTargetname = true;

attemptCount++;
if(attemptCount > 40)
{
break;
}

SetVariantString(event.variantValue);
AcceptEntityInput(targetEntity, event.targetInput, activator, caller, event.outputID);

Expand Down