Skip to content

Commit

Permalink
Update BaseFootRaceManager.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
EmosewaMC committed Nov 27, 2024
1 parent 9e7ef8c commit 032c730
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dScripts/ai/ACT/FootRace/BaseFootRaceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<LWOOBJID>(splitArguments[1]);
if (!playerId) return;

const auto player = Game::entityManager->GetEntity(playerId.value());

if (player != nullptr) {
if (eventName == "updatePlayer") {
Expand Down

0 comments on commit 032c730

Please sign in to comment.