mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-02-26 20:59:48 +00:00
fix: imaginite on racing minigames and add null checks (#1958)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "Logger.h"
|
||||
#include "Loot.h"
|
||||
#include "ShootingGalleryComponent.h"
|
||||
#include "RacingControlComponent.h"
|
||||
|
||||
bool ActivityManager::IsPlayerInActivity(Entity* self, LWOOBJID playerID) {
|
||||
const auto* sac = self->GetComponent<ScriptedActivityComponent>();
|
||||
@@ -99,6 +100,8 @@ bool ActivityManager::TakeActivityCost(const Entity* self, const LWOOBJID player
|
||||
activityComponent = self->GetComponent<ShootingGalleryComponent>();
|
||||
}
|
||||
|
||||
if (!activityComponent) return false;
|
||||
|
||||
auto* player = Game::entityManager->GetEntity(playerID);
|
||||
if (player == nullptr)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user