Renamed Npc_Class147 because it's related to all Entities

This commit is contained in:
Pazaz 2022-06-27 20:37:35 -04:00
parent a3b7beeed7
commit c4c59b33ce
11 changed files with 162 additions and 157 deletions

View file

@ -8,6 +8,9 @@ import org.openrs2.deob.annotation.Pc;
@OriginalClass("client!ck")
public final class BasType {
@OriginalMember(owner = "client!ac", name = "l", descriptor = "Lclient!ck;")
public static final BasType DEFAULT = new BasType();
@OriginalMember(owner = "client!ck", name = "g", descriptor = "[[I")
public int[][] modelRotateTranslate;

View file

@ -315,7 +315,7 @@ public class MiniMap {
}
for (local146 = 0; local146 < NpcList.size; local146++) {
@Pc(498) Npc local498 = NpcList.npcs[NpcList.ids[local146]];
if (local498 != null && local498.method2682()) {
if (local498 != null && local498.isVisible()) {
@Pc(507) NpcType local507 = local498.type;
if (local507 != null && local507.multiNpcs != null) {
local507 = local507.getMultiNpc();
@ -333,7 +333,7 @@ public class MiniMap {
}
for (local146 = 0; local146 < PlayerList.size; local146++) {
@Pc(591) Player local591 = PlayerList.players[PlayerList.ids[local146]];
if (local591 != null && local591.method2682()) {
if (local591 != null && local591.isVisible()) {
local154 = local591.zFine / 32 - PlayerList.self.zFine / 32;
local150 = local591.xFine / 32 - PlayerList.self.xFine / 32;
@Pc(624) long local624 = local591.username.encode37();

View file

@ -40,7 +40,7 @@ public final class Npc extends PathingEntity {
@OriginalMember(owner = "client!km", name = "b", descriptor = "()I")
@Override
public final int getMinY() {
return this.anInt3413;
return this.minY;
}
@OriginalMember(owner = "client!km", name = "a", descriptor = "(IIIIIIIIJILclient!ga;)V")
@ -57,7 +57,7 @@ public final class Npc extends PathingEntity {
return;
}
this.anInt3413 = body.getMinY();
this.minY = body.getMinY();
@Pc(84) NpcType local84 = this.type;
if (local84.multiNpcs != null) {
local84 = local84.getMultiNpc();
@ -71,11 +71,11 @@ public final class Npc extends PathingEntity {
@Pc(146) float local146 = GlRenderer.method4166();
GlRenderer.disableDepthMask();
GlRenderer.method4152(local144, local146 - 150.0F);
model.render(0, arg1, arg2, arg3, arg4, x, z, y, -1L, arg9, this.aClass47_Sub1_5);
model.render(0, arg1, arg2, arg3, arg4, x, z, y, -1L, arg9, this.particleSystem);
GlRenderer.enableDepthMask();
GlRenderer.method4152(local144, local146);
} else {
model.render(0, arg1, arg2, arg3, arg4, x, z, y, -1L, arg9, this.aClass47_Sub1_5);
model.render(0, arg1, arg2, arg3, arg4, x, z, y, -1L, arg9, this.particleSystem);
}
}
@ -112,7 +112,7 @@ public final class Npc extends PathingEntity {
body.aBoolean303 = true;
}
body.render(orientation, arg1, arg2, arg3, arg4, x, z, y, key, arg9, this.aClass47_Sub1_5);
body.render(orientation, arg1, arg2, arg3, arg4, x, z, y, key, arg9, this.particleSystem);
return;
}
@ -120,19 +120,19 @@ public final class Npc extends PathingEntity {
body.aBoolean303 = true;
}
body.render(orientation, arg1, arg2, arg3, arg4, x, z, y, key, arg9, this.aClass47_Sub1_5);
body.render(orientation, arg1, arg2, arg3, arg4, x, z, y, key, arg9, this.particleSystem);
if (model != null) {
if (this.type.size == 1) {
model.aBoolean303 = true;
}
model.render(orientation, arg1, arg2, arg3, arg4, x, z, y, key, arg9, this.aClass47_Sub1_5);
model.render(orientation, arg1, arg2, arg3, arg4, x, z, y, key, arg9, this.particleSystem);
}
}
@OriginalMember(owner = "client!km", name = "b", descriptor = "(I)I")
@Override
protected final int method2688() {
protected final int getBasId() {
if (client.game != 0 && this.type.multiNpcs != null) {
@Pc(17) NpcType local17 = this.type.getMultiNpc();
if (local17 != null && local17.basId != -1) {
@ -151,15 +151,15 @@ public final class Npc extends PathingEntity {
@OriginalMember(owner = "client!km", name = "a", descriptor = "(B)Z")
@Override
public final boolean method2682() {
public final boolean isVisible() {
return this.type != null;
}
@OriginalMember(owner = "client!km", name = "a", descriptor = "(ILclient!me;)V")
public final void setNpcType(@OriginalArg(1) NpcType arg0) {
this.type = arg0;
if (this.aClass47_Sub1_5 != null) {
this.aClass47_Sub1_5.method1646();
if (this.particleSystem != null) {
this.particleSystem.method1646();
}
}
}

View file

@ -477,140 +477,141 @@ public class NpcList {
}
@OriginalMember(owner = "client!ck", name = "a", descriptor = "(Lclient!fe;I)V")
public static void method879(@OriginalArg(0) PathingEntity arg0) {
arg0.aBoolean171 = false;
public static void method879(@OriginalArg(0) PathingEntity entity) {
entity.aBoolean171 = false;
@Pc(18) SeqType local18;
if (arg0.movementSeqId != -1) {
local18 = SeqTypeList.get(arg0.movementSeqId);
if (entity.movementSeqId != -1) {
local18 = SeqTypeList.get(entity.movementSeqId);
if (local18 == null || local18.frames == null) {
arg0.movementSeqId = -1;
entity.movementSeqId = -1;
} else {
arg0.anInt3396++;
if (local18.frames.length > arg0.anInt3407 && arg0.anInt3396 > local18.anIntArray474[arg0.anInt3407]) {
arg0.anInt3396 = 1;
arg0.anInt3407++;
arg0.anInt3388++;
SoundPlayer.playSeqSound(arg0.zFine, local18, arg0.xFine, arg0 == PlayerList.self, arg0.anInt3407);
entity.anInt3396++;
if (local18.frames.length > entity.anInt3407 && entity.anInt3396 > local18.anIntArray474[entity.anInt3407]) {
entity.anInt3396 = 1;
entity.anInt3407++;
entity.anInt3388++;
SoundPlayer.playSeqSound(entity.zFine, local18, entity.xFine, entity == PlayerList.self, entity.anInt3407);
}
if (arg0.anInt3407 >= local18.frames.length) {
arg0.anInt3407 = 0;
arg0.anInt3396 = 0;
SoundPlayer.playSeqSound(arg0.zFine, local18, arg0.xFine, PlayerList.self == arg0, arg0.anInt3407);
if (entity.anInt3407 >= local18.frames.length) {
entity.anInt3407 = 0;
entity.anInt3396 = 0;
SoundPlayer.playSeqSound(entity.zFine, local18, entity.xFine, PlayerList.self == entity, entity.anInt3407);
}
arg0.anInt3388 = arg0.anInt3407 + 1;
if (arg0.anInt3388 >= local18.frames.length) {
arg0.anInt3388 = 0;
entity.anInt3388 = entity.anInt3407 + 1;
if (entity.anInt3388 >= local18.frames.length) {
entity.anInt3388 = 0;
}
}
}
@Pc(156) int local156;
if (arg0.spotAnimId != -1 && client.loop >= arg0.spotAnimStart) {
local156 = SpotAnimTypeList.get(arg0.spotAnimId).seqId;
if (entity.spotAnimId != -1 && client.loop >= entity.spotAnimStart) {
local156 = SpotAnimTypeList.get(entity.spotAnimId).seqId;
if (local156 == -1) {
arg0.spotAnimId = -1;
entity.spotAnimId = -1;
} else {
@Pc(165) SeqType local165 = SeqTypeList.get(local156);
if (local165 == null || local165.frames == null) {
arg0.spotAnimId = -1;
entity.spotAnimId = -1;
} else {
if (arg0.anInt3399 < 0) {
arg0.anInt3399 = 0;
SoundPlayer.playSeqSound(arg0.zFine, local165, arg0.xFine, PlayerList.self == arg0, 0);
if (entity.anInt3399 < 0) {
entity.anInt3399 = 0;
SoundPlayer.playSeqSound(entity.zFine, local165, entity.xFine, PlayerList.self == entity, 0);
}
arg0.anInt3361++;
if (arg0.anInt3399 < local165.frames.length && local165.anIntArray474[arg0.anInt3399] < arg0.anInt3361) {
arg0.anInt3399++;
arg0.anInt3361 = 1;
SoundPlayer.playSeqSound(arg0.zFine, local165, arg0.xFine, PlayerList.self == arg0, arg0.anInt3399);
entity.anInt3361++;
if (entity.anInt3399 < local165.frames.length && local165.anIntArray474[entity.anInt3399] < entity.anInt3361) {
entity.anInt3399++;
entity.anInt3361 = 1;
SoundPlayer.playSeqSound(entity.zFine, local165, entity.xFine, PlayerList.self == entity, entity.anInt3399);
}
if (arg0.anInt3399 >= local165.frames.length) {
arg0.spotAnimId = -1;
if (entity.anInt3399 >= local165.frames.length) {
entity.spotAnimId = -1;
}
arg0.anInt3418 = arg0.anInt3399 + 1;
if (local165.frames.length <= arg0.anInt3418) {
arg0.anInt3418 = -1;
entity.anInt3418 = entity.anInt3399 + 1;
if (local165.frames.length <= entity.anInt3418) {
entity.anInt3418 = -1;
}
}
}
}
if (arg0.seqId != -1 && arg0.anInt3420 <= 1) {
local18 = SeqTypeList.get(arg0.seqId);
if (local18.anInt5363 == 1 && arg0.anInt3405 > 0 && client.loop >= arg0.anInt3395 && client.loop > arg0.anInt3386) {
arg0.anInt3420 = 1;
if (entity.seqId != -1 && entity.anInt3420 <= 1) {
local18 = SeqTypeList.get(entity.seqId);
if (local18.anInt5363 == 1 && entity.anInt3405 > 0 && client.loop >= entity.anInt3395 && client.loop > entity.anInt3386) {
entity.anInt3420 = 1;
return;
}
}
if (arg0.seqId != -1 && arg0.anInt3420 == 0) {
local18 = SeqTypeList.get(arg0.seqId);
if (entity.seqId != -1 && entity.anInt3420 == 0) {
local18 = SeqTypeList.get(entity.seqId);
if (local18 == null || local18.frames == null) {
arg0.seqId = -1;
entity.seqId = -1;
} else {
arg0.anInt3360++;
if (arg0.anInt3425 < local18.frames.length && arg0.anInt3360 > local18.anIntArray474[arg0.anInt3425]) {
arg0.anInt3360 = 1;
arg0.anInt3425++;
SoundPlayer.playSeqSound(arg0.zFine, local18, arg0.xFine, arg0 == PlayerList.self, arg0.anInt3425);
entity.anInt3360++;
if (entity.anInt3425 < local18.frames.length && entity.anInt3360 > local18.anIntArray474[entity.anInt3425]) {
entity.anInt3360 = 1;
entity.anInt3425++;
SoundPlayer.playSeqSound(entity.zFine, local18, entity.xFine, entity == PlayerList.self, entity.anInt3425);
}
if (local18.frames.length <= arg0.anInt3425) {
arg0.anInt3425 -= local18.anInt5362;
arg0.anInt3371++;
if (arg0.anInt3371 >= local18.anInt5357) {
arg0.seqId = -1;
} else if (arg0.anInt3425 >= 0 && local18.frames.length > arg0.anInt3425) {
SoundPlayer.playSeqSound(arg0.zFine, local18, arg0.xFine, PlayerList.self == arg0, arg0.anInt3425);
if (local18.frames.length <= entity.anInt3425) {
entity.anInt3425 -= local18.anInt5362;
entity.anInt3371++;
if (entity.anInt3371 >= local18.anInt5357) {
entity.seqId = -1;
} else if (entity.anInt3425 >= 0 && local18.frames.length > entity.anInt3425) {
SoundPlayer.playSeqSound(entity.zFine, local18, entity.xFine, PlayerList.self == entity, entity.anInt3425);
} else {
arg0.seqId = -1;
entity.seqId = -1;
}
}
arg0.anInt3373 = arg0.anInt3425 + 1;
if (arg0.anInt3373 >= local18.frames.length) {
arg0.anInt3373 -= local18.anInt5362;
if (local18.anInt5357 <= arg0.anInt3371 + 1) {
arg0.anInt3373 = -1;
} else if (arg0.anInt3373 < 0 || arg0.anInt3373 >= local18.frames.length) {
arg0.anInt3373 = -1;
entity.anInt3373 = entity.anInt3425 + 1;
if (entity.anInt3373 >= local18.frames.length) {
entity.anInt3373 -= local18.anInt5362;
if (local18.anInt5357 <= entity.anInt3371 + 1) {
entity.anInt3373 = -1;
} else if (entity.anInt3373 < 0 || entity.anInt3373 >= local18.frames.length) {
entity.anInt3373 = -1;
}
}
arg0.aBoolean171 = local18.aBoolean279;
entity.aBoolean171 = local18.aBoolean279;
}
}
if (arg0.anInt3420 > 0) {
arg0.anInt3420--;
if (entity.anInt3420 > 0) {
entity.anInt3420--;
}
for (local156 = 0; local156 < arg0.aClass147Array3.length; local156++) {
@Pc(545) Npc_Class147 local545 = arg0.aClass147Array3[local156];
if (local545 != null) {
if (local545.anInt5408 > 0) {
local545.anInt5408--;
for (local156 = 0; local156 < entity.aClass147Array3.length; local156++) {
@Pc(545) PathingEntity_Class147 c147 = entity.aClass147Array3[local156];
if (c147 != null) {
if (c147.anInt5408 > 0) {
c147.anInt5408--;
} else {
@Pc(570) SeqType local570 = SeqTypeList.get(local545.anInt5396);
@Pc(570) SeqType local570 = SeqTypeList.get(c147.anInt5396);
if (local570 == null || local570.frames == null) {
arg0.aClass147Array3[local156] = null;
entity.aClass147Array3[local156] = null;
} else {
local545.anInt5404++;
if (local545.anInt5399 < local570.frames.length && local545.anInt5404 > local570.anIntArray474[local545.anInt5399]) {
local545.anInt5399++;
local545.anInt5404 = 1;
SoundPlayer.playSeqSound(arg0.zFine, local570, arg0.xFine, arg0 == PlayerList.self, local545.anInt5399);
c147.anInt5404++;
if (c147.anInt5399 < local570.frames.length && c147.anInt5404 > local570.anIntArray474[c147.anInt5399]) {
c147.anInt5399++;
c147.anInt5404 = 1;
SoundPlayer.playSeqSound(entity.zFine, local570, entity.xFine, entity == PlayerList.self, c147.anInt5399);
}
if (local570.frames.length <= local545.anInt5399) {
local545.anInt5400++;
local545.anInt5399 -= local570.anInt5362;
if (local570.anInt5357 <= local545.anInt5400) {
arg0.aClass147Array3[local156] = null;
} else if (local545.anInt5399 >= 0 && local545.anInt5399 < local570.frames.length) {
SoundPlayer.playSeqSound(arg0.zFine, local570, arg0.xFine, PlayerList.self == arg0, local545.anInt5399);
if (local570.frames.length <= c147.anInt5399) {
c147.anInt5400++;
c147.anInt5399 -= local570.anInt5362;
if (local570.anInt5357 <= c147.anInt5400) {
entity.aClass147Array3[local156] = null;
} else if (c147.anInt5399 >= 0 && c147.anInt5399 < local570.frames.length) {
SoundPlayer.playSeqSound(entity.zFine, local570, entity.xFine, PlayerList.self == entity, c147.anInt5399);
} else {
arg0.aClass147Array3[local156] = null;
entity.aClass147Array3[local156] = null;
}
}
local545.anInt5398 = local545.anInt5399 + 1;
if (local570.frames.length <= local545.anInt5398) {
local545.anInt5398 -= local570.anInt5362;
if (local545.anInt5400 + 1 >= local570.anInt5357) {
local545.anInt5398 = -1;
} else if (local545.anInt5398 < 0 || local570.frames.length <= local545.anInt5398) {
local545.anInt5398 = -1;
c147.anInt5398 = c147.anInt5399 + 1;
if (local570.frames.length <= c147.anInt5398) {
c147.anInt5398 -= local570.anInt5362;
if (c147.anInt5400 + 1 >= local570.anInt5357) {
c147.anInt5398 = -1;
} else if (c147.anInt5398 < 0 || local570.frames.length <= c147.anInt5398) {
c147.anInt5398 = -1;
}
}
}

View file

@ -233,7 +233,7 @@ public final class NpcType {
}
@OriginalMember(owner = "client!me", name = "a", descriptor = "([Lclient!ub;IBIIIILclient!tk;ILclient!tk;)Lclient!ak;")
public final Model getBodyModel(@OriginalArg(0) Npc_Class147[] seqs, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) SeqType seqType1, @OriginalArg(8) int arg7, @OriginalArg(9) SeqType seqType2) {
public final Model getBodyModel(@OriginalArg(0) PathingEntity_Class147[] seqs, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) SeqType seqType1, @OriginalArg(8) int arg7, @OriginalArg(9) SeqType seqType2) {
if (this.multiNpcs != null) {
@Pc(13) NpcType local13 = this.getMultiNpc();
return local13 == null ? null : local13.getBodyModel(seqs, arg1, arg2, arg3, arg4, arg5, seqType1, arg7, seqType2);

View file

@ -10,14 +10,16 @@ public abstract class PathingEntity extends Entity {
@OriginalMember(owner = "client!ef", name = "a", descriptor = "[I")
public static final int[] ANGLES = new int[]{768, 1024, 1280, 512, 1536, 256, 0, 1792};
@OriginalMember(owner = "client!ac", name = "l", descriptor = "Lclient!ck;")
public static final BasType aClass20_1 = new BasType();
@OriginalMember(owner = "client!hn", name = "Y", descriptor = "I")
public static int anInt2680 = 0;
@OriginalMember(owner = "client!hm", name = "ab", descriptor = "I")
public static int anInt2640 = 0;
@OriginalMember(owner = "client!f", name = "V", descriptor = "I")
public static int anInt1938 = 0;
@OriginalMember(owner = "client!fe", name = "A", descriptor = "I")
public int spotAnimStart;
@ -55,7 +57,7 @@ public abstract class PathingEntity extends Entity {
public int anInt3395;
@OriginalMember(owner = "client!fe", name = "vb", descriptor = "Lclient!ga;")
protected ParticleSystem aClass47_Sub1_5;
protected ParticleSystem particleSystem;
@OriginalMember(owner = "client!fe", name = "Ab", descriptor = "I")
public int anInt3400;
@ -100,7 +102,7 @@ public abstract class PathingEntity extends Entity {
private int anInt3367 = 0;
@OriginalMember(owner = "client!fe", name = "L", descriptor = "[I")
public final int[] anIntArray319 = new int[4];
public final int[] hitVisibleUntil = new int[4];
@OriginalMember(owner = "client!fe", name = "K", descriptor = "[I")
public final int[] movementQueueX = new int[10];
@ -160,7 +162,7 @@ public abstract class PathingEntity extends Entity {
public int anInt3377 = 0;
@OriginalMember(owner = "client!fe", name = "Eb", descriptor = "[Lclient!ub;")
public final Npc_Class147[] aClass147Array3 = new Npc_Class147[12];
public final PathingEntity_Class147[] aClass147Array3 = new PathingEntity_Class147[12];
@OriginalMember(owner = "client!fe", name = "Lb", descriptor = "I")
public int chatLoops = 100;
@ -172,7 +174,7 @@ public abstract class PathingEntity extends Entity {
public int hitpointsBarVisibleUntil = -1000;
@OriginalMember(owner = "client!fe", name = "Rb", descriptor = "I")
protected int anInt3413 = -32768;
protected int minY = -32768;
@OriginalMember(owner = "client!fe", name = "Nb", descriptor = "I")
public int movementQueueSize = 0;
@ -193,7 +195,7 @@ public abstract class PathingEntity extends Entity {
private int anInt3355 = 0;
@OriginalMember(owner = "client!fe", name = "Mb", descriptor = "[I")
public final int[] anIntArray321 = new int[4];
public final int[] hitTypes = new int[4];
@OriginalMember(owner = "client!fe", name = "zb", descriptor = "I")
public int anInt3399 = 0;
@ -235,7 +237,7 @@ public abstract class PathingEntity extends Entity {
public int anInt3407 = 0;
@OriginalMember(owner = "client!fe", name = "ic", descriptor = "[I")
public final int[] anIntArray322 = new int[4];
public final int[] hitDamages = new int[4];
@OriginalMember(owner = "client!fe", name = "Ib", descriptor = "I")
public int anInt3405 = 0;
@ -266,12 +268,12 @@ public abstract class PathingEntity extends Entity {
@OriginalMember(owner = "client!fe", name = "b", descriptor = "(Z)Lclient!ck;")
public final BasType getBasType() {
@Pc(7) int local7 = this.method2688();
return local7 == -1 ? aClass20_1 : BasTypeList.get(local7);
@Pc(7) int basId = this.getBasId();
return basId == -1 ? BasType.DEFAULT : BasTypeList.get(basId);
}
@OriginalMember(owner = "client!fe", name = "a", descriptor = "(B)Z")
public boolean method2682() {
public boolean isVisible() {
return false;
}
@ -363,9 +365,9 @@ public abstract class PathingEntity extends Entity {
anInt2680 = 0;
anInt2640 = 0;
anInt1938 = 0;
@Pc(21) BasType local21 = this.getBasType();
@Pc(24) int local24 = local21.anInt1059;
@Pc(27) int local27 = local21.anInt1050;
@Pc(21) BasType type = this.getBasType();
@Pc(24) int local24 = type.anInt1059;
@Pc(27) int local27 = type.anInt1050;
if (local24 == 0 || local27 == 0) {
return;
}
@ -414,12 +416,12 @@ public abstract class PathingEntity extends Entity {
}
@OriginalMember(owner = "client!fe", name = "a", descriptor = "(IIII)V")
public final void addHit(@OriginalArg(0) int color, @OriginalArg(2) int arg1, @OriginalArg(3) int hitValue) {
public final void addHit(@OriginalArg(0) int type, @OriginalArg(2) int loop, @OriginalArg(3) int damage) {
for (@Pc(11) int i = 0; i < 4; i++) {
if (arg1 >= this.anIntArray319[i]) {
this.anIntArray322[i] = hitValue;
this.anIntArray321[i] = color;
this.anIntArray319[i] = arg1 + 70;
if (loop >= this.hitVisibleUntil[i]) {
this.hitDamages[i] = damage;
this.hitTypes[i] = type;
this.hitVisibleUntil[i] = loop + 70;
return;
}
}
@ -616,18 +618,17 @@ public abstract class PathingEntity extends Entity {
}
}
this.anInt3427 += this.anInt3423;
if (this.anInt3427 == 0) {
return;
}
if (this.anInt3427 != 0) {
local101 = this.anInt3427 >> 5 & 0x7FF;
local106 = arg0.getMinY() / 2;
arg0.translate(0, -local106, 0);
arg0.rotateX(local101);
arg0.translate(0, local106, 0);
}
}
@OriginalMember(owner = "client!fe", name = "b", descriptor = "(I)I")
protected abstract int method2688();
protected abstract int getBasId();
@OriginalMember(owner = "client!fe", name = "c", descriptor = "(I)V")
public final void method2689() {
@ -637,7 +638,7 @@ public abstract class PathingEntity extends Entity {
@OriginalMember(owner = "client!fe", name = "d", descriptor = "(I)I")
public final int method2691() {
return this.anInt3413 == -32768 ? 200 : -this.anInt3413;
return this.minY == -32768 ? 200 : -this.minY;
}
@OriginalMember(owner = "client!fe", name = "a", descriptor = "(II)V")

View file

@ -4,7 +4,7 @@ import org.openrs2.deob.annotation.OriginalClass;
import org.openrs2.deob.annotation.OriginalMember;
@OriginalClass("client!ub")
public final class Npc_Class147 {
public final class PathingEntity_Class147 {
@OriginalMember(owner = "client!ub", name = "b", descriptor = "I")
public int anInt5396;

View file

@ -130,7 +130,7 @@ public final class Player extends PathingEntity {
} else {
@Pc(68) SeqType local68 = SeqTypeList.get(local20);
@Pc(71) int local71 = local68.anInt5347;
@Pc(76) Npc_Class147 local76 = arg2.aClass147Array3[local30];
@Pc(76) PathingEntity_Class147 local76 = arg2.aClass147Array3[local30];
if (local76 != null) {
if (local20 == local76.anInt5396) {
if (local71 == 0) {
@ -150,7 +150,7 @@ public final class Player extends PathingEntity {
}
}
if (local76 == null) {
local76 = arg2.aClass147Array3[local30] = new Npc_Class147();
local76 = arg2.aClass147Array3[local30] = new PathingEntity_Class147();
local76.anInt5396 = local20;
local76.anInt5398 = 1;
local76.anInt5404 = 0;
@ -300,7 +300,7 @@ public final class Player extends PathingEntity {
@OriginalMember(owner = "client!e", name = "b", descriptor = "(I)I")
@Override
protected final int method2688() {
protected final int getBasId() {
return this.anInt3365;
}
@ -398,8 +398,8 @@ public final class Player extends PathingEntity {
this.xFine = this.movementQueueX[0] * 128 + this.getSize() * 64;
this.zFine = this.movementQueueZ[0] * 128 + this.getSize() * 64;
}
if (this.aClass47_Sub1_5 != null) {
this.aClass47_Sub1_5.method1646();
if (this.particleSystem != null) {
this.particleSystem.method1646();
}
}
@ -431,7 +431,7 @@ public final class Player extends PathingEntity {
if (local76 == null) {
return;
}
this.anInt3413 = local76.getMinY();
this.minY = local76.getMinY();
@Pc(184) Model local184;
if (Preferences.characterShadowsOn && (this.appearance.anInt2492 == -1 || NpcTypeList.get(this.appearance.anInt2492).shadow)) {
local184 = ShadowModelList.method1043(160, this.aBoolean171, local54 == null ? local25 : local54, this.xFine, 0, this.zFine, 0, 1, local76, arg0, local54 == null ? this.anInt3425 : this.anInt3407, this.anInt3424, 240);
@ -521,10 +521,10 @@ public final class Player extends PathingEntity {
}
if (GlRenderer.enabled) {
local76.aBoolean303 = true;
local76.render(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, this.aClass47_Sub1_5);
local76.render(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, this.particleSystem);
if (local184 != null) {
local184.aBoolean303 = true;
local184.render(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, this.aClass47_Sub1_5);
local184.render(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, this.particleSystem);
}
} else {
if (local184 != null) {
@ -534,7 +534,7 @@ public final class Player extends PathingEntity {
local76 = ((SoftwareModel) local76).method4588(local515);
}
local76.aBoolean303 = true;
local76.render(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, this.aClass47_Sub1_5);
local76.render(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, this.particleSystem);
}
if (local515 == null) {
return;
@ -575,7 +575,7 @@ public final class Player extends PathingEntity {
@OriginalMember(owner = "client!e", name = "a", descriptor = "(B)Z")
@Override
public final boolean method2682() {
public final boolean isVisible() {
return this.appearance != null;
}
@ -609,6 +609,6 @@ public final class Player extends PathingEntity {
@OriginalMember(owner = "client!e", name = "b", descriptor = "()I")
@Override
public final int getMinY() {
return this.anInt3413;
return this.minY;
}
}

View file

@ -217,7 +217,7 @@ public final class PlayerAppearance {
}
@OriginalMember(owner = "client!hh", name = "a", descriptor = "([Lclient!ub;ILclient!tk;Lclient!tk;IIIIZII)Lclient!ak;")
public final Model method1954(@OriginalArg(0) Npc_Class147[] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) SeqType arg2, @OriginalArg(3) SeqType arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(7) int arg6, @OriginalArg(9) int arg7, @OriginalArg(10) int arg8) {
public final Model method1954(@OriginalArg(0) PathingEntity_Class147[] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) SeqType arg2, @OriginalArg(3) SeqType arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(7) int arg6, @OriginalArg(9) int arg7, @OriginalArg(10) int arg8) {
if (this.anInt2492 != -1) {
return NpcTypeList.get(this.anInt2492).getBodyModel(arg0, arg5, arg8, arg1, arg6, arg7, arg2, arg4, arg3);
}

View file

@ -3324,7 +3324,7 @@ public class Protocol {
arg1.aClass147Array3[local25] = null;
} else {
@Pc(60) SeqType local60 = SeqTypeList.get(local15);
@Pc(65) Npc_Class147 local65 = arg1.aClass147Array3[local25];
@Pc(65) PathingEntity_Class147 local65 = arg1.aClass147Array3[local25];
@Pc(68) int local68 = local60.anInt5347;
if (local65 != null) {
if (local15 == local65.anInt5396) {
@ -3345,7 +3345,7 @@ public class Protocol {
}
}
if (local65 == null) {
local65 = arg1.aClass147Array3[local25] = new Npc_Class147();
local65 = arg1.aClass147Array3[local25] = new PathingEntity_Class147();
local65.anInt5398 = 1;
local65.anInt5404 = 0;
local65.anInt5408 = local23;

View file

@ -368,7 +368,7 @@ public final class ScriptRunner {
} else {
local17 = NpcList.npcs[NpcList.ids[local5 - PlayerList.size]];
}
if (local17 != null && local17.method2682()) {
if (local17 != null && local17.isVisible()) {
@Pc(58) NpcType local58;
if (local17 instanceof Npc) {
local58 = ((Npc) local17).type;
@ -500,7 +500,7 @@ public final class ScriptRunner {
}
}
for (local74 = 0; local74 < 4; local74++) {
if (local17.anIntArray319[local74] > client.loop) {
if (local17.hitVisibleUntil[local74] > client.loop) {
if (local17 instanceof Npc) {
@Pc(725) Npc local725 = (Npc) local17;
@Pc(728) NpcType local728 = local725.type;
@ -525,8 +525,8 @@ public final class ScriptRunner {
anInt548 -= 10;
anInt1951 += 15;
}
Sprites.hitmarks[local17.anIntArray321[local74]].render(arg2 + anInt1951 - 12, arg0 + anInt548 - 12);
Fonts.p11Full.renderCenter(JagString.parseInt(local17.anIntArray322[local74]), anInt1951 + arg2 - 1, anInt548 + 3 + arg0, 16777215, 0);
Sprites.hitmarks[local17.hitTypes[local74]].render(arg2 + anInt1951 - 12, arg0 + anInt548 - 12);
Fonts.p11Full.renderCenter(JagString.parseInt(local17.hitDamages[local74]), anInt1951 + arg2 - 1, anInt548 + 3 + arg0, 16777215, 0);
}
}
}
@ -678,7 +678,7 @@ public final class ScriptRunner {
} else {
local39 = PlayerList.players[PlayerList.ids[local28]];
}
if (local39 != null && local39.method2682()) {
if (local39 != null && local39.isVisible()) {
@Pc(55) int local55 = local39.getSize();
@Pc(77) int local77;
if (local55 == 1) {
@ -724,7 +724,7 @@ public final class ScriptRunner {
local39 = PlayerList.players[PlayerList.ids[local28]];
local272 = (long) PlayerList.ids[local28] << 32;
}
if (local39 != null && local39.method2682()) {
if (local39 != null && local39.isVisible()) {
local39.aBoolean98 = (Preferences.manyIdleAnimations && PlayerList.size > 200 || PlayerList.size > 50) && !arg0 && local39.movementSeqId == local39.getBasType().idleAnimationId;
local82 = local39.getSize();
if (local82 == 1) {
@ -804,7 +804,7 @@ public final class ScriptRunner {
@Pc(171) int local171;
for (local7 = 0; local7 < NpcList.size; local7++) {
local16 = NpcList.npcs[NpcList.ids[local7]];
if (local16 != null && local16.method2682() && local16.type.aBoolean182 == arg0 && local16.type.isMultiNpcValid()) {
if (local16 != null && local16.isVisible() && local16.type.aBoolean182 == arg0 && local16.type.isMultiNpcValid()) {
@Pc(42) int local42 = local16.getSize();
@Pc(97) int local97;
if (local42 == 1) {
@ -844,7 +844,7 @@ public final class ScriptRunner {
for (local7 = 0; local7 < NpcList.size; local7++) {
local16 = NpcList.npcs[NpcList.ids[local7]];
@Pc(262) long local262 = (long) NpcList.ids[local7] << 32 | 0x20000000L;
if (local16 != null && local16.method2682() && local16.type.aBoolean182 == arg0 && local16.type.isMultiNpcValid()) {
if (local16 != null && local16.isVisible() && local16.type.aBoolean182 == arg0 && local16.type.isMultiNpcValid()) {
local107 = local16.getSize();
if (local107 == 1) {
if ((local16.xFine & 0x7F) == 64 && (local16.zFine & 0x7F) == 64) {