Files
micro-counter-strike-decomp…/p000/PlayerModel.java
2026-03-18 12:51:32 +03:00

314 lines
13 KiB
Java

package p000;
import java.io.IOException;
import javax.microedition.m3g.Group;
import javax.microedition.m3g.Loader;
import javax.microedition.m3g.Node;
import javax.microedition.m3g.Object3D;
import javax.microedition.m3g.Transform;
import javax.microedition.m3g.World;
/* renamed from: t */
/* loaded from: microcounterstrike.jar:t.class */
public final class PlayerModel extends PlayerModelBase {
/* renamed from: d */
public Group group238;
/* renamed from: e */
public Group group239;
/* renamed from: f */
public Group group240;
/* renamed from: g */
public Group group241;
/* renamed from: r */
private Group group242;
/* renamed from: s */
private Group group243;
/* renamed from: h */
public Node node244;
/* renamed from: i */
public Node node245;
/* renamed from: j */
public Node node246;
/* renamed from: k */
public Node node247;
/* renamed from: l */
public static float[] value248;
/* renamed from: m */
public static float[] value249;
/* renamed from: t */
private static PlayerModelBase playerModelBase250;
/* renamed from: n */
public static final int[][] CONST_VALUE251 = {new int[]{9, 6}, new int[]{0, 9}, new int[]{0, 9}, new int[]{0, 9}, new int[]{0, 9}};
/* renamed from: o */
public int value252;
/* renamed from: p */
public float[][] value253;
/* renamed from: q */
public float[][] value254;
/* JADX WARN: Type inference failed for: r1v7, types: [float[], float[][]] */
/* JADX WARN: Type inference failed for: r1v9, types: [float[], float[][]] */
public PlayerModel(PlayerEntityBase abstractC0052u) {
super(abstractC0052u);
float[] fArr = {30.0f, 30.0f, -30.0f, -30.0f};
this.value252 = -1;
this.value253 = new float[]{new float[]{1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f}, new float[]{0.90763855f, 0.2431984f, 0.34201813f, -0.25881195f, 0.96591187f, 0.0f, -0.33035278f, -0.08851814f, 0.939682f}, new float[]{0.64785767f, 0.42536163f, 0.6318054f, -0.4848938f, 0.8700409f, -0.08851814f, -0.5873413f, -0.24901581f, 0.7700043f}, new float[]{0.26921082f, 0.5124817f, 0.81526184f, -0.6360321f, 0.73028564f, -0.24901581f, -0.7230072f, -0.45152283f, 0.52267456f}, new float[]{-0.27770233f, 0.6833954f, 0.67500305f, -0.89030457f, 0.08068085f, -0.447937f, -0.36060333f, -0.72540283f, 0.58613586f}, new float[]{0.32598114f, 0.7307129f, 0.5997009f, -0.83987427f, 0.51504517f, -0.17100525f, -0.43384552f, -0.44792938f, 0.7816925f}};
this.value254 = new float[]{new float[]{1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f}, new float[]{0.9698334f, 0.17100525f, -0.17364502f, -0.17364502f, 0.98480225f, 0.0f, 0.17100525f, 0.03015232f, 0.98480225f}, new float[]{0.8811493f, 0.32901f, -0.33940887f, -0.33940887f, 0.9401245f, 0.03015232f, 0.32900238f, 0.08862877f, 0.9401245f}, new float[]{0.7393646f, 0.46444702f, -0.48724365f, -0.48724365f, 0.8686981f, 0.08862877f, 0.4644394f, 0.17188644f, 0.8686981f}};
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r0v1, types: [javax.microedition.m3g.Object3D[]] */
/* JADX WARN: Type inference failed for: r0v2, types: [java.lang.Throwable] */
/* JADX WARN: Type inference failed for: r0v67, types: [javax.microedition.m3g.Object3D[]] */
@Override // p000.PlayerModelBase
/* renamed from: a */
public final Node loadM3G0(World world) {
?? Load = (Object3D[]) 0;
World[] worldArr = Load;
try {
Load = Loader.load("/res/role/terrorist.m3g");
worldArr = Load;
} catch (IOException e) {
Load.printStackTrace();
}
World world2 = null;
for (int i = 0; i < worldArr.length; i++) {
if (worldArr[i] instanceof World) {
world2 = worldArr[i];
}
}
this.node235 = world2.find(124);
world2.removeChild(this.node235);
if (playerModelBase250 != null) {
PlayerModelBase.execute272(playerModelBase250.node235, this.node235);
}
if (((Combatant) this.playerEntityBase236).getTeamId() == 0) {
this.node235.getAppearance(0).getTexture(0).setImage(ResourceLoader.loadImages132("/res/role/c_32X32.png"));
}
this.node244 = this.node235.find(114);
this.node244.setRenderingEnable(true);
this.node245 = this.node235.find(116);
this.node245.setRenderingEnable(false);
this.node246 = this.node235.find(118);
this.node246.setRenderingEnable(false);
this.node247 = this.node235.find(120);
this.node247.setRenderingEnable(false);
Group skeleton = this.node235.getSkeleton();
this.group238 = skeleton.find(108);
this.group239 = skeleton.find(107);
this.group240 = skeleton.find(106);
this.group241 = skeleton.find(101);
this.group242 = skeleton.find(111);
this.group243 = skeleton.find(121);
world.addChild(this.node235);
Transform transform = new Transform();
world.getTransformTo(this.node235, transform);
float[] fArr = {0.0f, 1.0f, 0.0f, 0.0f};
transform.transform(fArr);
this.node235.postRotate(180.0f, fArr[0], fArr[1], fArr[2]);
if (playerModelBase250 == null) {
execute278(world);
playerModelBase250 = this;
}
this.node234 = this.node235;
return this.node235;
}
@Override // p000.PlayerModelBase
/* renamed from: a */
public final void execute271() {
super.execute271();
this.group238 = null;
this.group239 = null;
this.group240 = null;
this.group241 = null;
playerModelBase250 = null;
}
/* renamed from: b */
private void execute278(World world) {
Transform transform = new Transform();
world.getTransformTo(this.group240, transform);
float[] fArr = {1.0f, 0.0f, 0.0f, 0.0f};
transform.transform(fArr);
value248 = new float[3];
value248[0] = fArr[0];
value248[1] = fArr[1];
value248[2] = fArr[2];
float[] fArr2 = {0.0f, 1.0f, 0.0f, 0.0f};
transform.transform(fArr2);
value249 = new float[3];
value249[0] = fArr2[0];
value249[1] = fArr2[1];
value249[2] = fArr2[2];
}
/* renamed from: b */
public final void execute279() {
if (this.value252 == -1) {
this.value252 = 0;
}
}
/* renamed from: c */
public final void execute280() {
if (this.value252 >= 0) {
this.value252++;
Transform transform = new Transform();
this.group242.getTransform(transform);
float[] fArr = new float[16];
transform.get(fArr);
Transform transform2 = new Transform();
this.group243.getTransform(transform2);
float[] fArr2 = new float[16];
transform2.get(fArr2);
switch (this.value252) {
case 1:
fArr[0] = this.value253[1][0];
fArr[1] = this.value253[1][1];
fArr[2] = this.value253[1][2];
fArr[4] = this.value253[1][3];
fArr[5] = this.value253[1][4];
fArr[6] = this.value253[1][5];
fArr[8] = this.value253[1][6];
fArr[9] = this.value253[1][7];
fArr[10] = this.value253[1][8];
fArr2[0] = this.value254[1][0];
fArr2[1] = this.value254[1][1];
fArr2[2] = this.value254[1][2];
fArr2[4] = this.value254[1][3];
fArr2[5] = this.value254[1][4];
fArr2[6] = this.value254[1][5];
fArr2[8] = this.value254[1][6];
fArr2[9] = this.value254[1][7];
fArr2[10] = this.value254[1][8];
break;
case 2:
fArr[0] = this.value253[2][0];
fArr[1] = this.value253[2][1];
fArr[2] = this.value253[2][2];
fArr[4] = this.value253[2][3];
fArr[5] = this.value253[2][4];
fArr[6] = this.value253[2][5];
fArr[8] = this.value253[2][6];
fArr[9] = this.value253[2][7];
fArr[10] = this.value253[2][8];
fArr2[0] = this.value254[2][0];
fArr2[1] = this.value254[2][1];
fArr2[2] = this.value254[2][2];
fArr2[4] = this.value254[2][3];
fArr2[5] = this.value254[2][4];
fArr2[6] = this.value254[2][5];
fArr2[8] = this.value254[2][6];
fArr2[9] = this.value254[2][7];
fArr2[10] = this.value254[2][8];
break;
case 3:
fArr[0] = this.value253[3][0];
fArr[1] = this.value253[3][1];
fArr[2] = this.value253[3][2];
fArr[4] = this.value253[3][3];
fArr[5] = this.value253[3][4];
fArr[6] = this.value253[3][5];
fArr[8] = this.value253[3][6];
fArr[9] = this.value253[3][7];
fArr[10] = this.value253[3][8];
fArr2[0] = this.value254[3][0];
fArr2[1] = this.value254[3][1];
fArr2[2] = this.value254[3][2];
fArr2[4] = this.value254[3][3];
fArr2[5] = this.value254[3][4];
fArr2[6] = this.value254[3][5];
fArr2[8] = this.value254[3][6];
fArr2[9] = this.value254[3][7];
fArr2[10] = this.value254[3][8];
break;
case 4:
fArr[0] = this.value253[4][0];
fArr[1] = this.value253[4][1];
fArr[2] = this.value253[4][2];
fArr[4] = this.value253[4][3];
fArr[5] = this.value253[4][4];
fArr[6] = this.value253[4][5];
fArr[8] = this.value253[4][6];
fArr[9] = this.value253[4][7];
fArr[10] = this.value253[4][8];
fArr2[0] = this.value254[2][0];
fArr2[1] = this.value254[2][1];
fArr2[2] = this.value254[2][2];
fArr2[4] = this.value254[2][3];
fArr2[5] = this.value254[2][4];
fArr2[6] = this.value254[2][5];
fArr2[8] = this.value254[2][6];
fArr2[9] = this.value254[2][7];
fArr2[10] = this.value254[2][8];
break;
case 5:
fArr[0] = this.value253[5][0];
fArr[1] = this.value253[5][1];
fArr[2] = this.value253[5][2];
fArr[4] = this.value253[5][3];
fArr[5] = this.value253[5][4];
fArr[6] = this.value253[5][5];
fArr[8] = this.value253[5][6];
fArr[9] = this.value253[5][7];
fArr[10] = this.value253[5][8];
fArr2[0] = this.value254[1][0];
fArr2[1] = this.value254[1][1];
fArr2[2] = this.value254[1][2];
fArr2[4] = this.value254[1][3];
fArr2[5] = this.value254[1][4];
fArr2[6] = this.value254[1][5];
fArr2[8] = this.value254[1][6];
fArr2[9] = this.value254[1][7];
fArr2[10] = this.value254[1][8];
break;
case 6:
fArr[0] = this.value253[0][0];
fArr[1] = this.value253[0][1];
fArr[2] = this.value253[0][2];
fArr[4] = this.value253[0][3];
fArr[5] = this.value253[0][4];
fArr[6] = this.value253[0][5];
fArr[8] = this.value253[0][6];
fArr[9] = this.value253[0][7];
fArr[10] = this.value253[0][8];
fArr2[0] = this.value254[0][0];
fArr2[1] = this.value254[0][1];
fArr2[2] = this.value254[0][2];
fArr2[4] = this.value254[0][3];
fArr2[5] = this.value254[0][4];
fArr2[6] = this.value254[0][5];
fArr2[8] = this.value254[0][6];
fArr2[9] = this.value254[0][7];
fArr2[10] = this.value254[0][8];
break;
}
transform.set(fArr);
this.group242.setTransform(transform);
transform2.set(fArr2);
this.group243.setTransform(transform2);
if (this.value252 >= 6) {
this.value252 = -1;
}
}
}
}