From 032c7303628d0f58deeda9a2a9aa1be72dfdee53 Mon Sep 17 00:00:00 2001 From: David Markowitz Date: Wed, 27 Nov 2024 14:16:18 -0800 Subject: [PATCH] Update BaseFootRaceManager.cpp --- dScripts/ai/ACT/FootRace/BaseFootRaceManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dScripts/ai/ACT/FootRace/BaseFootRaceManager.cpp b/dScripts/ai/ACT/FootRace/BaseFootRaceManager.cpp index c02bf565c..c5954c4c4 100644 --- a/dScripts/ai/ACT/FootRace/BaseFootRaceManager.cpp +++ b/dScripts/ai/ACT/FootRace/BaseFootRaceManager.cpp @@ -12,7 +12,10 @@ void BaseFootRaceManager::OnFireEventServerSide(Entity* self, Entity* sender, st if (splitArguments.size() > 1) { const auto eventName = splitArguments[0]; - const auto player = Game::entityManager->GetEntity(std::stoull(splitArguments[1])); + auto playerId = GeneralUtils::TryParse(splitArguments[1]); + if (!playerId) return; + + const auto player = Game::entityManager->GetEntity(playerId.value()); if (player != nullptr) { if (eventName == "updatePlayer") {