mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Movement: initialize destinationTeleportPos with invalid int3 position
This commit is contained in:
parent
ee08749743
commit
3800bd45b7
@ -96,7 +96,7 @@ VCAI::VCAI(void)
|
||||
LOG_TRACE(logAi);
|
||||
makingTurn = nullptr;
|
||||
destinationTeleport = ObjectInstanceID();
|
||||
destinationTeleportPos = int3();
|
||||
destinationTeleportPos = int3(-1);
|
||||
}
|
||||
|
||||
VCAI::~VCAI(void)
|
||||
@ -1881,7 +1881,7 @@ bool VCAI::moveHeroToTile(int3 dst, HeroPtr h)
|
||||
destinationTeleportPos = CGHeroInstance::convertPosition(exitPos, true);
|
||||
cb->moveHero(*h, h->pos);
|
||||
destinationTeleport = ObjectInstanceID();
|
||||
destinationTeleportPos = int3();
|
||||
destinationTeleportPos = int3(-1);
|
||||
afterMovementCheck();
|
||||
};
|
||||
|
||||
@ -1893,7 +1893,7 @@ bool VCAI::moveHeroToTile(int3 dst, HeroPtr h)
|
||||
|
||||
status.setChannelProbing(true);
|
||||
for(auto exit : teleportChannelProbingList)
|
||||
doTeleportMovement(exit, int3());
|
||||
doTeleportMovement(exit, int3(-1));
|
||||
teleportChannelProbingList.clear();
|
||||
doTeleportMovement(currentExit->id, currentExitPos);
|
||||
status.setChannelProbing(false);
|
||||
@ -2931,7 +2931,7 @@ void AIStatus::setMove(bool ongoing)
|
||||
void AIStatus::setChannelProbing(bool ongoing)
|
||||
{
|
||||
boost::unique_lock<boost::mutex> lock(mx);
|
||||
ongoingHeroMovement = ongoing;
|
||||
ongoingChannelProbing = ongoing;
|
||||
cv.notify_all();
|
||||
}
|
||||
|
||||
|
@ -367,7 +367,7 @@ public:
|
||||
}
|
||||
else if(!h.saving)
|
||||
{
|
||||
destinationTeleportPos = int3();
|
||||
destinationTeleportPos = int3(-1);
|
||||
}
|
||||
h & townVisitsThisWeek & lockedHeroes & reservedHeroesMap; //FIXME: cannot instantiate abstract class
|
||||
h & visitableObjs & alreadyVisited & reservedObjs;
|
||||
|
@ -97,7 +97,7 @@ CPlayerInterface::CPlayerInterface(PlayerColor Player)
|
||||
{
|
||||
logGlobal->traceStream() << "\tHuman player interface for player " << Player << " being constructed";
|
||||
destinationTeleport = ObjectInstanceID();
|
||||
destinationTeleportPos = int3();
|
||||
destinationTeleportPos = int3(-1);
|
||||
observerInDuelMode = false;
|
||||
howManyPeople++;
|
||||
GH.defActionsDef = 0;
|
||||
@ -1416,7 +1416,7 @@ void CPlayerInterface::requestRealized( PackageApplied *pa )
|
||||
&& stillMoveHero.get() == DURING_MOVE)
|
||||
{ // After teleportation via CGTeleport object is finished
|
||||
destinationTeleport = ObjectInstanceID();
|
||||
destinationTeleportPos = int3();
|
||||
destinationTeleportPos = int3(-1);
|
||||
stillMoveHero.setn(CONTINUE_MOVE);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user