units can rename the ship they are on if their faction owns it.

this fixes bug 2384.
This commit is contained in:
Enno Rehling 2017-11-12 15:01:58 +01:00
parent 4a73db1f67
commit 2703b01ade
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}