mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[12684] Fix a VC90 compile problem. Also add some const correctness
author @Schmoozerd
This commit is contained in:
parent
ab23f6978a
commit
c6ae586f4a
4 changed files with 13 additions and 11 deletions
|
|
@ -247,14 +247,16 @@ void WaypointMovementGenerator<Creature>::MovementInform(Creature& creature)
|
|||
creature.AI()->MovementInform(WAYPOINT_MOTION_TYPE, i_currentNode);
|
||||
}
|
||||
|
||||
bool WaypointMovementGenerator<Creature>::GetResetPosition(Creature&, float& x, float& y, float& z)
|
||||
bool WaypointMovementGenerator<Creature>::GetResetPosition(Creature&, float& x, float& y, float& z) const
|
||||
{
|
||||
// prevent a crash at empty waypoint path.
|
||||
if (!i_path || i_path->empty())
|
||||
return false;
|
||||
|
||||
const WaypointNode& node = i_path->at(i_currentNode);
|
||||
x = node.x; y = node.y; z = node.z;
|
||||
WaypointPath::const_iterator currPoint = i_path->find(i_currentNode);
|
||||
MANGOS_ASSERT(currPoint != i_path->end());
|
||||
|
||||
x = currPoint->second.x; y = currPoint->second.y; z = currPoint->second.z;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -399,7 +401,7 @@ void FlightPathMovementGenerator::DoEventIfAny(Player& player, TaxiPathNodeEntry
|
|||
}
|
||||
}
|
||||
|
||||
bool FlightPathMovementGenerator::GetResetPosition(Player&, float& x, float& y, float& z)
|
||||
bool FlightPathMovementGenerator::GetResetPosition(Player&, float& x, float& y, float& z) const
|
||||
{
|
||||
const TaxiPathNodeEntry& node = (*i_path)[i_currentNode];
|
||||
x = node.x; y = node.y; z = node.z;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue