From 4091c380f1147a9de843929d87d6c971eb9ccf10 Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Sat, 20 Jan 2007 12:56:55 +0000 Subject: [PATCH] (do_unit_move): Move the shp_view() code in the switch case. No functional changes. --- src/lib/commands/navi.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/lib/commands/navi.c b/src/lib/commands/navi.c index 1a549986..2c356089 100644 --- a/src/lib/commands/navi.c +++ b/src/lib/commands/navi.c @@ -180,19 +180,14 @@ do_unit_move(struct emp_qelem *unit_list, int *together, } if (cp == NULL || *cp == '\0') cp = &dirch[DIR_STOP]; - dir = chkdir(*cp, DIR_STOP, leader->ef_type == EF_SHIP ? - DIR_VIEW : DIR_LAST); + dir = chkdir(*cp, DIR_STOP, DIR_LAST); if (dir >= 0) { if (leader->ef_type == EF_SHIP) { - if (dir == DIR_VIEW) - shp_view(unit_list); - else { - stopping |= shp_nav_one_sector(unit_list, dir, - player->cnum, *together); - if (stopping != 2) { - *pt++ = dirch[dir]; - *pt = '\0'; - } + stopping |= shp_nav_one_sector(unit_list, dir, + player->cnum, *together); + if (stopping != 2) { + *pt++ = dirch[dir]; + *pt = '\0'; } } else stopping |= @@ -277,6 +272,11 @@ do_unit_move(struct emp_qelem *unit_list, int *together, skip = 1; player->btused++; continue; + case 'v': + if (leader->ef_type != EF_SHIP) + break; + shp_view(unit_list); + continue; } direrr("`%c' to stop", leader->ef_type == EF_SHIP ? ", `%c' to view" : NULL, NULL);