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); 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){ 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){ 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)); 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){ public boolean canPlaceOn(Tile tile, Team team){
return true; return true;
} }
public boolean canBreak(Tile tile){ public boolean canBreak(Tile tile){
return true; return true;
} }

View File

@@ -25,4 +25,4 @@ org.gradle.caching=true
#used for slow jitpack builds; TODO see if this actually works #used for slow jitpack builds; TODO see if this actually works
org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.socketTimeout=100000
org.gradle.internal.http.connectionTimeout=100000 org.gradle.internal.http.connectionTimeout=100000
archash=2f2aeb72c3 archash=0ed3a81119