You've already forked OpenRCT2-Unity
mirror of
https://github.com/izzy2lost/OpenRCT2-Unity.git
synced 2026-03-10 12:38:22 -07:00
Revert change to RemoveCustomGameActions
This commit is contained in:
@@ -821,8 +821,17 @@ bool ScriptEngine::RegisterCustomAction(
|
||||
|
||||
void ScriptEngine::RemoveCustomGameActions(const std::shared_ptr<Plugin>& plugin)
|
||||
{
|
||||
auto isOwner = [&] (auto& obj) { return obj.second.Owner == plugin; }
|
||||
std::erase(std::remove_if(_customActions.begin(), _customActions.end(), isOwner), _customActions.end());
|
||||
for (auto it = _customActions.begin(); it != _customActions.end();)
|
||||
{
|
||||
if (it->second.Owner == plugin)
|
||||
{
|
||||
it = _customActions.erase(it);
|
||||
}
|
||||
else
|
||||
{
|
||||
it++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptEngine::RunGameActionHooks(const GameAction& action, std::unique_ptr<GameActionResult>& result, bool isExecute)
|
||||
|
||||
Reference in New Issue
Block a user