Skip to content

Commit

Permalink
Removed the pre-movement drowning check (why was there one anyway?)
Browse files Browse the repository at this point in the history
as it drowned some units that shouldn"t drown, and tidied up the
associated ship leaving tracking.
  • Loading branch information
sgb committed May 11, 2015
1 parent eca48f2 commit 57fde25
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
10 changes: 3 additions & 7 deletions runorders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ void Game::RunOrders()
RunQuitOrders();
Awrite("Removing Empty Units...");
DeleteEmptyUnits();
SinkUncrewedFleets();
DrownUnits();
// SinkUncrewedFleets();
// DrownUnits();
if (Globals->ALLOW_WITHDRAW) {
Awrite("Running WITHDRAW Orders...");
DoWithdrawOrders();
Expand Down Expand Up @@ -478,8 +478,7 @@ void Game::DrownUnits()
drown = !(u->CanSwim());
break;
case GameDefs::WFLIGHT_MUST_LAND:
drown = !(u->CanReallySwim() || u->leftShip);
u->leftShip = 0;
drown = !u->CanReallySwim();
break;
case GameDefs::WFLIGHT_NONE:
drown = !(u->CanReallySwim());
Expand Down Expand Up @@ -996,7 +995,6 @@ void Game::Do1EnterOrder(ARegion *r, Object *in, Unit *u)
u->Error("LEAVE: Can't leave a ship in the ocean.");
return;
}
if (in->IsFleet() && u->CanSwim()) u->leftShip = 1;
} else {
int on = u->enter;
to = r->GetObject(on);
Expand Down Expand Up @@ -1091,8 +1089,6 @@ void Game::Do1JoinOrder(ARegion *r, Object *in, Unit *u)
u->Error("JOIN: Can't leave a ship in the ocean.");
return;
}
if (u->object->IsFleet() && u->CanSwim())
u->leftShip = 1;
} else {
if (!to->CanEnter(r, u)) {
u->Error("JOIN: Can't enter that.");
Expand Down
1 change: 0 additions & 1 deletion unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,6 @@ void Unit::ClearOrders()
routed = 0;
enter = 0;
build = 0;
leftShip = 0;
destroy = 0;
if (attackorders) delete attackorders;
attackorders = 0;
Expand Down
1 change: 0 additions & 1 deletion unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ class Unit : public AListElem
int destroy;
int enter;
int build;
int leftShip;
UnitId *promote;
AList findorders;
AList giveorders;
Expand Down

0 comments on commit 57fde25

Please sign in to comment.