remove the ground_diff changes, flying mobs were adhering to the ground unexpectedly
This commit is contained in:
parent
0aa8da426b
commit
b779a225e1
@ -2131,7 +2131,7 @@ void Spawn::InitializePosPacketData(Player* player, PacketStruct* packet, bool b
|
|||||||
new_y = itr->second.offset_y;
|
new_y = itr->second.offset_y;
|
||||||
|
|
||||||
if(player->GetMap() != GetMap()) {
|
if(player->GetMap() != GetMap()) {
|
||||||
ground_diff = itr->second.zone_ground_y - itr->second.offset_y;
|
ground_diff = sqrtf((GetY() - itr->second.zone_ground_y) * (GetY() - itr->second.zone_ground_y));
|
||||||
}
|
}
|
||||||
itr->second.timestamp = Timer::GetCurrentTime2()+1000;
|
itr->second.timestamp = Timer::GetCurrentTime2()+1000;
|
||||||
}
|
}
|
||||||
@ -2141,7 +2141,7 @@ void Spawn::InitializePosPacketData(Player* player, PacketStruct* packet, bool b
|
|||||||
float zone_ground_y = new_y;
|
float zone_ground_y = new_y;
|
||||||
if(player->GetMap() != GetMap()) {
|
if(player->GetMap() != GetMap()) {
|
||||||
zone_ground_y = FindBestZ(loc, nullptr, nullptr, nullptr);
|
zone_ground_y = FindBestZ(loc, nullptr, nullptr, nullptr);
|
||||||
ground_diff = zone_ground_y - new_y;
|
ground_diff = sqrtf((GetY() - zone_ground_y) * (GetY() - zone_ground_y));
|
||||||
}
|
}
|
||||||
TimedGridData data;
|
TimedGridData data;
|
||||||
data.grid_id = new_grid_id;
|
data.grid_id = new_grid_id;
|
||||||
@ -3845,7 +3845,9 @@ void Spawn::FaceTarget(float x, float z){
|
|||||||
void Spawn::FaceTarget(Spawn* target, bool disable_action_state){
|
void Spawn::FaceTarget(Spawn* target, bool disable_action_state){
|
||||||
if(!target)
|
if(!target)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FaceTarget(target->GetX(), target->GetZ());
|
FaceTarget(target->GetX(), target->GetZ());
|
||||||
|
|
||||||
if(GetHP() > 0 && target->IsPlayer() && !EngagedInCombat()){
|
if(GetHP() > 0 && target->IsPlayer() && !EngagedInCombat()){
|
||||||
if(!IsPet() && disable_action_state) {
|
if(!IsPet() && disable_action_state) {
|
||||||
if(IsNPC()) {
|
if(IsNPC()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user