diff options
| author | historia <[not public]> | 2026-06-22 01:54:28 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-22 01:54:28 -0400 |
| commit | 7f07c7236578e1a7bcef0282ff9d7f5bf8c7c045 (patch) | |
| tree | 7f9182f6fc9ed44d4738bfc6758660d741ba88e7 /internal/game/sys_safespot.go | |
| parent | a3ae1e6aad696f584d138d9363c05dedff136a65 (diff) | |
| download | thehouseoficarus-7f07c7236578e1a7bcef0282ff9d7f5bf8c7c045.tar.gz | |
fix: safespot fixes
Diffstat (limited to 'internal/game/sys_safespot.go')
| -rw-r--r-- | internal/game/sys_safespot.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/game/sys_safespot.go b/internal/game/sys_safespot.go index ffb7948..b0e94c2 100644 --- a/internal/game/sys_safespot.go +++ b/internal/game/sys_safespot.go @@ -99,7 +99,7 @@ func (g *Game) activateSafespot(sess *net.Session, p *player.Player, ss *Safespo return } - if cfg.RespawnOnHide { + if cfg.RespawnOnHide && len(st.SafespotOccupants) == 0 { st.SafespotLevel = len(cfg.Levels) st.SafespotTicksAtLevel = 0 } else if st.SafespotLevel <= 0 { @@ -211,7 +211,11 @@ func (g *Game) degradeSafespot(st *world.ObjState, objDef *object.ObjectDef, cfg } } st.SafespotOccupants = nil - g.scheduleSafespotRespawn(st, objDef, cfg) + if cfg.RespawnTicks > 0 { + g.scheduleSafespotRespawn(st, objDef, cfg) + } else { + g.World.RemoveObjInstance(st.RoomID, objDef.ID) + } return } |
