Allow multiple Call#sound calls per frame

This commit is contained in:
Anuken
2022-04-05 15:02:45 -04:00
parent af769065e6
commit cf25836d76
3 changed files with 7 additions and 8 deletions

View File

@@ -161,16 +161,16 @@ public class NetClient implements ApplicationListener{
clientPacketReliable(type, contents);
}
@Remote(variants = Variant.both, unreliable = true)
@Remote(variants = Variant.both, unreliable = true, called = Loc.server)
public static void sound(Sound sound, float volume, float pitch, float pan){
if(sound == null) return;
if(sound == null || headless) return;
sound.play(Mathf.clamp(volume, 0, 4f) * Core.settings.getInt("sfxvol") / 100f, pitch, pan);
sound.play(Mathf.clamp(volume, 0, 8f) * Core.settings.getInt("sfxvol") / 100f, pitch, pan, false, false);
}
@Remote(variants = Variant.both, unreliable = true)
@Remote(variants = Variant.both, unreliable = true, called = Loc.server)
public static void soundAt(Sound sound, float x, float y, float volume, float pitch){
if(sound == null) return;
if(sound == null || headless) return;
sound.at(x, y, pitch, Mathf.clamp(volume, 0, 4f));
}

View File

@@ -458,8 +458,7 @@ public class Block extends UnlockableContent implements Senseable{
public boolean canPlaceOn(Tile tile, Team team){
return true;
}
public boolean canBreak(Tile tile){
return true;
}