From 2703b01adefb6da96b66226b74bb830bf636e301 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 12 Nov 2017 15:01:58 +0100 Subject: [PATCH] units can rename the ship they are on if their faction owns it. this fixes bug 2384. --- src/laws.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/laws.c b/src/laws.c index f2460122d..ef24cadaa 100644 --- a/src/laws.c +++ b/src/laws.c @@ -1817,11 +1817,13 @@ int name_cmd(struct unit *u, struct order *ord) s = &sh->name; } else { + unit *uo; if (!u->ship) { cmistake(u, ord, 144, MSG_PRODUCE); break; } - if (ship_owner(u->ship) != u) { + uo = ship_owner(u->ship); + if (uo->faction != u->faction) { cmistake(u, ord, 12, MSG_PRODUCE); break; }