mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Fucking murder the sound loop, this way it'll call .stop() every update until it is disposed
This commit is contained in:
parent
443e154e57
commit
2c6fa42bf0
@ -246,7 +246,10 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAn
|
||||
DoorDecl doorType = getDoorType();
|
||||
|
||||
if(this.state == 0 && state == 3){ // Door transitioning to open
|
||||
if(audio != null) audio.stopSound();
|
||||
if(audio != null) {
|
||||
audio.stopSound();
|
||||
audio.setKeepAlive(0);
|
||||
}
|
||||
|
||||
if(doorType.getOpenSoundLoop() != null){
|
||||
audio = MainRegistry.proxy.getLoopedSound(doorType.getOpenSoundLoop(), xCoord, yCoord, zCoord, doorType.getSoundVolume(), 10F, 1F);
|
||||
@ -266,7 +269,10 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAn
|
||||
}
|
||||
|
||||
if(this.state == 1 && state == 2){ // Door transitioning to closed
|
||||
if(audio != null) audio.stopSound();
|
||||
if(audio != null) {
|
||||
audio.stopSound();
|
||||
audio.setKeepAlive(0);
|
||||
}
|
||||
|
||||
if(doorType.getCloseSoundLoop() != null){
|
||||
audio = MainRegistry.proxy.getLoopedSound(doorType.getCloseSoundLoop(), xCoord, yCoord, zCoord, doorType.getSoundVolume(), 10F, 1F);
|
||||
@ -288,10 +294,12 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAn
|
||||
if(state == 1 || state == 0){ // Door finished any transition
|
||||
if(audio != null){
|
||||
audio.stopSound();
|
||||
audio.setKeepAlive(0);
|
||||
audio = null;
|
||||
}
|
||||
if(audio2 != null){
|
||||
audio2.stopSound();
|
||||
audio.setKeepAlive(0);
|
||||
audio2 = null;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user