mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-10 17:38:08 +00:00
Replace all auto with auto*
For components
This commit is contained in:
@@ -10,7 +10,7 @@ void ActMine::OnStartup(Entity* self) {
|
||||
|
||||
void ActMine::OnRebuildNotifyState(Entity* self, eRebuildState state) {
|
||||
if (state == eRebuildState::COMPLETED) {
|
||||
auto rebuild = self->GetComponent<RebuildComponent>();
|
||||
auto* rebuild = self->GetComponent<RebuildComponent>();
|
||||
if (rebuild) {
|
||||
auto* builder = rebuild->GetBuilder();
|
||||
self->SetVar(u"Builder", builder->GetObjectID());
|
||||
@@ -24,7 +24,7 @@ void ActMine::OnRebuildNotifyState(Entity* self, eRebuildState state) {
|
||||
}
|
||||
|
||||
void ActMine::OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) {
|
||||
auto detroyable = self->GetComponent<DestroyableComponent>();
|
||||
auto* detroyable = self->GetComponent<DestroyableComponent>();
|
||||
if (!detroyable) return;
|
||||
if (status == "ENTER" && self->GetVar<bool>(u"RebuildComplete") == true && detroyable->IsEnemy(entering)) {
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 242, u"orange", "sirenlight_B");
|
||||
@@ -35,7 +35,7 @@ void ActMine::OnProximityUpdate(Entity* self, Entity* entering, std::string name
|
||||
void ActMine::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "Tick") {
|
||||
if (self->GetVar<int>(u"NumWarnings") >= MAX_WARNINGS) {
|
||||
auto skill = self->GetComponent<SkillComponent>();
|
||||
auto* skill = self->GetComponent<SkillComponent>();
|
||||
if (!skill) return;
|
||||
skill->CalculateBehavior(SKILL_ID, BEHAVIOR_ID, LWOOBJID_EMPTY);
|
||||
self->AddTimer("BlowedUp", BLOWED_UP_TIME);
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
void ActVehicleDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
auto possessableComponent = target->GetComponent<PossessableComponent>();
|
||||
auto* possessableComponent = target->GetComponent<PossessableComponent>();
|
||||
|
||||
Entity* vehicle;
|
||||
Entity* player;
|
||||
@@ -22,7 +22,7 @@ void ActVehicleDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
|
||||
return;
|
||||
} else if (target->IsPlayer()) {
|
||||
auto possessorComponent = target->GetComponent<PossessorComponent>();
|
||||
auto* possessorComponent = target->GetComponent<PossessorComponent>();
|
||||
|
||||
if (possessorComponent == nullptr) {
|
||||
return;
|
||||
@@ -44,7 +44,7 @@ void ActVehicleDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
|
||||
auto* zoneController = dZoneManager::Instance()->GetZoneControlObject();
|
||||
|
||||
auto racingControlComponent = zoneController->GetComponent<RacingControlComponent>();
|
||||
auto* racingControlComponent = zoneController->GetComponent<RacingControlComponent>();
|
||||
|
||||
if (racingControlComponent != nullptr) {
|
||||
racingControlComponent->OnRequestDie(player);
|
||||
|
Reference in New Issue
Block a user