FlyingComp cleanup

This commit is contained in:
Anuken
2021-08-22 10:21:20 -04:00
parent c605418e33
commit 50d01ef6f8
2 changed files with 12 additions and 1 deletions

View File

@@ -41,6 +41,10 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{
return isGrounded() && !hovering; return isGrounded() && !hovering;
} }
boolean emitWalkSound(){
return true;
}
void landed(){ void landed(){
} }
@@ -80,7 +84,7 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{
floor.walkEffect.at(x, y, hitSize() / 8f, floor.mapColor); floor.walkEffect.at(x, y, hitSize() / 8f, floor.mapColor);
splashTimer = 0f; splashTimer = 0f;
if(!(this instanceof WaterMovec)){ if(emitWalkSound()){
floor.walkSound.at(x, y, Mathf.random(floor.walkSoundPitchMin, floor.walkSoundPitchMax), floor.walkSoundVolume); floor.walkSound.at(x, y, Mathf.random(floor.walkSoundPitchMin, floor.walkSoundPitchMax), floor.walkSoundVolume);
} }
} }

View File

@@ -44,6 +44,13 @@ abstract class WaterMoveComp implements Posc, Velc, Hitboxc, Flyingc, Unitc{
return Pathfinder.costNaval; return Pathfinder.costNaval;
} }
//don't want obnoxious splashing
@Override
@Replace
public boolean emitWalkSound(){
return false;
}
@Override @Override
public void add(){ public void add(){
tleft.clear(); tleft.clear();