Simplify fix for event argument bug

This commit is contained in:
Lion Kortlepel 2021-12-13 13:48:18 +01:00
parent 71efe30345
commit 3555cec5fe
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B

View File

@ -138,8 +138,7 @@ public:
for (const auto& Event : mLuaEvents.at(EventName)) { for (const auto& Event : mLuaEvents.at(EventName)) {
for (const auto& Function : Event.second) { for (const auto& Function : Event.second) {
if (Event.first != IgnoreId) { if (Event.first != IgnoreId) {
std::vector<TLuaArgTypes> ArgumentsCopy = Arguments; Results.push_back(EnqueueFunctionCall(Event.first, Function, Arguments));
Results.push_back(EnqueueFunctionCall(Event.first, Function, ArgumentsCopy));
} }
} }
} }