forked from github/server
crash ROUTE & buildingowner
This commit is contained in:
parent
ab51cca539
commit
f18f6f8ece
2 changed files with 7 additions and 1 deletions
|
@ -1961,6 +1961,10 @@ travel_i(unit * u, const region_list * route_begin, const region_list * route_en
|
|||
{
|
||||
region * r = u->region;
|
||||
|
||||
if (u->building && !can_leave(u)) {
|
||||
cmistake(u, u->thisorder, 150, MSG_MOVE);
|
||||
return route_begin;
|
||||
}
|
||||
switch (canwalk(u)) {
|
||||
case E_CANWALK_TOOHEAVY:
|
||||
cmistake(u, ord, 57, MSG_MOVE);
|
||||
|
|
|
@ -843,7 +843,9 @@ boolean
|
|||
leave(unit * u, boolean force)
|
||||
{
|
||||
if (!force) {
|
||||
if (!can_leave(u)) return false;
|
||||
if (!can_leave(u)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (u->building) leave_building(u);
|
||||
else if (u->ship) leave_ship(u);
|
||||
|
|
Loading…
Reference in a new issue