mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
Get rid of monster movement flags, since it's really spline flags.
Thanks to Ralek for research.
This commit is contained in:
parent
4a3081e7d5
commit
db547a008a
20 changed files with 206 additions and 182 deletions
|
|
@ -276,7 +276,7 @@ void Object::BuildMovementUpdate(ByteBuffer * data, uint16 updateFlags) const
|
|||
if (!((Creature*)unit)->hasUnitState(UNIT_STAT_MOVING))
|
||||
{
|
||||
// (ok) possibly some "hover" mode
|
||||
unit->m_movementInfo.AddMovementFlag(MOVEFLAG_FLY_UNK1);
|
||||
unit->m_movementInfo.AddMovementFlag(MOVEFLAG_ROOT);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -299,13 +299,13 @@ void Object::BuildMovementUpdate(ByteBuffer * data, uint16 updateFlags) const
|
|||
player->m_movementInfo.RemoveMovementFlag(MOVEFLAG_ONTRANSPORT);
|
||||
|
||||
// remove unknown, unused etc flags for now
|
||||
player->m_movementInfo.RemoveMovementFlag(MOVEFLAG_SPLINE2);
|
||||
player->m_movementInfo.RemoveMovementFlag(MOVEFLAG_SPLINE_ENABLED);
|
||||
|
||||
if(player->isInFlight())
|
||||
{
|
||||
ASSERT(player->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE);
|
||||
player->m_movementInfo.AddMovementFlag(MOVEFLAG_FORWARD);
|
||||
player->m_movementInfo.AddMovementFlag(MOVEFLAG_SPLINE2);
|
||||
player->m_movementInfo.AddMovementFlag(MOVEFLAG_SPLINE_ENABLED);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -328,11 +328,11 @@ void Object::BuildMovementUpdate(ByteBuffer * data, uint16 updateFlags) const
|
|||
*data << float(unit->GetSpeed(MOVE_PITCH_RATE));
|
||||
|
||||
// 0x08000000
|
||||
if(unit->m_movementInfo.GetMovementFlags() & MOVEFLAG_SPLINE2)
|
||||
if(unit->m_movementInfo.GetMovementFlags() & MOVEFLAG_SPLINE_ENABLED)
|
||||
{
|
||||
if(GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
sLog.outDebug("_BuildMovementUpdate: MOVEFLAG_SPLINE2 for non-player");
|
||||
sLog.outDebug("_BuildMovementUpdate: MOVEFLAG_SPLINE_ENABLED for non-player");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -340,7 +340,7 @@ void Object::BuildMovementUpdate(ByteBuffer * data, uint16 updateFlags) const
|
|||
|
||||
if(!player->isInFlight())
|
||||
{
|
||||
sLog.outDebug("_BuildMovementUpdate: MOVEFLAG_SPLINE2 but not in flight");
|
||||
sLog.outDebug("_BuildMovementUpdate: MOVEFLAG_SPLINE_ENABLED but not in flight");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -348,23 +348,23 @@ void Object::BuildMovementUpdate(ByteBuffer * data, uint16 updateFlags) const
|
|||
|
||||
FlightPathMovementGenerator *fmg = (FlightPathMovementGenerator*)(player->GetMotionMaster()->top());
|
||||
|
||||
uint32 flags3 = MONSTER_MOVE_SPLINE_FLY;
|
||||
uint32 flags3 = SPLINEFLAG_WALKMODE | SPLINEFLAG_FLYING;
|
||||
|
||||
*data << uint32(flags3); // splines flag?
|
||||
|
||||
if(flags3 & SPLINE_MOVE_FLAG_FACING) // may be orientation
|
||||
if(flags3 & SPLINEFLAG_FINALFACING) // may be orientation
|
||||
{
|
||||
*data << float(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(flags3 & SPLINE_MOVE_FLAG_GUID) // probably guid there
|
||||
if(flags3 & SPLINEFLAG_FINALTARGET) // probably guid there
|
||||
{
|
||||
*data << uint64(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(flags3 & SPLINE_MOVE_FLAG_POINT) // probably x,y,z coords there
|
||||
if(flags3 & SPLINEFLAG_FINALPOINT) // probably x,y,z coords there
|
||||
{
|
||||
*data << float(0);
|
||||
*data << float(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue