Fixed flagship-planet IP collision regression introduced in r3384; bug #1135
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3649 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
Changes towards version 0.8:
|
Changes towards version 0.8:
|
||||||
|
- Fixed flagship re-entering the inner system after an encounter in the
|
||||||
|
outer system, thus trapping the player (bug #1135) - Alex
|
||||||
- Fixed starmap fuel range circle shrinking (bug #1130) - Alex
|
- Fixed starmap fuel range circle shrinking (bug #1130) - Alex
|
||||||
- Added gamma correction to the setup menu (bug #977) - Alex, Nic
|
- Added gamma correction to the setup menu (bug #977) - Alex, Nic
|
||||||
- Refactor Melnorme comm code to make modding easier; step 1 (bug #1128),
|
- Refactor Melnorme comm code to make modding easier; step 1 (bug #1128),
|
||||||
|
|||||||
@@ -527,7 +527,7 @@ getCollisionFrame (PLANET_DESC *planet, COUNT WaitPlanet)
|
|||||||
|
|
||||||
// Returns the planet with which the flagship is colliding
|
// Returns the planet with which the flagship is colliding
|
||||||
static PLANET_DESC *
|
static PLANET_DESC *
|
||||||
CheckIntersect (BOOLEAN just_checking)
|
CheckIntersect (void)
|
||||||
{
|
{
|
||||||
COUNT i;
|
COUNT i;
|
||||||
PLANET_DESC *pCurDesc;
|
PLANET_DESC *pCurDesc;
|
||||||
@@ -618,16 +618,9 @@ CheckIntersect (BOOLEAN just_checking)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerInInnerSystem ())
|
// Collision with a new planet/moon. This may cause a transition
|
||||||
{ // Collision in the inner system (starts orbital)
|
// to an inner system or start an orbital view.
|
||||||
pSolarSysState->WaitIntersect = NewWaitPlanet;
|
pSolarSysState->WaitIntersect = NewWaitPlanet;
|
||||||
}
|
|
||||||
else
|
|
||||||
{ // Going into an inner system
|
|
||||||
// So there is now no existing collision
|
|
||||||
if (!just_checking)
|
|
||||||
pSolarSysState->WaitIntersect = 0;
|
|
||||||
}
|
|
||||||
return pCurDesc;
|
return pCurDesc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -942,7 +935,7 @@ leaveInnerSystem (PLANET_DESC *planet)
|
|||||||
// See if we also intersect with another planet, and if we do,
|
// See if we also intersect with another planet, and if we do,
|
||||||
// disable collisions comletely until we stop intersecting
|
// disable collisions comletely until we stop intersecting
|
||||||
// with any planet at all.
|
// with any planet at all.
|
||||||
CheckIntersect (TRUE);
|
CheckIntersect ();
|
||||||
if (pSolarSysState->WaitIntersect != outerPlanetWait)
|
if (pSolarSysState->WaitIntersect != outerPlanetWait)
|
||||||
pSolarSysState->WaitIntersect = (COUNT)~0;
|
pSolarSysState->WaitIntersect = (COUNT)~0;
|
||||||
}
|
}
|
||||||
@@ -998,7 +991,7 @@ CheckShipLocation (SIZE *newRadius)
|
|||||||
|
|
||||||
if (GLOBAL (autopilot.x) == ~0 && GLOBAL (autopilot.y) == ~0)
|
if (GLOBAL (autopilot.x) == ~0 && GLOBAL (autopilot.y) == ~0)
|
||||||
{ // Not on autopilot -- may collide with a planet
|
{ // Not on autopilot -- may collide with a planet
|
||||||
PLANET_DESC *planet = CheckIntersect (FALSE);
|
PLANET_DESC *planet = CheckIntersect ();
|
||||||
if (planet)
|
if (planet)
|
||||||
{ // Collision with a planet
|
{ // Collision with a planet
|
||||||
if (playerInInnerSystem ())
|
if (playerInInnerSystem ())
|
||||||
@@ -1241,7 +1234,12 @@ ResetSolarSys (void)
|
|||||||
DoMissions ();
|
DoMissions ();
|
||||||
|
|
||||||
// Figure out and note which planet/moon we just left, if any
|
// Figure out and note which planet/moon we just left, if any
|
||||||
CheckIntersect (TRUE);
|
// This records any existing collision and prevents the ship
|
||||||
|
// from entering planets until a new collision occurs.
|
||||||
|
// TODO: this may need logic similar to one in leaveInnerSystem()
|
||||||
|
// for when the ship collides with more than one planet at
|
||||||
|
// the same time. While quite rare, it's still possible.
|
||||||
|
CheckIntersect ();
|
||||||
|
|
||||||
pSolarSysState->InIpFlight = TRUE;
|
pSolarSysState->InIpFlight = TRUE;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user