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:
2024-05-22 09:12:35 -05:00
parent 6902852b51
commit 4720f59ba7
7 changed files with 19 additions and 2 deletions
+5 -1
View File
@@ -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();
}