feat(game): spawn inicial de ROOM_INTRO sense immunitat
This commit is contained in:
1 parent
2cbf1bb6e0
commit
b7811180ba
3 files changed
+19
-8
No files matched your search
@@ -1589,10 +1589,13 @@ void Player::respawn(float x, float y) {
|
||||
setPosX(x);
|
||||
setPosY(y);
|
||||
// Immunitat post-spawn: armem la finestra de gràcia amb la durada del
|
||||
// YAML. Cobreix l'aparició inicial (`spawnFromAir` → `respawn`) i el
|
||||
// respawn post-mort (`respawnFromDying` → `respawn`). Si el bloc
|
||||
// `immunity:` manca al YAML, `duration_ms` és 0 i `setImmunity` és
|
||||
// no-op — comportament idèntic al d'abans.
|
||||
// YAML. Cobreix el join mid-partida (`joinPlayer` → `spawnFromAir` →
|
||||
// `respawn`) i el respawn post-mort (`respawnFromDying` → `respawn`).
|
||||
// L'spawn inicial de ROOM_INTRO també hi passa, però `triggerPlayerSpawn`
|
||||
// crida `setImmunity(0)` immediatament després per cancel·lar-la (els
|
||||
// enemics ja estan apareixent i el jugador no ha de tindre gràcia).
|
||||
// Si el bloc `immunity:` manca al YAML, `duration_ms` és 0 i el timer
|
||||
// queda a 0 — sense gràcia, comportament idèntic al d'abans.
|
||||
setImmunity(immunity_config.duration_ms);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user