Clean up previous commit by using the proper getPropulsionStats() accessor function.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10851 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
b3ce6cd49f
commit
57ea093048
|
@ -531,7 +531,7 @@ static FPATH_RETVAL fpathRoute(MOVE_CONTROL *psMove, int id, int startX, int sta
|
|||
// Find a route for an DROID to a location in world coordinates
|
||||
FPATH_RETVAL fpathDroidRoute(DROID* psDroid, SDWORD tX, SDWORD tY, FPATH_MOVETYPE moveType)
|
||||
{
|
||||
PROPULSION_STATS *psPropStats = asPropulsionStats + psDroid->asBits[COMP_PROPULSION].nStat;
|
||||
PROPULSION_STATS *psPropStats = getPropulsionStats(psDroid);
|
||||
|
||||
// override for AI to blast our way through stuff
|
||||
if (!isHumanPlayer(psDroid->player) && moveType == FMT_MOVE)
|
||||
|
@ -633,9 +633,8 @@ static BOOL obstruction;
|
|||
static bool fpathVisCallback(Vector3i pos, int32_t dist, void *data)
|
||||
{
|
||||
DROID *psDroid = (DROID *)data;
|
||||
PROPULSION_STATS *psPropStats = asPropulsionStats + psDroid->asBits[COMP_PROPULSION].nStat;
|
||||
|
||||
if (fpathBlockingTile(map_coord(pos.x), map_coord(pos.y), psPropStats->propulsionType))
|
||||
if (fpathBlockingTile(map_coord(pos.x), map_coord(pos.y), getPropulsionStats(psDroid)->propulsionType))
|
||||
{
|
||||
// found an obstruction
|
||||
obstruction = true;
|
||||
|
|
Loading…
Reference in New Issue