mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2026-08-17 16:35:14 -06:00
Refactored some anim/area sound classes
This commit is contained in:
parent
dbca509eb5
commit
fd3572f709
108 changed files with 1063 additions and 1078 deletions
|
|
@ -8,40 +8,40 @@ import org.openrs2.deob.annotation.Pc;
|
|||
public final class AreaSound extends Node {
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "p", descriptor = "I")
|
||||
public int anInt2028;
|
||||
public int maxZFine;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "q", descriptor = "I")
|
||||
public int anInt2029;
|
||||
public int minZFine;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "t", descriptor = "I")
|
||||
public int anInt2032;
|
||||
public int minInterval;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "v", descriptor = "Lclient!b;")
|
||||
public SoundPcmStream primaryStream;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "x", descriptor = "I")
|
||||
public int anInt2033;
|
||||
public int level;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "y", descriptor = "Lclient!b;")
|
||||
public SoundPcmStream secondaryStream;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "z", descriptor = "I")
|
||||
public int anInt2034;
|
||||
public int remainingLoops;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "E", descriptor = "Lclient!pb;")
|
||||
public LocType locType;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "F", descriptor = "I")
|
||||
public int anInt2037;
|
||||
public int maxXFine;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "I", descriptor = "Lclient!km;")
|
||||
public Npc npc;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "K", descriptor = "I")
|
||||
public int anInt2040;
|
||||
public int maxInterval;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "L", descriptor = "I")
|
||||
public int anInt2041;
|
||||
public int minXFine;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "M", descriptor = "Lclient!e;")
|
||||
public Player player;
|
||||
|
|
@ -59,45 +59,45 @@ public final class AreaSound extends Node {
|
|||
public int[] sounds;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "G", descriptor = "I")
|
||||
public int anInt2038 = 0;
|
||||
public int movementSpeed = 0;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "c", descriptor = "(I)V")
|
||||
public final void update() {
|
||||
@Pc(8) int local8 = this.sound;
|
||||
@Pc(8) int prevSound = this.sound;
|
||||
if (this.locType != null) {
|
||||
@Pc(17) LocType local17 = this.locType.getMultiLoc();
|
||||
if (local17 == null) {
|
||||
@Pc(17) LocType locType = this.locType.getMultiLoc();
|
||||
if (locType == null) {
|
||||
this.sound = -1;
|
||||
this.sounds = null;
|
||||
this.anInt2040 = 0;
|
||||
this.maxInterval = 0;
|
||||
this.radius = 0;
|
||||
this.anInt2032 = 0;
|
||||
this.minInterval = 0;
|
||||
} else {
|
||||
this.anInt2040 = local17.anInt4414;
|
||||
this.sound = local17.sound;
|
||||
this.anInt2032 = local17.anInt4419;
|
||||
this.radius = local17.soundRadius * 128;
|
||||
this.sounds = local17.anIntArray381;
|
||||
this.maxInterval = locType.anInt4414;
|
||||
this.sound = locType.sound;
|
||||
this.minInterval = locType.anInt4419;
|
||||
this.radius = locType.soundRadius * 128;
|
||||
this.sounds = locType.anIntArray381;
|
||||
}
|
||||
} else if (this.npc != null) {
|
||||
@Pc(92) int local92 = Static112.getSound(this.npc);
|
||||
if (local8 != local92) {
|
||||
@Pc(100) NpcType local100 = this.npc.type;
|
||||
this.sound = local92;
|
||||
if (local100.multiNpcs != null) {
|
||||
local100 = local100.getMultiNpc();
|
||||
@Pc(92) int sound = Npc.getSound(this.npc);
|
||||
if (prevSound != sound) {
|
||||
@Pc(100) NpcType npcType = this.npc.type;
|
||||
this.sound = sound;
|
||||
if (npcType.multiNpcs != null) {
|
||||
npcType = npcType.getMultiNpc();
|
||||
}
|
||||
if (local100 == null) {
|
||||
if (npcType == null) {
|
||||
this.radius = 0;
|
||||
} else {
|
||||
this.radius = local100.soundRadius * 128;
|
||||
this.radius = npcType.soundRadius * 128;
|
||||
}
|
||||
}
|
||||
} else if (this.player != null) {
|
||||
this.sound = Static140.getSound(this.player);
|
||||
this.sound = Player.getSound(this.player);
|
||||
this.radius = this.player.soundRadius * 128;
|
||||
}
|
||||
if (this.sound != local8 && this.primaryStream != null) {
|
||||
if (this.sound != prevSound && this.primaryStream != null) {
|
||||
client.soundStream.removeSubStream(this.primaryStream);
|
||||
this.primaryStream = null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue