mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Fix: incorrect path rebuilding in RebuildWayPointsForGroupPath(), incorrect GroupAtFinalDestination() detection (by sun_alf)
* RebuildWayPointsForGroupPath(): incorrect manipulations with 'iOldDelta' and 'iDelta' lead to skipping a node in 'pHeadOfPath' and to assertion failure as a result: AssertMsg( FALSE, String( "Invalid DIAGONAL waypoint being added for groupID %d. AM-0", pGroup->ubGroupID ) ); * GroupAtFinalDestination(): should take into account the amount of WayPoints, otherwise multiple visiting of a sector is not possible (group end up in that sector at first entrance): if( ( pGroup->ubSectorX == wp->x ) && ( pGroup->ubSectorY == wp->y ) ) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9348 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -113,6 +113,7 @@ BOOLEAN MoveGroupToOriginalSector( UINT8 ubGroupID );
|
||||
|
||||
// get length of path
|
||||
INT32 GetLengthOfPath( PathStPtr pHeadPath );
|
||||
INT32 GetLengthOfPath( WAYPOINT* pHeadWaypoint );
|
||||
INT32 GetLengthOfMercPath( SOLDIERTYPE *pSoldier );
|
||||
|
||||
// is the path empty?
|
||||
@@ -121,6 +122,8 @@ BOOLEAN CheckIfPathIsEmpty( PathStPtr pHeadPath );
|
||||
PathStPtr GetSoldierMercPathPtr( SOLDIERTYPE *pSoldier );
|
||||
PathStPtr GetGroupMercPathPtr( GROUP *pGroup );
|
||||
|
||||
PathStPtr GetLastNodeOfPath( PathStPtr pNode );
|
||||
|
||||
UINT8 GetSoldierGroupId( SOLDIERTYPE *pSoldier );
|
||||
|
||||
// clears this groups strategic movement (mercpaths and waypoints), include those in the vehicle structs(!)
|
||||
|
||||
Reference in New Issue
Block a user