Merge branch 'main' into pr/1107

This commit is contained in:
David Markowitz
2023-07-21 19:38:59 -07:00
205 changed files with 872 additions and 894 deletions

View File

@@ -8,7 +8,7 @@
void AgCagedBricksServer::OnUse(Entity* self, Entity* user) {
//Tell the client to spawn the baby spiderling:
auto spooders = EntityManager::Instance()->GetEntitiesInGroup("cagedSpider");
auto spooders = Game::entityManager->GetEntitiesInGroup("cagedSpider");
for (auto spodder : spooders) {
GameMessages::SendFireEventClientSide(spodder->GetObjectID(), user->GetSystemAddress(), u"toggle", LWOOBJID_EMPTY, 0, 0, user->GetObjectID());
}

View File

@@ -28,7 +28,7 @@ void AgMonumentBirds::OnProximityUpdate(Entity* self, Entity* entering, std::str
void AgMonumentBirds::OnTimerDone(Entity* self, std::string timerName) {
if (timerName != "killBird") return;
auto* player = EntityManager::Instance()->GetEntity(self->GetVar<LWOOBJID>(u"PlayerID"));
auto* player = Game::entityManager->GetEntity(self->GetVar<LWOOBJID>(u"PlayerID"));
if (player == nullptr) return;

View File

@@ -2,14 +2,14 @@
#include "EntityManager.h"
void AgMonumentLaserServer::OnStartup(Entity* self) {
auto lasers = EntityManager::Instance()->GetEntitiesInGroup(self->GetVarAsString(u"volGroup"));
auto lasers = Game::entityManager->GetEntitiesInGroup(self->GetVarAsString(u"volGroup"));
for (auto laser : lasers) {
if (laser) laser->SetBoolean(u"active", true);
}
}
void AgMonumentLaserServer::OnDie(Entity* self, Entity* killer) {
auto lasers = EntityManager::Instance()->GetEntitiesInGroup(self->GetVarAsString(u"volGroup"));
auto lasers = Game::entityManager->GetEntitiesInGroup(self->GetVarAsString(u"volGroup"));
for (auto laser : lasers) {
if (laser) laser->SetBoolean(u"active", false);
}

View File

@@ -2,7 +2,7 @@
#include "EntityManager.h"
void AgMonumentRaceCancel::OnCollisionPhantom(Entity* self, Entity* target) {
auto managers = EntityManager::Instance()->GetEntitiesInGroup("race_manager");
auto managers = Game::entityManager->GetEntitiesInGroup("race_manager");
if (!managers.empty()) {
managers[0]->OnFireEventServerSide(target, "course_cancel");
}

View File

@@ -8,7 +8,7 @@ void AgMonumentRaceGoal::OnStartup(Entity* self) {
void AgMonumentRaceGoal::OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) {
if (name == "RaceGoal" && entering && entering->IsPlayer() && status == "ENTER") {
auto managers = EntityManager::Instance()->GetEntitiesInGroup("race_manager");
auto managers = Game::entityManager->GetEntitiesInGroup("race_manager");
if (managers.empty() || !managers.at(0)) return;
managers.at(0)->OnFireEventServerSide(entering, "course_finish");
}

View File

@@ -40,7 +40,7 @@ void NpcAgCourseStarter::OnMessageBoxResponse(Entity* self, Entity* sender, int3
scriptedActivityComponent->RemoveActivityPlayerData(sender->GetObjectID());
EntityManager::Instance()->SerializeEntity(self);
Game::entityManager->SerializeEntity(self);
} else if (identifier == u"player_dialog_start_course" && button == 1) {
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"start_timer", 0, 0, LWOOBJID_EMPTY, "", sender->GetSystemAddress());
@@ -54,7 +54,7 @@ void NpcAgCourseStarter::OnMessageBoxResponse(Entity* self, Entity* sender, int3
data->values[1] = *(float*)&startTime;
EntityManager::Instance()->SerializeEntity(self);
Game::entityManager->SerializeEntity(self);
} else if (identifier == u"FootRaceCancel") {
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"stop_timer", 0, 0, LWOOBJID_EMPTY, "", sender->GetSystemAddress());
@@ -92,7 +92,7 @@ void NpcAgCourseStarter::OnFireEventServerSide(Entity* self, Entity* sender, std
"performact_time");
}
EntityManager::Instance()->SerializeEntity(self);
Game::entityManager->SerializeEntity(self);
LeaderboardManager::SaveScore(sender->GetObjectID(), scriptedActivityComponent->GetActivityID(), static_cast<float>(finish));
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"ToggleLeaderBoard",

View File

@@ -35,7 +35,7 @@ void NpcWispServer::OnMissionDialogueOK(Entity* self, Entity* target, int missio
: std::vector<std::string>{ "MaelstromSamples", "MaelstromSamples2ndary1", "MaelstromSamples2ndary2" };
for (const auto& group : groups) {
auto samples = EntityManager::Instance()->GetEntitiesInGroup(group);
auto samples = Game::entityManager->GetEntitiesInGroup(group);
for (auto* sample : samples) {
GameMessages::SendNotifyClientObject(sample->GetObjectID(), u"SetVisibility", visible, 0,
target->GetObjectID(), "", target->GetSystemAddress());