fix: misleading indentation on PLAYER_ALIVE/PLAYER_UNGHOST event emits

The emit calls were indented at a level suggesting they were outside the
if/else blocks, but braces placed them inside. Fixed to match the actual
control flow, preventing a future maintainer from "correcting" the
indentation and accidentally changing the logic.
This commit is contained in:
Kelsi 2026-03-29 17:52:56 -07:00
parent ec24bcd910
commit b3abf04dbb

View file

@ -757,11 +757,11 @@ EntityController::UnitFieldUpdateResult EntityController::applyUnitFieldsOnUpdat
owner_.playerDead_ = false;
if (!wasGhost) {
LOG_INFO("Player resurrected!");
pendingEvents_.emit("PLAYER_ALIVE", {});
pendingEvents_.emit("PLAYER_ALIVE", {});
} else {
LOG_INFO("Player entered ghost form");
owner_.releasedSpirit_ = false;
pendingEvents_.emit("PLAYER_UNGHOST", {});
pendingEvents_.emit("PLAYER_UNGHOST", {});
}
}
if ((entity->getType() == ObjectType::UNIT || entity->getType() == ObjectType::PLAYER) && owner_.npcRespawnCallback_) {