X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fmoving.c;h=3373b37b0738d29c4f65c4800fa99afcf41a736f;hp=948cdb40c73402a78f68940cda09899fae906876;hb=4207ce95e80fe7e2d5114079fa4255e0ad506618;hpb=f5a89916bc70a66b6fa6a3abc4c36023503cd380 diff --git a/src/moving.c b/src/moving.c index 948cdb4..3373b37 100644 --- a/src/moving.c +++ b/src/moving.c @@ -219,7 +219,7 @@ void dock(bool verbose) prout(_("You must first leave standard orbit.")); return; } - if (game.base.x==0 || abs(game.sector.x-game.base.x) > 1 || abs(game.sector.y-game.base.y) > 1) { + if (!is_valid(game.base) || abs(game.sector.x-game.base.x) > 1 || abs(game.sector.y-game.base.y) > 1) { crmshp(); prout(_(" not adjacent to base.")); return; @@ -793,7 +793,7 @@ void timwrp() game.isatb = 0; unschedule(FCDBAS); unschedule(FSCDBAS); - game.battle.x = game.battle.y = 0; + invalidate(game.battle); /* Make sure Galileo is consistant -- Snapshot may have been taken when on planet, which would give us two Galileos! */ @@ -987,7 +987,7 @@ void mayday(void) break; } } - if (game.sector.x==0){ + if (!is_valid(game.sector)){ prout(_("You have been lost in space...")); finish(FMATERIALIZE); return;