Replace all auto with auto*

For components
This commit is contained in:
David Markowitz
2023-06-09 01:27:05 -07:00
parent 62aa863997
commit e2dfa1809d
233 changed files with 753 additions and 753 deletions

View File

@@ -15,7 +15,7 @@ void EnemySpiderSpawner::OnFireEventServerSide(Entity* self, Entity* sender, std
GameMessages::SendPlayFXEffect(self->GetObjectID(), 2856, u"maelstrom", "test", LWOOBJID_EMPTY, 1.0f, 1.0f, true);
// Make indestructible
auto dest = self->GetComponent<DestroyableComponent>();
auto* dest = self->GetComponent<DestroyableComponent>();
if (dest) {
dest->SetFaction(-1);
}
@@ -54,7 +54,7 @@ void EnemySpiderSpawner::OnTimerDone(Entity* self, std::string timerName) {
newEntity->AddToGroups("BabySpider");
/*
auto movementAi = newEntity->GetComponent<MovementAIComponent>();
auto* movementAi = newEntity->GetComponent<MovementAIComponent>();
movementAi->SetDestination(newEntity->GetPosition());
*/

View File

@@ -75,7 +75,7 @@ void ZoneAgProperty::OnPlayerLoaded(Entity* self, Entity* player) {
}
void ZoneAgProperty::PropGuardCheck(Entity* self, Entity* player) {
auto missionComponent = player->GetComponent<MissionComponent>();
auto* missionComponent = player->GetComponent<MissionComponent>();
if (missionComponent == nullptr)
return;
@@ -211,7 +211,7 @@ void ZoneAgProperty::BaseTimerDone(Entity* self, const std::string& timerName) {
KillGuard(self);
} else if (timerName == "tornadoOff") {
for (auto* entity : EntityManager::Instance()->GetEntitiesInGroup(self->GetVar<std::string>(FXManagerGroup))) {
auto renderComponent = entity->GetComponent<RenderComponent>();
auto* renderComponent = entity->GetComponent<RenderComponent>();
if (renderComponent != nullptr) {
renderComponent->StopEffect("TornadoDebris", false);
renderComponent->StopEffect("TornadoVortex", false);
@@ -223,7 +223,7 @@ void ZoneAgProperty::BaseTimerDone(Entity* self, const std::string& timerName) {
self->AddTimer("ShowClearEffects", 2);
} else if (timerName == "ShowClearEffects") {
for (auto* entity : EntityManager::Instance()->GetEntitiesInGroup(self->GetVar<std::string>(FXManagerGroup))) {
auto renderComponent = entity->GetComponent<RenderComponent>();
auto* renderComponent = entity->GetComponent<RenderComponent>();
if (renderComponent != nullptr) {
renderComponent->PlayEffect(-1, u"beamOn", "beam");
}
@@ -275,7 +275,7 @@ void ZoneAgProperty::BaseTimerDone(Entity* self, const std::string& timerName) {
StartTornadoFx(self);
} else if (timerName == "killFXObject") {
for (auto* entity : EntityManager::Instance()->GetEntitiesInGroup(self->GetVar<std::string>(FXManagerGroup))) {
auto renderComponent = entity->GetComponent<RenderComponent>();
auto* renderComponent = entity->GetComponent<RenderComponent>();
if (renderComponent != nullptr) {
renderComponent->StopEffect("beam");
}
@@ -301,7 +301,7 @@ void ZoneAgProperty::OnZonePropertyRented(Entity* self, Entity* player) {
void ZoneAgProperty::OnZonePropertyModelPlaced(Entity* self, Entity* player) {
auto* character = player->GetCharacter();
auto missionComponent = player->GetComponent<MissionComponent>();
auto* missionComponent = player->GetComponent<MissionComponent>();
if (!character->GetPlayerFlag(101)) {
BaseZonePropertyModelPlaced(self, player);
@@ -329,7 +329,7 @@ void ZoneAgProperty::OnZonePropertyModelPlaced(Entity* self, Entity* player) {
void ZoneAgProperty::OnZonePropertyModelPickedUp(Entity* self, Entity* player) {
auto* character = player->GetCharacter();
auto missionComponent = player->GetComponent<MissionComponent>();
auto* missionComponent = player->GetComponent<MissionComponent>();
if (!character->GetPlayerFlag(109)) {
character->SetPlayerFlag(109, true);
@@ -350,7 +350,7 @@ void ZoneAgProperty::OnZonePropertyModelRemovedWhileEquipped(Entity* self, Entit
void ZoneAgProperty::OnZonePropertyModelRotated(Entity* self, Entity* player) {
auto* character = player->GetCharacter();
auto missionComponent = player->GetComponent<MissionComponent>();
auto* missionComponent = player->GetComponent<MissionComponent>();
if (!character->GetPlayerFlag(110)) {
character->SetPlayerFlag(110, true);