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

84 lines
3.6 KiB
Java

package p000;
/* renamed from: r */
/* loaded from: microcounterstrike.jar:r.class */
public class BotAIController extends AiControllerBase {
/* JADX WARN: Removed duplicated region for block: B:37:0x009c */
@Override // p000.AiControllerBase
/* renamed from: a */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public final void execute115(p000.PlayerEntityBase r5) {
/*
Method dump skipped, instructions count: 204
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: p000.BotAIController.execute115(u):void");
}
/* JADX WARN: Multi-variable type inference failed */
/* renamed from: a */
private boolean getBoolean274(PlayerEntityBase abstractC0052u, int i) {
Combatant interfaceC0030bc = (Combatant) abstractC0052u;
execute275(abstractC0052u);
if (i == 1) {
abstractC0052u.getFloat248(0.1f);
} else {
abstractC0052u.getFloat249(0.3f);
}
if (MainUiCanvasBase.getInstance().soundEnabled) {
int i2 = interfaceC0030bc.getLoadout().getActiveWeaponInfo().weaponCode;
if (i2 == 10) {
SoundManager.getInstance().execute199(1);
} else if (i2 == 11) {
SoundManager.getInstance().execute199(2);
} else if (i2 == 20) {
SoundManager.getInstance().execute199(3);
}
}
interfaceC0030bc.handleAction();
return true;
}
/* renamed from: c */
private static void execute275(PlayerEntityBase abstractC0052u) {
PlayerEntityBase abstractC0052u2 = PlayerManager.getInstance().localPlayer;
float[] fArrM289i = abstractC0052u.getFloatArray289();
float[] fArrM289i2 = abstractC0052u2.getFloatArray289();
float[] fArr = {fArrM289i2[0] - fArrM289i[0], 0.0f, fArrM289i2[2] - fArrM289i[2]};
float[] fArrM287a = abstractC0052u.compute287(1, 3.0f);
float degrees = (float) Math.toDegrees((float) FastAcos.getDouble78(VectorMath.getFloat259(fArrM287a, fArr) / (Math.sqrt(((fArrM287a[0] * fArrM287a[0]) + (fArrM287a[1] * fArrM287a[1])) + (fArrM287a[2] * fArrM287a[2])) * Math.sqrt(((fArr[0] * fArr[0]) + (fArr[1] * fArr[1])) + (fArr[2] * fArr[2])))));
if (VectorMath.getFloatArray260(fArrM287a, fArr)[1] < 0.0f) {
abstractC0052u.getFloat251(degrees);
} else {
abstractC0052u.getFloat250(degrees);
}
}
/* renamed from: a */
private static void execute276(NetworkPlayerEntity c0045n) {
int iNextInt = RandomUtil.random237.nextInt(25);
if (iNextInt % 2 == 0) {
c0045n.getFloat250(iNextInt);
} else {
c0045n.getFloat251(iNextInt);
}
}
/* renamed from: b */
private static void execute277(NetworkPlayerEntity c0045n) {
float[] fArrM287a = c0045n.compute287(1, 3.0f);
SphereCollider c0023awM283c = c0045n.getSphereCollider283(fArrM287a);
float[] fArrM247a = c0045n.getFloatArray247(fArrM287a);
if (c0045n.findHitTarget(c0023awM283c) == null && fArrM247a[0] == fArrM287a[0] && fArrM247a[1] == fArrM287a[1] && fArrM247a[2] == fArrM287a[2]) {
c0045n.execute252(1, fArrM247a);
} else if (RandomUtil.random237.nextInt(2) == 0) {
c0045n.getFloat250(70.0f);
} else {
c0045n.getFloat251(70.0f);
}
}
}