mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
Merge branch 'main' into pr/1107
This commit is contained in:
@@ -214,7 +214,7 @@ void BaseSurvivalServer::OnActivityTimerDone(Entity* self, const std::string& na
|
||||
ActivityTimerStart(self, PlaySpawnSoundTimer, 3, 3);
|
||||
} else if (name == PlaySpawnSoundTimer) {
|
||||
for (const auto& playerID : state.players) {
|
||||
auto* player = EntityManager::Instance()->GetEntity(playerID);
|
||||
auto* player = Game::entityManager->GetEntity(playerID);
|
||||
if (player != nullptr) {
|
||||
GameMessages::SendPlayNDAudioEmitter(player, player->GetSystemAddress(), spawnSoundGUID);
|
||||
}
|
||||
@@ -223,7 +223,7 @@ void BaseSurvivalServer::OnActivityTimerDone(Entity* self, const std::string& na
|
||||
}
|
||||
|
||||
void BaseSurvivalServer::ResetStats(LWOOBJID playerID) {
|
||||
auto* player = EntityManager::Instance()->GetEntity(playerID);
|
||||
auto* player = Game::entityManager->GetEntity(playerID);
|
||||
if (player != nullptr) {
|
||||
|
||||
// Boost all the player stats when loading in
|
||||
@@ -286,7 +286,7 @@ void BaseSurvivalServer::StartWaves(Entity* self) {
|
||||
state.waitingPlayers.clear();
|
||||
|
||||
for (const auto& playerID : state.players) {
|
||||
const auto player = EntityManager::Instance()->GetEntity(playerID);
|
||||
const auto player = Game::entityManager->GetEntity(playerID);
|
||||
if (player != nullptr) {
|
||||
state.waitingPlayers.push_back(playerID);
|
||||
UpdatePlayer(self, playerID);
|
||||
@@ -313,7 +313,7 @@ bool BaseSurvivalServer::CheckAllPlayersDead() {
|
||||
auto deadPlayers = 0;
|
||||
|
||||
for (const auto& playerID : state.players) {
|
||||
auto* player = EntityManager::Instance()->GetEntity(playerID);
|
||||
auto* player = Game::entityManager->GetEntity(playerID);
|
||||
if (player == nullptr || player->GetIsDead()) {
|
||||
deadPlayers++;
|
||||
}
|
||||
@@ -325,9 +325,9 @@ bool BaseSurvivalServer::CheckAllPlayersDead() {
|
||||
void BaseSurvivalServer::SetPlayerSpawnPoints() {
|
||||
auto spawnerIndex = 1;
|
||||
for (const auto& playerID : state.players) {
|
||||
auto* player = EntityManager::Instance()->GetEntity(playerID);
|
||||
auto* player = Game::entityManager->GetEntity(playerID);
|
||||
if (player != nullptr) {
|
||||
auto possibleSpawners = EntityManager::Instance()->GetEntitiesInGroup("P" + std::to_string(spawnerIndex) + "_Spawn");
|
||||
auto possibleSpawners = Game::entityManager->GetEntitiesInGroup("P" + std::to_string(spawnerIndex) + "_Spawn");
|
||||
if (!possibleSpawners.empty()) {
|
||||
auto* spawner = possibleSpawners.at(0);
|
||||
GameMessages::SendTeleport(playerID, spawner->GetPosition(), spawner->GetRotation(), player->GetSystemAddress(), true);
|
||||
@@ -350,7 +350,7 @@ void BaseSurvivalServer::GameOver(Entity* self) {
|
||||
SpawnerReset(spawnerNetworks.rewardNetworks);
|
||||
|
||||
for (const auto& playerID : state.players) {
|
||||
auto* player = EntityManager::Instance()->GetEntity(playerID);
|
||||
auto* player = Game::entityManager->GetEntity(playerID);
|
||||
if (player == nullptr)
|
||||
continue;
|
||||
|
||||
|
Reference in New Issue
Block a user