Update BaseFootRaceManager.cpp (#1657)

This commit is contained in:
David Markowitz 2024-11-27 14:26:10 -08:00 committed by GitHub
parent c37a0c86c1
commit 218a3f2d0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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") {