mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-20 23:33:59 -07:00
Forgot to serialize a new unitMotion variable, resulting in OOS on rejoin.
This was SVN commit r17245.
This commit is contained in:
parent
bc0048d592
commit
e9271025dc
1 changed files with 3 additions and 0 deletions
|
|
@ -364,6 +364,8 @@ public:
|
|||
serialize.Bool("moving", m_Moving);
|
||||
serialize.Bool("facePointAfterMove", m_FacePointAfterMove);
|
||||
|
||||
serialize.NumberU8("tries", m_Tries, 0, 255);
|
||||
|
||||
SerializeVector<SerializeWaypoint>()(serialize, "long path", m_LongPath.m_Waypoints);
|
||||
SerializeVector<SerializeWaypoint>()(serialize, "short path", m_ShortPath.m_Waypoints);
|
||||
|
||||
|
|
@ -1413,6 +1415,7 @@ void CCmpUnitMotion::RequestShortPath(const CFixedVector2D &from, const PathGoal
|
|||
if (!cmpPathfinder)
|
||||
return;
|
||||
|
||||
// wrapping around on m_Tries isn't really a problem so don't check for overflow.
|
||||
fixed searchRange = std::max(SHORT_PATH_MIN_SEARCH_RANGE * ++m_Tries, goal.DistanceToPoint(from));
|
||||
if (searchRange > SHORT_PATH_MAX_SEARCH_RANGE)
|
||||
searchRange = SHORT_PATH_MAX_SEARCH_RANGE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue