Make 4-way directional facing directions updating a bit more lenient. Framework for boss arrow indicators when bosses go off-screen. Release Build 9382.
This commit is contained in:
@@ -378,7 +378,7 @@ void Monster::UpdateFacingDirection(vf2d facingTargetPoint){
|
||||
float facingAngle=util::angleTo(GetPos(),facingTargetPoint);
|
||||
vf2d diff=GetPos()-facingTargetPoint;
|
||||
|
||||
if(abs(facingAngle-prevFacingDirectionAngle)<(7*PI)/16.f||lastFacingDirectionChange<0.25f)return; //We don't want to change facing angle until a more drastic angle of change has occurred. About 1/4 circle should be acceptable.
|
||||
if(abs(facingAngle-prevFacingDirectionAngle)<PI/4.f||lastFacingDirectionChange<0.25f)return; //We don't want to change facing angle until a more drastic angle of change has occurred. About 1/4 circle should be acceptable.
|
||||
|
||||
prevFacingDirectionAngle=facingAngle;
|
||||
lastFacingDirectionChange=0.f;
|
||||
@@ -1071,4 +1071,8 @@ void Monster::SetIframes(const float iframeTime){
|
||||
|
||||
const std::string_view Monster::GetDisplayName()const{
|
||||
return MONSTER_DATA.at(GetName()).GetDisplayName();
|
||||
}
|
||||
|
||||
const bool Monster::HasArrowIndicator()const{
|
||||
return MONSTER_DATA.at(GetName()).HasArrowIndicator();
|
||||
}
|
||||
Reference in New Issue
Block a user