forked from github/server
units can rename the ship they are on if their faction owns it.
this fixes bug 2384.
This commit is contained in:
parent
4a73db1f67
commit
2703b01ade
|
@ -1817,11 +1817,13 @@ int name_cmd(struct unit *u, struct order *ord)
|
||||||
s = &sh->name;
|
s = &sh->name;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
unit *uo;
|
||||||
if (!u->ship) {
|
if (!u->ship) {
|
||||||
cmistake(u, ord, 144, MSG_PRODUCE);
|
cmistake(u, ord, 144, MSG_PRODUCE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (ship_owner(u->ship) != u) {
|
uo = ship_owner(u->ship);
|
||||||
|
if (uo->faction != u->faction) {
|
||||||
cmistake(u, ord, 12, MSG_PRODUCE);
|
cmistake(u, ord, 12, MSG_PRODUCE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue