Skip to content

Commit

Permalink
Update BaseFootRaceManager.cpp (#1657)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmosewaMC authored Nov 27, 2024
1 parent c37a0c8 commit 218a3f2
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 218a3f2

Please sign in to comment.