*Use degree rather than radian for creature_formation table.
--HG-- branch : trunk
This commit is contained in:
@@ -115,8 +115,8 @@ void CreatureGroupManager::LoadCreatureFormations()
|
||||
//If creature is group leader we may skip loading of dist/angle
|
||||
if(group_member->leaderGUID != memberGUID)
|
||||
{
|
||||
group_member->follow_dist = fields[2].GetUInt32();
|
||||
group_member->follow_angle = fields[3].GetUInt32();
|
||||
group_member->follow_dist = fields[2].GetFloat();
|
||||
group_member->follow_angle = fields[3].GetFloat() * M_PI / 180;
|
||||
}
|
||||
|
||||
// check data correctness
|
||||
|
||||
+1
-1
@@ -4506,7 +4506,7 @@ bool ChatHandler::HandleNpcAddFormationCommand(const char* args)
|
||||
FormationInfo *group_member;
|
||||
|
||||
group_member = new FormationInfo;
|
||||
group_member->follow_angle = pCreature->GetAngle(chr) - chr->GetOrientation();
|
||||
group_member->follow_angle = (pCreature->GetAngle(chr) - chr->GetOrientation()) * 180 / M_PI;
|
||||
group_member->follow_dist = sqrtf(pow(chr->GetPositionX() - pCreature->GetPositionX(),int(2))+pow(chr->GetPositionY()-pCreature->GetPositionY(),int(2)));
|
||||
group_member->leaderGUID = leaderGUID;
|
||||
group_member->groupAI = 0;
|
||||
|
||||
Reference in New Issue
Block a user