Skip to content

Commit

Permalink
fix rotation anim with AI_Flee
Browse files Browse the repository at this point in the history
  • Loading branch information
Try committed Jun 26, 2022
1 parent ad18f1c commit 2de4fd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions game/world/objects/npc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1622,12 +1622,12 @@ bool Npc::implAiFlee(uint64_t dt) {
if(wp==nullptr || oth.qDistTo(wp)<oth.qDistTo(*this)) {
auto dx = oth.x-x;
auto dz = oth.z-z;
if(implTurnTo(-dx,-dz,false,dt))
if(implTurnTo(-dx,-dz,(go2.flag!=GT_No),dt))
return (go2.flag==GT_Flee);
} else {
auto dx = wp->x-x;
auto dz = wp->z-z;
if(implTurnTo(dx,dz,false,dt))
if(implTurnTo(dx,dz,(go2.flag!=GT_No),dt))
return (go2.flag==GT_Flee);
}

Expand Down

0 comments on commit 2de4fd8

Please sign in to comment.