From 50b60dc92aa18f1f9ae5dd5c93932be0e891e811 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sun, 26 Dec 2021 15:12:58 +1000 Subject: [PATCH] Rename bot files and functions --- docs/piracychecks.md | 4 +- ld/gamefiles.ntsc-beta.inc | 11 +- ld/gamefiles.ntsc-final.inc | 11 +- ld/gamefiles.pal-final.inc | 11 +- src/game/activemenu/activemenu.c | 62 +- src/game/bondgun.c | 68 +- src/game/bondwalk.c | 4 +- src/game/{game_190260.c => bot.c} | 1365 +++++++++++----------- src/game/{game_1999b0.c => botact.c} | 112 +- src/game/{game_197600.c => botcmd.c} | 176 +-- src/game/botinv.c | 1167 ++++++++++++++++++ src/game/{game_014e90.c => botinvinit.c} | 18 +- src/game/botmgr.c | 278 +++++ src/game/chr/chr.c | 18 +- src/game/chr/chraction.c | 47 +- src/game/filemgr.c | 20 +- src/game/game_00c490.c | 4 +- src/game/game_011110.c | 6 +- src/game/game_0147d0.c | 265 +---- src/game/game_01bea0.c | 54 +- src/game/game_0b0fd0.c | 2 +- src/game/game_0b69d0.c | 40 +- src/game/game_0f09f0.c | 8 +- src/game/game_127910.c | 4 +- src/game/game_197c00.c | 1076 ----------------- src/game/game_19aa80.c | 34 +- src/game/lv.c | 8 +- src/game/menu/items.c | 12 +- src/game/mplayer/ingame.c | 38 +- src/game/mplayer/mpaicommands.c | 4 +- src/game/mplayer/mplayer.c | 554 ++++----- src/game/mplayer/scenarios.c | 232 ++-- src/game/mplayer/setup.c | 252 ++-- src/game/mpstats.c | 34 +- src/game/options.c | 80 +- src/game/prop.c | 18 +- src/game/propobj.c | 70 +- src/game/radar.c | 24 +- src/game/title.c | 4 +- src/include/bss.h | 12 +- src/include/constants.h | 65 +- src/include/data.h | 4 +- src/include/game/bot.h | 55 + src/include/game/botact.h | 25 + src/include/game/botcmd.h | 10 + src/include/game/botinv.h | 30 + src/include/game/botinvinit.h | 9 + src/include/game/game_0147d0.h | 4 +- src/include/game/game_014e90.h | 9 - src/include/game/game_190260.h | 55 - src/include/game/game_197600.h | 32 - src/include/game/game_1999b0.h | 25 - src/include/game/mplayer/mplayer.h | 6 +- src/include/game/mplayer/scenarios.h | 10 +- src/include/types.h | 36 +- src/lib/gvars.c | 2 +- src/lib/joy.c | 2 +- src/mpconfigs.c | 712 +++++------ tools/mkrom/piracy.c | 4 +- 59 files changed, 3732 insertions(+), 3570 deletions(-) rename src/game/{game_190260.c => bot.c} (93%) rename src/game/{game_1999b0.c => botact.c} (76%) rename src/game/{game_197600.c => botcmd.c} (78%) create mode 100644 src/game/botinv.c rename src/game/{game_014e90.c => botinvinit.c} (51%) create mode 100644 src/game/botmgr.c delete mode 100644 src/game/game_197c00.c create mode 100644 src/include/game/bot.h create mode 100644 src/include/game/botact.h create mode 100644 src/include/game/botcmd.h create mode 100644 src/include/game/botinv.h create mode 100644 src/include/game/botinvinit.h delete mode 100644 src/include/game/game_014e90.h delete mode 100644 src/include/game/game_190260.h delete mode 100644 src/include/game/game_197600.h delete mode 100644 src/include/game/game_1999b0.h diff --git a/docs/piracychecks.md b/docs/piracychecks.md index 6c47f36e2..7597e5100 100644 --- a/docs/piracychecks.md +++ b/docs/piracychecks.md @@ -42,7 +42,7 @@ The decomp project wraps all decompiled piracy checks in `#if PIRACYCHECKS` stat **Payload:** Rewrites the start of `func0f08f968` so it immediately returns false. This makes it impossible to open doors. -### propobjHandlePickupByAibot +### botPickupProp **When Called:** When a simulant in multiplayer picks up an item. @@ -54,7 +54,7 @@ The decomp project wraps all decompiled piracy checks in `#if PIRACYCHECKS` stat **When Called:** When a guard uncloaks. -**What It Checks:** Checksums `propobjHandlePickupByAibot` to make sure it hasn't been modified. +**What It Checks:** Checksums `botPickupProp` to make sure it hasn't been modified. **Payload:** Disables the ability for the player and other characters to go up or down slopes. This is done by nopping the `jr ra` instruction in `cdFindGroundY`, which causes it to flow into the following function, which unconditionally returns false and only exists for this purpose. diff --git a/ld/gamefiles.ntsc-beta.inc b/ld/gamefiles.ntsc-beta.inc index d6f23a96a..c05c22cfc 100644 --- a/ld/gamefiles.ntsc-beta.inc +++ b/ld/gamefiles.ntsc-beta.inc @@ -47,7 +47,8 @@ build/ROMID/game/game_013ee0.o (section); \ build/ROMID/game/game_0147a0.o (section); \ build/ROMID/game/game_0147d0.o (section); \ - build/ROMID/game/game_014e90.o (section); \ + build/ROMID/game/botmgr.o (section); \ + build/ROMID/game/botinvinit.o (section); \ build/ROMID/game/game_014f10.o (section); \ build/ROMID/game/game_015010.o (section); \ build/ROMID/game/game_0150a0.o (section); \ @@ -203,10 +204,10 @@ build/ROMID/game/mplayer/scenarios.o (section); \ build/ROMID/game/mplayer/mplayer.o (section); \ build/ROMID/game/radar.o (section); \ - build/ROMID/game/game_190260.o (section); \ - build/ROMID/game/game_197600.o (section); \ - build/ROMID/game/game_197c00.o (section); \ - build/ROMID/game/game_1999b0.o (section); \ + build/ROMID/game/bot.o (section); \ + build/ROMID/game/botcmd.o (section); \ + build/ROMID/game/botinv.o (section); \ + build/ROMID/game/botact.o (section); \ build/ROMID/game/mplayer/mpaicommands.o (section); \ build/ROMID/game/vmstats.o (section); \ build/ROMID/game/game_19aa80.o (section); \ diff --git a/ld/gamefiles.ntsc-final.inc b/ld/gamefiles.ntsc-final.inc index 69de1b13e..79aaf6a6d 100644 --- a/ld/gamefiles.ntsc-final.inc +++ b/ld/gamefiles.ntsc-final.inc @@ -47,7 +47,8 @@ build/ROMID/game/game_013ee0.o (section); \ build/ROMID/game/game_0147a0.o (section); \ build/ROMID/game/game_0147d0.o (section); \ - build/ROMID/game/game_014e90.o (section); \ + build/ROMID/game/botmgr.o (section); \ + build/ROMID/game/botinvinit.o (section); \ build/ROMID/game/game_014f10.o (section); \ build/ROMID/game/game_015010.o (section); \ build/ROMID/game/game_0150a0.o (section); \ @@ -202,10 +203,10 @@ build/ROMID/game/mplayer/scenarios.o (section); \ build/ROMID/game/mplayer/mplayer.o (section); \ build/ROMID/game/radar.o (section); \ - build/ROMID/game/game_190260.o (section); \ - build/ROMID/game/game_197600.o (section); \ - build/ROMID/game/game_197c00.o (section); \ - build/ROMID/game/game_1999b0.o (section); \ + build/ROMID/game/bot.o (section); \ + build/ROMID/game/botcmd.o (section); \ + build/ROMID/game/botinv.o (section); \ + build/ROMID/game/botact.o (section); \ build/ROMID/game/mplayer/mpaicommands.o (section); \ build/ROMID/game/vmstats.o (section); \ build/ROMID/game/game_19aa80.o (section); \ diff --git a/ld/gamefiles.pal-final.inc b/ld/gamefiles.pal-final.inc index 69de1b13e..79aaf6a6d 100644 --- a/ld/gamefiles.pal-final.inc +++ b/ld/gamefiles.pal-final.inc @@ -47,7 +47,8 @@ build/ROMID/game/game_013ee0.o (section); \ build/ROMID/game/game_0147a0.o (section); \ build/ROMID/game/game_0147d0.o (section); \ - build/ROMID/game/game_014e90.o (section); \ + build/ROMID/game/botmgr.o (section); \ + build/ROMID/game/botinvinit.o (section); \ build/ROMID/game/game_014f10.o (section); \ build/ROMID/game/game_015010.o (section); \ build/ROMID/game/game_0150a0.o (section); \ @@ -202,10 +203,10 @@ build/ROMID/game/mplayer/scenarios.o (section); \ build/ROMID/game/mplayer/mplayer.o (section); \ build/ROMID/game/radar.o (section); \ - build/ROMID/game/game_190260.o (section); \ - build/ROMID/game/game_197600.o (section); \ - build/ROMID/game/game_197c00.o (section); \ - build/ROMID/game/game_1999b0.o (section); \ + build/ROMID/game/bot.o (section); \ + build/ROMID/game/botcmd.o (section); \ + build/ROMID/game/botinv.o (section); \ + build/ROMID/game/botact.o (section); \ build/ROMID/game/mplayer/mpaicommands.o (section); \ build/ROMID/game/vmstats.o (section); \ build/ROMID/game/game_19aa80.o (section); \ diff --git a/src/game/activemenu/activemenu.c b/src/game/activemenu/activemenu.c index 6be8a823f..bd0894846 100644 --- a/src/game/activemenu/activemenu.c +++ b/src/game/activemenu/activemenu.c @@ -10,8 +10,8 @@ #include "game/inventory/inventory.h" #include "game/game_1531a0.h" #include "game/file.h" -#include "game/game_190260.h" -#include "game/game_197600.h" +#include "game/bot.h" +#include "game/botcmd.h" #include "game/gfxmemory.h" #include "game/training/training.h" #include "game/lang.h" @@ -149,9 +149,9 @@ glabel var7f1b2cd8 /* f0fd740: 0338c821 */ addu $t9,$t9,$t8 /* f0fd744: 93392103 */ lbu $t9,%lo(g_AmMenus+0x33)($t9) /* f0fd748: 256b9fc0 */ addiu $t3,$t3,%lo(g_Vars) -/* f0fd74c: 3c06800b */ lui $a2,%hi(g_MpNumPlayers) +/* f0fd74c: 3c06800b */ lui $a2,%hi(g_MpNumChrs) /* f0fd750: 1320004b */ beqz $t9,.L0f0fd880 -/* f0fd754: 3c0e800b */ lui $t6,%hi(g_MpNumPlayers) +/* f0fd754: 3c0e800b */ lui $t6,%hi(g_MpNumChrs) /* f0fd758: 8d6e0284 */ lw $t6,0x284($t3) /* f0fd75c: 8d6c006c */ lw $t4,0x6c($t3) /* f0fd760: 00002825 */ or $a1,$zero,$zero @@ -185,15 +185,15 @@ glabel var7f1b2cd8 /* f0fd7c4: 10000001 */ b .L0f0fd7cc /* f0fd7c8: 24030001 */ addiu $v1,$zero,0x1 .L0f0fd7cc: -/* f0fd7cc: 8cc6c530 */ lw $a2,%lo(g_MpNumPlayers)($a2) +/* f0fd7cc: 8cc6c530 */ lw $a2,%lo(g_MpNumChrs)($a2) /* f0fd7d0: 0064c821 */ addu $t9,$v1,$a0 /* f0fd7d4: 03277021 */ addu $t6,$t9,$a3 /* f0fd7d8: 01c91021 */ addu $v0,$t6,$t1 /* f0fd7dc: 0046082a */ slt $at,$v0,$a2 /* f0fd7e0: 10200010 */ beqz $at,.L0f0fd824 /* f0fd7e4: 0002c080 */ sll $t8,$v0,0x2 -/* f0fd7e8: 3c19800b */ lui $t9,%hi(g_MpPlayerChrs) -/* f0fd7ec: 2739c4d0 */ addiu $t9,$t9,%lo(g_MpPlayerChrs) +/* f0fd7e8: 3c19800b */ lui $t9,%hi(g_MpAllChrPtrs) +/* f0fd7ec: 2739c4d0 */ addiu $t9,$t9,%lo(g_MpAllChrPtrs) /* f0fd7f0: 00067080 */ sll $t6,$a2,0x2 /* f0fd7f4: 01d92021 */ addu $a0,$t6,$t9 /* f0fd7f8: 03191021 */ addu $v0,$t8,$t9 @@ -239,7 +239,7 @@ glabel var7f1b2cd8 /* f0fd878: 100000f9 */ b .L0f0fdc60 /* f0fd87c: af050000 */ sw $a1,0x0($t8) .L0f0fd880: -/* f0fd880: 8dcec530 */ lw $t6,%lo(g_MpNumPlayers)($t6) +/* f0fd880: 8dcec530 */ lw $t6,%lo(g_MpNumChrs)($t6) /* f0fd884: 8faf00c0 */ lw $t7,0xc0($sp) /* f0fd888: 25d9ffff */ addiu $t9,$t6,-1 /* f0fd88c: 100000f4 */ b .L0f0fdc60 @@ -258,8 +258,8 @@ glabel var7f1b2cd8 /* f0fd8c0: 8f020000 */ lw $v0,0x0($t8) /* f0fd8c4: 81580000 */ lb $t8,0x0($t2) /* f0fd8c8: 8d670284 */ lw $a3,0x284($t3) -/* f0fd8cc: 3c09800b */ lui $t1,%hi(g_MpPlayerChrs) -/* f0fd8d0: 2529c4d0 */ addiu $t1,$t1,%lo(g_MpPlayerChrs) +/* f0fd8cc: 3c09800b */ lui $t1,%hi(g_MpAllChrPtrs) +/* f0fd8d0: 2529c4d0 */ addiu $t1,$t1,%lo(g_MpAllChrPtrs) /* f0fd8d4: 00f87021 */ addu $t6,$a3,$t8 /* f0fd8d8: 91d91be5 */ lbu $t9,0x1be5($t6) /* f0fd8dc: 3c06800b */ lui $a2,%hi(var800ac4cc) @@ -303,14 +303,14 @@ glabel var7f1b2cd8 .L0f0fd964: /* f0fd964: 91f81be7 */ lbu $t8,0x1be7($t7) /* f0fd968: 8ccf0000 */ lw $t7,0x0($a2) -/* f0fd96c: 3c09800b */ lui $t1,%hi(g_MpPlayerChrs) -/* f0fd970: 2529c4d0 */ addiu $t1,$t1,%lo(g_MpPlayerChrs) +/* f0fd96c: 3c09800b */ lui $t1,%hi(g_MpAllChrPtrs) +/* f0fd970: 2529c4d0 */ addiu $t1,$t1,%lo(g_MpAllChrPtrs) /* f0fd974: 00187080 */ sll $t6,$t8,0x2 /* f0fd978: 012ec821 */ addu $t9,$t1,$t6 /* f0fd97c: 8f240000 */ lw $a0,0x0($t9) /* f0fd980: 8de5001c */ lw $a1,0x1c($t7) /* f0fd984: afa6004c */ sw $a2,0x4c($sp) -/* f0fd988: 0fc6490e */ jal mpAibotApplyAttack +/* f0fd988: 0fc6490e */ jal botApplyAttack /* f0fd98c: afa20098 */ sw $v0,0x98($sp) /* f0fd990: 3c0b800a */ lui $t3,%hi(g_Vars) /* f0fd994: 256b9fc0 */ addiu $t3,$t3,%lo(g_Vars) @@ -325,7 +325,7 @@ glabel var7f1b2cd8 /* f0fd9b8: 10000003 */ b .L0f0fd9c8 /* f0fd9bc: 00000000 */ nop .L0f0fd9c0: -/* f0fd9c0: 0fc6490e */ jal mpAibotApplyAttack +/* f0fd9c0: 0fc6490e */ jal botApplyAttack /* f0fd9c4: 8c65001c */ lw $a1,0x1c($v1) .L0f0fd9c8: /* f0fd9c8: 0fc3cdb7 */ jal menuPopDialog @@ -354,7 +354,7 @@ glabel var7f1b2cd8 /* f0fda24: 8de30004 */ lw $v1,0x4($t7) /* f0fda28: 814f0000 */ lb $t7,0x0($t2) /* f0fda2c: 8d670284 */ lw $a3,0x284($t3) -/* f0fda30: 3c09800b */ lui $t1,%hi(g_MpPlayerChrs) +/* f0fda30: 3c09800b */ lui $t1,%hi(g_MpAllChrPtrs) /* f0fda34: 3c04800b */ lui $a0,%hi(var800ac4cc) /* f0fda38: 00ef7021 */ addu $t6,$a3,$t7 /* f0fda3c: 91d91be5 */ lbu $t9,0x1be5($t6) @@ -362,7 +362,7 @@ glabel var7f1b2cd8 /* f0fda44: 2484c4cc */ addiu $a0,$a0,%lo(var800ac4cc) /* f0fda48: 0019c080 */ sll $t8,$t9,0x2 /* f0fda4c: 01384821 */ addu $t1,$t1,$t8 -/* f0fda50: 8d29c4d0 */ lw $t1,%lo(g_MpPlayerChrs)($t1) +/* f0fda50: 8d29c4d0 */ lw $t1,%lo(g_MpAllChrPtrs)($t1) /* f0fda54: 91480033 */ lbu $t0,0x33($t2) /* f0fda58: 2405fffc */ addiu $a1,$zero,-4 /* f0fda5c: 8de60004 */ lw $a2,0x4($t7) @@ -388,8 +388,8 @@ glabel var7f1b2cd8 .L0f0fdaa0: /* f0fdaa0: 0463fff0 */ bgezl $v1,.L0f0fda64 /* f0fdaa4: 24a50004 */ addiu $a1,$a1,0x4 -/* f0fdaa8: 3c0f800b */ lui $t7,%hi(var800ac500) -/* f0fdaac: 25efc500 */ addiu $t7,$t7,%lo(var800ac500) +/* f0fdaa8: 3c0f800b */ lui $t7,%hi(g_MpAllChrConfigPtrs) +/* f0fdaac: 25efc500 */ addiu $t7,$t7,%lo(g_MpAllChrConfigPtrs) /* f0fdab0: 00af7021 */ addu $t6,$a1,$t7 /* f0fdab4: afae0058 */ sw $t6,0x58($sp) /* f0fdab8: 8dd80000 */ lw $t8,0x0($t6) @@ -680,7 +680,7 @@ void amApply(s32 slot) case 1: // Function if (g_Vars.currentplayer->gunctrl.weaponnum >= WEAPON_UNARMED && g_Vars.currentplayer->gunctrl.weaponnum <= WEAPON_COMBATBOOST - && g_MpPlayers[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << (g_Vars.currentplayer->gunctrl.weaponnum - 1 & 7))) { + && g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << (g_Vars.currentplayer->gunctrl.weaponnum - 1 & 7))) { if (slot == 1) { g_AmMenus[g_AmIndex].togglefunc = true; } @@ -706,10 +706,10 @@ void amApply(s32 slot) } else if (g_Vars.normmplayerisrunning) { if (g_AmMenus[g_AmIndex].allbots) { for (i = 0; i < g_Vars.currentplayer->numaibuddies; i++) { - mpAibotApplyCommand(g_MpPlayerChrs[g_Vars.currentplayer->aibuddynums[i]], g_AmBotCommands[slot]); + botcmdApply(g_MpAllChrPtrs[g_Vars.currentplayer->aibuddynums[i]], g_AmBotCommands[slot]); } } else { - mpAibotApplyCommand(g_MpPlayerChrs[g_Vars.currentplayer->aibuddynums[g_AmMenus[g_AmIndex].screenindex - 2]], g_AmBotCommands[slot]); + botcmdApply(g_MpAllChrPtrs[g_Vars.currentplayer->aibuddynums[g_AmMenus[g_AmIndex].screenindex - 2]], g_AmBotCommands[slot]); } } } @@ -778,7 +778,7 @@ void amGetSlotDetails(s32 slot, u32 *flags, char *label) if (!secfunc || g_Vars.currentplayer->gunctrl.weaponnum < WEAPON_UNARMED || g_Vars.currentplayer->gunctrl.weaponnum > WEAPON_COMBATBOOST - || (g_MpPlayers[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << (g_Vars.currentplayer->gunctrl.weaponnum - 1 & 7))) == 0) { + || (g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << (g_Vars.currentplayer->gunctrl.weaponnum - 1 & 7))) == 0) { *flags |= AMSLOTFLAG_CURRENT; } @@ -789,7 +789,7 @@ void amGetSlotDetails(s32 slot, u32 *flags, char *label) if (!prifunc || ( g_Vars.currentplayer->gunctrl.weaponnum >= WEAPON_UNARMED && g_Vars.currentplayer->gunctrl.weaponnum <= WEAPON_COMBATBOOST - && g_MpPlayers[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << (g_Vars.currentplayer->gunctrl.weaponnum - 1 & 7)))) { + && g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << (g_Vars.currentplayer->gunctrl.weaponnum - 1 & 7)))) { *flags |= AMSLOTFLAG_CURRENT; } @@ -818,7 +818,7 @@ void amGetSlotDetails(s32 slot, u32 *flags, char *label) if (slot == 4) { strcpy(label, langGet(L_MISC_172)); // "Orders" } else { - strcpy(label, mpGetBotCommandName(g_AmBotCommands[slot])); + strcpy(label, botGetCommandName(g_AmBotCommands[slot])); } } break; @@ -1459,10 +1459,10 @@ Gfx *amRenderAibotInfo(Gfx *gdl, s32 buddynum) if (!g_AmMenus[g_AmIndex].allbots) { buddynum = g_Vars.currentplayer->aibuddynums[buddynum]; - aibotname = var800ac500[buddynum]->name; + aibotname = g_MpAllChrConfigPtrs[buddynum]->name; - if (g_MpPlayerChrs[buddynum]->aibot) { - weaponnum = g_MpPlayerChrs[buddynum]->aibot->weaponnum; + if (g_MpAllChrPtrs[buddynum]->aibot) { + weaponnum = g_MpAllChrPtrs[buddynum]->aibot->weaponnum; } else { weaponnum = 0; } @@ -1508,7 +1508,7 @@ Gfx *amRenderAibotInfo(Gfx *gdl, s32 buddynum) gdl = textRender(gdl, &x, &y, weaponname, g_AmFont1, g_AmFont2, -1, 0x000000ff, 320, 240, 0, 0); - g_Vars.currentplayer->commandingaibot = g_MpPlayerChrs[buddynum]; + g_Vars.currentplayer->commandingaibot = g_MpAllChrPtrs[buddynum]; } else { char *title = langGet(L_MISC_215); // "All Simulants" @@ -4268,10 +4268,10 @@ glabel amRender /* f101198: 1420000e */ bnez $at,.L0f1011d4 /* f10119c: 8fae01c4 */ lw $t6,0x1c4($sp) /* f1011a0: 93190000 */ lbu $t9,0x0($t8) -/* f1011a4: 3c18800b */ lui $t8,%hi(g_MpPlayerChrs) +/* f1011a4: 3c18800b */ lui $t8,%hi(g_MpAllChrPtrs) /* f1011a8: 000e7880 */ sll $t7,$t6,0x2 /* f1011ac: 030fc021 */ addu $t8,$t8,$t7 -/* f1011b0: 8f18c4d0 */ lw $t8,%lo(g_MpPlayerChrs)($t8) +/* f1011b0: 8f18c4d0 */ lw $t8,%lo(g_MpAllChrPtrs)($t8) /* f1011b4: 3c02800b */ lui $v0,%hi(g_AmBotCommands) /* f1011b8: 00591021 */ addu $v0,$v0,$t9 /* f1011bc: 8f1902d4 */ lw $t9,0x2d4($t8) @@ -6988,7 +6988,7 @@ glabel amRender // && mode == AMSLOTMODE_DEFAULT // && g_AmMenus[g_AmIndex].screenindex >= 2) { // s32 a = g_AmBotCommands[var800719a0[row][column]]; -// s32 b = g_MpPlayerChrs[mpchrnum]->aibot->command; +// s32 b = g_MpAllChrPtrs[mpchrnum]->aibot->command; // // if (a == b) { // mode = AMSLOTMODE_CURRENT; diff --git a/src/game/bondgun.c b/src/game/bondgun.c index 006bdf318..273e8175f 100644 --- a/src/game/bondgun.c +++ b/src/game/bondgun.c @@ -2922,14 +2922,14 @@ glabel bgunTickIncIdle /* f099404: 2483ffff */ addiu $v1,$a0,-1 /* f099408: 000370c3 */ sra $t6,$v1,0x3 /* f09940c: 8d6c0070 */ lw $t4,0x70($t3) -/* f099410: 3c18800b */ lui $t8,%hi(g_MpPlayers+0x97) +/* f099410: 3c18800b */ lui $t8,%hi(g_PlayerConfigsArray+0x97) /* f099414: 30790007 */ andi $t9,$v1,0x7 /* f099418: 000c6880 */ sll $t5,$t4,0x2 /* f09941c: 01ac6821 */ addu $t5,$t5,$t4 /* f099420: 000d6940 */ sll $t5,$t5,0x5 /* f099424: 01ae7821 */ addu $t7,$t5,$t6 /* f099428: 030fc021 */ addu $t8,$t8,$t7 -/* f09942c: 9318c84f */ lbu $t8,%lo(g_MpPlayers+0x97)($t8) +/* f09942c: 9318c84f */ lbu $t8,%lo(g_PlayerConfigsArray+0x97)($t8) /* f099430: 24090001 */ addiu $t1,$zero,0x1 /* f099434: 03295004 */ sllv $t2,$t1,$t9 /* f099438: 030a1024 */ and $v0,$t8,$t2 @@ -3243,7 +3243,7 @@ glabel bgunTickIncIdle // // Consider switching to other gun function // usesec = g_Vars.currentplayer->gunctrl.weaponnum >= WEAPON_UNARMED // && g_Vars.currentplayer->gunctrl.weaponnum <= WEAPON_COMBATBOOST -// && (g_MpPlayers[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << (g_Vars.currentplayer->gunctrl.weaponnum - 1 & 7))); +// && (g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << (g_Vars.currentplayer->gunctrl.weaponnum - 1 & 7))); // // if (usesec == gunfunc) { // sp30 = bgun0f098ca0(1 - hand->gset.weaponfunc, info, hand); @@ -27835,14 +27835,14 @@ glabel var7f1acb14 /* f0a8a9c: 24e2ffff */ addiu $v0,$a3,-1 /* f0a8aa0: 0002c0c3 */ sra $t8,$v0,0x3 /* f0a8aa4: 8dae0070 */ lw $t6,0x70($t5) -/* f0a8aa8: 3c09800b */ lui $t1,%hi(g_MpPlayers+0x97) +/* f0a8aa8: 3c09800b */ lui $t1,%hi(g_PlayerConfigsArray+0x97) /* f0a8aac: 304a0007 */ andi $t2,$v0,0x7 /* f0a8ab0: 000e7880 */ sll $t7,$t6,0x2 /* f0a8ab4: 01ee7821 */ addu $t7,$t7,$t6 /* f0a8ab8: 000f7940 */ sll $t7,$t7,0x5 /* f0a8abc: 01f8c821 */ addu $t9,$t7,$t8 /* f0a8ac0: 01394821 */ addu $t1,$t1,$t9 -/* f0a8ac4: 9129c84f */ lbu $t1,%lo(g_MpPlayers+0x97)($t1) +/* f0a8ac4: 9129c84f */ lbu $t1,%lo(g_PlayerConfigsArray+0x97)($t1) /* f0a8ac8: 240b0001 */ addiu $t3,$zero,0x1 /* f0a8acc: 014b6004 */ sllv $t4,$t3,$t2 /* f0a8ad0: 012c2024 */ and $a0,$t1,$t4 @@ -27854,8 +27854,8 @@ glabel var7f1acb14 /* f0a8ae4: 24e2ffff */ addiu $v0,$a3,-1 /* f0a8ae8: 0002c8c3 */ sra $t9,$v0,0x3 /* f0a8aec: 8dcf0070 */ lw $t7,0x70($t6) -/* f0a8af0: 3c0a800b */ lui $t2,%hi(g_MpPlayers) -/* f0a8af4: 254ac7b8 */ addiu $t2,$t2,%lo(g_MpPlayers) +/* f0a8af0: 3c0a800b */ lui $t2,%hi(g_PlayerConfigsArray) +/* f0a8af4: 254ac7b8 */ addiu $t2,$t2,%lo(g_PlayerConfigsArray) /* f0a8af8: 000fc080 */ sll $t8,$t7,0x2 /* f0a8afc: 030fc021 */ addu $t8,$t8,$t7 /* f0a8b00: 0018c140 */ sll $t8,$t8,0x5 @@ -27906,9 +27906,9 @@ glabel var7f1acb14 /* f0a8ba0: 24e2ffff */ addiu $v0,$a3,-1 /* f0a8ba4: 8d0d0288 */ lw $t5,0x288($t0) /* f0a8ba8: 0002c0c3 */ sra $t8,$v0,0x3 -/* f0a8bac: 3c0b800b */ lui $t3,%hi(g_MpPlayers) +/* f0a8bac: 3c0b800b */ lui $t3,%hi(g_PlayerConfigsArray) /* f0a8bb0: 8dae0070 */ lw $t6,0x70($t5) -/* f0a8bb4: 256bc7b8 */ addiu $t3,$t3,%lo(g_MpPlayers) +/* f0a8bb4: 256bc7b8 */ addiu $t3,$t3,%lo(g_PlayerConfigsArray) /* f0a8bb8: 304a0007 */ andi $t2,$v0,0x7 /* f0a8bbc: 000e7880 */ sll $t7,$t6,0x2 /* f0a8bc0: 01ee7821 */ addu $t7,$t7,$t6 @@ -27927,8 +27927,8 @@ glabel var7f1acb14 /* f0a8bec: 24e2ffff */ addiu $v0,$a3,-1 /* f0a8bf0: 0002c0c3 */ sra $t8,$v0,0x3 /* f0a8bf4: 8dae0070 */ lw $t6,0x70($t5) -/* f0a8bf8: 3c0b800b */ lui $t3,%hi(g_MpPlayers) -/* f0a8bfc: 256bc7b8 */ addiu $t3,$t3,%lo(g_MpPlayers) +/* f0a8bf8: 3c0b800b */ lui $t3,%hi(g_PlayerConfigsArray) +/* f0a8bfc: 256bc7b8 */ addiu $t3,$t3,%lo(g_PlayerConfigsArray) /* f0a8c00: 000e7880 */ sll $t7,$t6,0x2 /* f0a8c04: 01ee7821 */ addu $t7,$t7,$t6 /* f0a8c08: 000f7940 */ sll $t7,$t7,0x5 @@ -28103,14 +28103,14 @@ glabel var7f1acb14 /* f0a8a9c: 24e2ffff */ addiu $v0,$a3,-1 /* f0a8aa0: 0002c0c3 */ sra $t8,$v0,0x3 /* f0a8aa4: 8dae0070 */ lw $t6,0x70($t5) -/* f0a8aa8: 3c09800b */ lui $t1,%hi(g_MpPlayers+0x97) +/* f0a8aa8: 3c09800b */ lui $t1,%hi(g_PlayerConfigsArray+0x97) /* f0a8aac: 304a0007 */ andi $t2,$v0,0x7 /* f0a8ab0: 000e7880 */ sll $t7,$t6,0x2 /* f0a8ab4: 01ee7821 */ addu $t7,$t7,$t6 /* f0a8ab8: 000f7940 */ sll $t7,$t7,0x5 /* f0a8abc: 01f8c821 */ addu $t9,$t7,$t8 /* f0a8ac0: 01394821 */ addu $t1,$t1,$t9 -/* f0a8ac4: 9129c84f */ lbu $t1,%lo(g_MpPlayers+0x97)($t1) +/* f0a8ac4: 9129c84f */ lbu $t1,%lo(g_PlayerConfigsArray+0x97)($t1) /* f0a8ac8: 240b0001 */ addiu $t3,$zero,0x1 /* f0a8acc: 014b6004 */ sllv $t4,$t3,$t2 /* f0a8ad0: 012c2024 */ and $a0,$t1,$t4 @@ -28122,8 +28122,8 @@ glabel var7f1acb14 /* f0a8ae4: 24e2ffff */ addiu $v0,$a3,-1 /* f0a8ae8: 0002c8c3 */ sra $t9,$v0,0x3 /* f0a8aec: 8dcf0070 */ lw $t7,0x70($t6) -/* f0a8af0: 3c0a800b */ lui $t2,%hi(g_MpPlayers) -/* f0a8af4: 254ac7b8 */ addiu $t2,$t2,%lo(g_MpPlayers) +/* f0a8af0: 3c0a800b */ lui $t2,%hi(g_PlayerConfigsArray) +/* f0a8af4: 254ac7b8 */ addiu $t2,$t2,%lo(g_PlayerConfigsArray) /* f0a8af8: 000fc080 */ sll $t8,$t7,0x2 /* f0a8afc: 030fc021 */ addu $t8,$t8,$t7 /* f0a8b00: 0018c140 */ sll $t8,$t8,0x5 @@ -28174,9 +28174,9 @@ glabel var7f1acb14 /* f0a8ba0: 24e2ffff */ addiu $v0,$a3,-1 /* f0a8ba4: 8d0d0288 */ lw $t5,0x288($t0) /* f0a8ba8: 0002c0c3 */ sra $t8,$v0,0x3 -/* f0a8bac: 3c0b800b */ lui $t3,%hi(g_MpPlayers) +/* f0a8bac: 3c0b800b */ lui $t3,%hi(g_PlayerConfigsArray) /* f0a8bb0: 8dae0070 */ lw $t6,0x70($t5) -/* f0a8bb4: 256bc7b8 */ addiu $t3,$t3,%lo(g_MpPlayers) +/* f0a8bb4: 256bc7b8 */ addiu $t3,$t3,%lo(g_PlayerConfigsArray) /* f0a8bb8: 304a0007 */ andi $t2,$v0,0x7 /* f0a8bbc: 000e7880 */ sll $t7,$t6,0x2 /* f0a8bc0: 01ee7821 */ addu $t7,$t7,$t6 @@ -28195,8 +28195,8 @@ glabel var7f1acb14 /* f0a8bec: 24e2ffff */ addiu $v0,$a3,-1 /* f0a8bf0: 0002c0c3 */ sra $t8,$v0,0x3 /* f0a8bf4: 8dae0070 */ lw $t6,0x70($t5) -/* f0a8bf8: 3c0b800b */ lui $t3,%hi(g_MpPlayers) -/* f0a8bfc: 256bc7b8 */ addiu $t3,$t3,%lo(g_MpPlayers) +/* f0a8bf8: 3c0b800b */ lui $t3,%hi(g_PlayerConfigsArray) +/* f0a8bfc: 256bc7b8 */ addiu $t3,$t3,%lo(g_PlayerConfigsArray) /* f0a8c00: 000e7880 */ sll $t7,$t6,0x2 /* f0a8c04: 01ee7821 */ addu $t7,$t7,$t6 /* f0a8c08: 000f7940 */ sll $t7,$t7,0x5 @@ -28371,14 +28371,14 @@ glabel var7f1a7044nb /* f0a8a9c: 24e2ffff */ addiu $v0,$a3,-1 /* f0a8aa0: 0002c0c3 */ sra $t8,$v0,0x3 /* f0a8aa4: 8dae0070 */ lw $t6,0x70($t5) -/* f0a8aa8: 3c09800b */ lui $t1,%hi(g_MpPlayers+0x97) +/* f0a8aa8: 3c09800b */ lui $t1,%hi(g_PlayerConfigsArray+0x97) /* f0a8aac: 304a0007 */ andi $t2,$v0,0x7 /* f0a8ab0: 000e7880 */ sll $t7,$t6,0x2 /* f0a8ab4: 01ee7821 */ addu $t7,$t7,$t6 /* f0a8ab8: 000f7940 */ sll $t7,$t7,0x5 /* f0a8abc: 01f8c821 */ addu $t9,$t7,$t8 /* f0a8ac0: 01394821 */ addu $t1,$t1,$t9 -/* f0a8ac4: 9129c84f */ lbu $t1,%lo(g_MpPlayers+0x97)($t1) +/* f0a8ac4: 9129c84f */ lbu $t1,%lo(g_PlayerConfigsArray+0x97)($t1) /* f0a8ac8: 240b0001 */ addiu $t3,$zero,0x1 /* f0a8acc: 014b6004 */ sllv $t4,$t3,$t2 /* f0a8ad0: 012c2024 */ and $a0,$t1,$t4 @@ -28390,8 +28390,8 @@ glabel var7f1a7044nb /* f0a8ae4: 24e2ffff */ addiu $v0,$a3,-1 /* f0a8ae8: 0002c8c3 */ sra $t9,$v0,0x3 /* f0a8aec: 8dcf0070 */ lw $t7,0x70($t6) -/* f0a8af0: 3c0a800b */ lui $t2,%hi(g_MpPlayers) -/* f0a8af4: 254ac7b8 */ addiu $t2,$t2,%lo(g_MpPlayers) +/* f0a8af0: 3c0a800b */ lui $t2,%hi(g_PlayerConfigsArray) +/* f0a8af4: 254ac7b8 */ addiu $t2,$t2,%lo(g_PlayerConfigsArray) /* f0a8af8: 000fc080 */ sll $t8,$t7,0x2 /* f0a8afc: 030fc021 */ addu $t8,$t8,$t7 /* f0a8b00: 0018c140 */ sll $t8,$t8,0x5 @@ -28442,9 +28442,9 @@ glabel var7f1a7044nb /* f0a8ba0: 24e2ffff */ addiu $v0,$a3,-1 /* f0a8ba4: 8d0d0288 */ lw $t5,0x288($t0) /* f0a8ba8: 0002c0c3 */ sra $t8,$v0,0x3 -/* f0a8bac: 3c0b800b */ lui $t3,%hi(g_MpPlayers) +/* f0a8bac: 3c0b800b */ lui $t3,%hi(g_PlayerConfigsArray) /* f0a8bb0: 8dae0070 */ lw $t6,0x70($t5) -/* f0a8bb4: 256bc7b8 */ addiu $t3,$t3,%lo(g_MpPlayers) +/* f0a8bb4: 256bc7b8 */ addiu $t3,$t3,%lo(g_PlayerConfigsArray) /* f0a8bb8: 304a0007 */ andi $t2,$v0,0x7 /* f0a8bbc: 000e7880 */ sll $t7,$t6,0x2 /* f0a8bc0: 01ee7821 */ addu $t7,$t7,$t6 @@ -28463,8 +28463,8 @@ glabel var7f1a7044nb /* f0a8bec: 24e2ffff */ addiu $v0,$a3,-1 /* f0a8bf0: 0002c0c3 */ sra $t8,$v0,0x3 /* f0a8bf4: 8dae0070 */ lw $t6,0x70($t5) -/* f0a8bf8: 3c0b800b */ lui $t3,%hi(g_MpPlayers) -/* f0a8bfc: 256bc7b8 */ addiu $t3,$t3,%lo(g_MpPlayers) +/* f0a8bf8: 3c0b800b */ lui $t3,%hi(g_PlayerConfigsArray) +/* f0a8bfc: 256bc7b8 */ addiu $t3,$t3,%lo(g_PlayerConfigsArray) /* f0a8c00: 000e7880 */ sll $t7,$t6,0x2 /* f0a8c04: 01ee7821 */ addu $t7,$t7,$t6 /* f0a8c08: 000f7940 */ sll $t7,$t7,0x5 @@ -28546,12 +28546,12 @@ glabel var7f1a7044nb // // A macro is probably used here, hence the duplicate checks // if ((g_Vars.currentplayer->weaponnum >= WEAPON_UNARMED // && g_Vars.currentplayer->weaponnum <= WEAPON_COMBATBOOST -// && (g_MpPlayers[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->weaponnum - 1) >> 3] & (1 << ((g_Vars.currentplayer->weaponnum - 1) & 7)))) != 1) { +// && (g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->weaponnum - 1) >> 3] & (1 << ((g_Vars.currentplayer->weaponnum - 1) & 7)))) != 1) { // // b24 -// g_MpPlayers[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->weaponnum - 1) >> 3] |= 1 << ((g_Vars.currentplayer->weaponnum - 1) & 7); +// g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->weaponnum - 1) >> 3] |= 1 << ((g_Vars.currentplayer->weaponnum - 1) & 7); // } else { // // b34 -// g_MpPlayers[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->weaponnum - 1) >> 3] &= ~(1 << ((g_Vars.currentplayer->weaponnum - 1) & 7)); +// g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->weaponnum - 1) >> 3] &= ~(1 << ((g_Vars.currentplayer->weaponnum - 1) & 7)); // } // } // @@ -28568,10 +28568,10 @@ glabel var7f1a7044nb // && g_Vars.currentplayer->weaponnum <= WEAPON_COMBATBOOST) { // if (!(g_Vars.currentplayer->weaponnum >= WEAPON_UNARMED // && g_Vars.currentplayer->weaponnum <= WEAPON_COMBATBOOST -// && (g_MpPlayers[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->weaponnum - 1) >> 3] & (1 << ((g_Vars.currentplayer->weaponnum - 1) & 7))))) { -// g_MpPlayers[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->weaponnum - 1) >> 3] |= 1 << ((g_Vars.currentplayer->weaponnum - 1) & 7); +// && (g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->weaponnum - 1) >> 3] & (1 << ((g_Vars.currentplayer->weaponnum - 1) & 7))))) { +// g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->weaponnum - 1) >> 3] |= 1 << ((g_Vars.currentplayer->weaponnum - 1) & 7); // } else { -// g_MpPlayers[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->weaponnum - 1) >> 3] &= ~(1 << ((g_Vars.currentplayer->weaponnum - 1) & 7)); +// g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->weaponnum - 1) >> 3] &= ~(1 << ((g_Vars.currentplayer->weaponnum - 1) & 7)); // } // } // } @@ -28596,7 +28596,7 @@ bool bgunIsUsingSecondaryFunction(void) s32 index = (weaponnum - 1) >> 3; s32 value = 1 << ((weaponnum - 1) & 7); - if (g_MpPlayers[g_Vars.currentplayerstats->mpindex].gunfuncs[index] & value) { + if (g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[index] & value) { if (player->gunctrl.invertgunfunc == true) { return false; } diff --git a/src/game/bondwalk.c b/src/game/bondwalk.c index 4188b8cc1..def57b7cb 100644 --- a/src/game/bondwalk.c +++ b/src/game/bondwalk.c @@ -2189,7 +2189,7 @@ void bwalk0f0c4d98(void) void bwalkUpdateSpeedSideways(f32 targetspeed, f32 accelspeed, s32 mult) { if (g_Vars.normmplayerisrunning) { - targetspeed = (g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.unk1c + 25.0f) / 100 * targetspeed; + targetspeed = (g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].base.unk1c + 25.0f) / 100 * targetspeed; } if (g_Vars.currentplayer->speedstrafe > targetspeed) { @@ -2212,7 +2212,7 @@ void bwalkUpdateSpeedSideways(f32 targetspeed, f32 accelspeed, s32 mult) void bwalkUpdateSpeedForwards(f32 targetspeed, f32 accelspeed) { if (g_Vars.normmplayerisrunning) { - targetspeed = (g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.unk1c + 25.0f) / 100 * targetspeed; + targetspeed = (g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].base.unk1c + 25.0f) / 100 * targetspeed; } if (g_Vars.currentplayer->speedgo < targetspeed) { diff --git a/src/game/game_190260.c b/src/game/bot.c similarity index 93% rename from src/game/game_190260.c rename to src/game/bot.c index 8e21ce8e4..82b1b0001 100644 --- a/src/game/game_190260.c +++ b/src/game/bot.c @@ -14,9 +14,9 @@ #include "game/mplayer/setup.h" #include "game/mplayer/scenarios.h" #include "game/radar.h" -#include "game/game_190260.h" -#include "game/game_197600.h" -#include "game/game_1999b0.h" +#include "game/bot.h" +#include "game/botcmd.h" +#include "game/botact.h" #include "game/game_19aa80.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" @@ -32,9 +32,9 @@ #include "data.h" #include "types.h" -struct chrdata *g_MpSimulantChrs[MAX_SIMULANTS]; +struct chrdata *g_MpBotChrPtrs[MAX_SIMULANTS]; -u8 g_NumMpSimulantChrs = 0; +u8 g_BotCount = 0; struct simdifficulty g_SimDifficulties[] = { #if PAL @@ -73,14 +73,14 @@ u32 g_MpBotCommands[NUM_MPBOTCOMMANDS] = { L_MISC_214, // "Protect" }; -bool func0f190260(struct chrdata *chr) +bool bot0f190260(struct chrdata *chr) { - return chr->blurdrugamount >= g_SimDifficulties[chr->aibot->simulant->difficulty].blurdrugamount; + return chr->blurdrugamount >= g_SimDifficulties[chr->aibot->config->difficulty].blurdrugamount; } #if VERSION >= VERSION_PAL_FINAL GLOBAL_ASM( -glabel mpChrReset +glabel botReset /* f19134c: 27bdffe0 */ addiu $sp,$sp,-32 /* f191350: afbf001c */ sw $ra,0x1c($sp) /* f191354: afb10018 */ sw $s1,0x18($sp) @@ -146,7 +146,7 @@ glabel mpChrReset /* f191440: 28610084 */ slti $at,$v1,0x84 /* f191444: 1420fffb */ bnez $at,.PF0f191434 /* f191448: af000000 */ sw $zero,0x0($t8) -/* f19144c: 0fc66340 */ jal aibotClearInventory +/* f19144c: 0fc66340 */ jal botinvClear /* f191450: 02202025 */ move $a0,$s1 /* f191454: 9208004c */ lbu $t0,0x4c($s0) /* f191458: 920d009c */ lbu $t5,0x9c($s0) @@ -308,7 +308,7 @@ glabel mpChrReset ); #elif VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel mpChrReset +glabel botReset /* f19028c: 27bdffe0 */ addiu $sp,$sp,-32 /* f190290: afbf001c */ sw $ra,0x1c($sp) /* f190294: afb10018 */ sw $s1,0x18($sp) @@ -374,7 +374,7 @@ glabel mpChrReset /* f190380: 28610084 */ slti $at,$v1,0x84 /* f190384: 1420fffb */ bnez $at,.L0f190374 /* f190388: af000000 */ sw $zero,0x0($t8) -/* f19038c: 0fc65f00 */ jal aibotClearInventory +/* f19038c: 0fc65f00 */ jal botinvClear /* f190390: 02202025 */ or $a0,$s1,$zero /* f190394: 9208004c */ lbu $t0,0x4c($s0) /* f190398: 920e009c */ lbu $t6,0x9c($s0) @@ -538,7 +538,7 @@ glabel mpChrReset ); #else GLOBAL_ASM( -glabel mpChrReset +glabel botReset /* f18a44c: 27bdffe0 */ addiu $sp,$sp,-32 /* f18a450: afbf001c */ sw $ra,0x1c($sp) /* f18a454: afb10018 */ sw $s1,0x18($sp) @@ -600,7 +600,7 @@ glabel mpChrReset /* f18a530: 28410084 */ slti $at,$v0,0x84 /* f18a534: 1420fffb */ bnez $at,.NB0f18a524 /* f18a538: af000000 */ sw $zero,0x0($t8) -/* f18a53c: 0fc646f8 */ jal aibotClearInventory +/* f18a53c: 0fc646f8 */ jal botinvClear /* f18a540: 02202025 */ or $a0,$s1,$zero /* f18a544: 9208004c */ lbu $t0,0x4c($s0) /* f18a548: 920e009c */ lbu $t6,0x9c($s0) @@ -761,7 +761,7 @@ glabel mpChrReset ); #endif -//void mpChrReset(struct chrdata *chr, u8 full) +//void botReset(struct chrdata *chr, u8 respawning) //{ // s32 i; // u32 rand; @@ -775,7 +775,7 @@ glabel mpChrReset // chr->myaction = MA_AIBOTMAINLOOP; // chr->shotbondsum = 0; // -// if (full) { +// if (respawning) { // chr->numclosearghs = 0; // chr->damage = 0; // chr->target = -1; @@ -803,7 +803,7 @@ glabel mpChrReset // aibot->unk01c->unk00[i] = 0; // } // -// aibotClearInventory(chr); +// botinvClear(chr); // // aibot->gunfunc = 0; // aibot->iscloserangeweapon = true; @@ -884,11 +884,11 @@ glabel mpChrReset // aibot->unk09d = 0; // } // -// if (aibot->simulant->type == SIMTYPE_TURTLE || aibot->simulant->type == SIMTYPE_SHIELD) { +// if (aibot->config->type == BOTTYPE_TURTLE || aibot->config->type == BOTTYPE_SHIELD) { // chr->cshield = 8; // } // -// if (aibot->simulant->difficulty == SIMDIFF_DARK) { +// if (aibot->config->difficulty == BOTDIFF_DARK) { // aibot->unk064 &= ~1; // // if (mpHasShield()) { @@ -901,7 +901,7 @@ glabel mpChrReset // } //} -void mpInitSimulant(struct chrdata *chr, u8 full) +void botSpawn(struct chrdata *chr, u8 respawning) { f32 thing; struct prop *prop; @@ -925,7 +925,7 @@ void mpInitSimulant(struct chrdata *chr, u8 full) } if (aibot) { - mpChrReset(chr, full); + botReset(chr, respawning); chrInitSplats(chr); thing = scenarioChooseSpawnLocation(chr->chrwidth, &pos, rooms, chr->prop); chr->hidden |= CHRHFLAG_00100000; @@ -940,12 +940,12 @@ void mpInitSimulant(struct chrdata *chr, u8 full) } } -void mpInitSimulants(void) +void botSpawnAll(void) { s32 i; - for (i = 0; i < g_NumMpSimulantChrs; i++) { - mpInitSimulant(g_MpSimulantChrs[i], false); + for (i = 0; i < g_BotCount; i++) { + botSpawn(g_MpBotChrPtrs[i], false); } } @@ -957,7 +957,7 @@ u32 add87654321(u32 value) #endif #if VERSION >= VERSION_NTSC_1_0 -u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr) +u32 botPickupProp(struct prop *prop, struct chrdata *chr) { struct defaultobj *obj = prop->obj; @@ -979,7 +979,7 @@ u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr) dprint(); if (qty) { - aibotGiveAmmoByType(chr->aibot, crate->ammotype, qty); + botactGiveAmmoByType(chr->aibot, crate->ammotype, qty); } // Pickup sound @@ -1029,7 +1029,7 @@ u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr) } if (qty) { - aibotGiveAmmoByType(chr->aibot, i + 1, qty); + botactGiveAmmoByType(chr->aibot, i + 1, qty); } } @@ -1043,7 +1043,7 @@ u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr) case OBJTYPE_WEAPON: { struct weaponobj *weapon = prop->weapon; - u32 itemtype = aibotGetInvItemType(chr, weapon->weaponnum); + u32 itemtype = botinvGetItemType(chr, weapon->weaponnum); u32 result; u32 qty; @@ -1056,25 +1056,25 @@ u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr) qty = weaponGetPickupAmmoQty(weapon); if (qty) { - aibotGiveAmmoByWeapon(chr->aibot, weapon->weaponnum, weapon->gunfunc, qty); + botactGiveAmmoByWeapon(chr->aibot, weapon->weaponnum, weapon->gunfunc, qty); } if (itemtype) { struct weapon *weapondef = weaponFindById(weapon->weaponnum); - u32 originalpad = aibotGetWeaponPad(chr, weapon->weaponnum); + u32 originalpad = botinvGetWeaponPad(chr, weapon->weaponnum); u32 currentpad = obj->pad; if (itemtype == INVITEMTYPE_WEAP && weapondef && (weapondef->flags & WEAPONFLAG_DUALWIELD) && originalpad != currentpad) { - aibotGiveDualWeapon(chr, weapon->weaponnum); + botinvGiveDualWeapon(chr, weapon->weaponnum); result = 1; } else { result = 2; } } else { - aibotGiveProp(chr, prop); + botinvGiveProp(chr, prop); result = 1; } @@ -1130,98 +1130,98 @@ u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr) } #else GLOBAL_ASM( -glabel propobjHandlePickupByAibot +glabel botPickupProp .late_rodata glabel var7f1b33d0nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b33d4nb -.word propobjHandlePickupByAibot+0x080 +.word botPickupProp+0x080 glabel var7f1b33d8nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b33dcnb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b33e0nb -.word propobjHandlePickupByAibot+0x080 +.word botPickupProp+0x080 glabel var7f1b33e4nb -.word propobjHandlePickupByAibot+0x1f4 +.word botPickupProp+0x1f4 glabel var7f1b33e8nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b33ecnb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b33f0nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b33f4nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b33f8nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b33fcnb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3400nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3404nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3408nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b340cnb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3410nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3414nb -.word propobjHandlePickupByAibot+0x130 +.word botPickupProp+0x130 glabel var7f1b3418nb -.word propobjHandlePickupByAibot+0x314 +.word botPickupProp+0x314 glabel var7f1b341cnb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3420nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3424nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3428nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b342cnb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3430nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3434nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3438nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b343cnb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3440nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3444nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3448nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b344cnb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3450nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3454nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3458nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b345cnb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3460nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3464nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3468nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b346cnb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3470nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3474nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3478nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b347cnb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac glabel var7f1b3480nb -.word propobjHandlePickupByAibot+0x3ac +.word botPickupProp+0x3ac .text /* f18a918: 27bdff80 */ addiu $sp,$sp,-128 /* f18a91c: afbf0054 */ sw $ra,0x54($sp) @@ -1266,7 +1266,7 @@ glabel var7f1b3480nb /* f18a9b0: 12000004 */ beqz $s0,.NB0f18a9c4 /* f18a9b4: 02003025 */ or $a2,$s0,$zero /* f18a9b8: 8e4402d4 */ lw $a0,0x2d4($s2) -/* f18a9bc: 0fc64fb5 */ jal aibotGiveAmmoByType +/* f18a9bc: 0fc64fb5 */ jal botactGiveAmmoByType /* f18a9c0: 8e25005c */ lw $a1,0x5c($s1) .NB0f18a9c4: /* f18a9c4: 3c01bf80 */ lui $at,0xbf80 @@ -1319,7 +1319,7 @@ glabel var7f1b3480nb .NB0f18aa78: /* f18aa78: 10c00003 */ beqz $a2,.NB0f18aa88 /* f18aa7c: 26050001 */ addiu $a1,$s0,0x1 -/* f18aa80: 0fc64fb5 */ jal aibotGiveAmmoByType +/* f18aa80: 0fc64fb5 */ jal botactGiveAmmoByType /* f18aa84: 8e4402d4 */ lw $a0,0x2d4($s2) .NB0f18aa88: /* f18aa88: 26100001 */ addiu $s0,$s0,0x1 @@ -1358,7 +1358,7 @@ glabel var7f1b3480nb /* f18ab0c: 8fad0080 */ lw $t5,0x80($sp) /* f18ab10: 02402025 */ or $a0,$s2,$zero /* f18ab14: 8db00004 */ lw $s0,0x4($t5) -/* f18ab18: 0fc64788 */ jal aibotGetInvItemType +/* f18ab18: 0fc64788 */ jal botinvGetItemType /* f18ab1c: 9205005c */ lbu $a1,0x5c($s0) /* f18ab20: afa2005c */ sw $v0,0x5c($sp) /* f18ab24: 9205005c */ lbu $a1,0x5c($s0) @@ -1387,7 +1387,7 @@ glabel var7f1b3480nb /* f18ab78: 00403825 */ or $a3,$v0,$zero /* f18ab7c: 8e4402d4 */ lw $a0,0x2d4($s2) /* f18ab80: 9205005c */ lbu $a1,0x5c($s0) -/* f18ab84: 0fc64f87 */ jal aibotGiveAmmoByWeapon +/* f18ab84: 0fc64f87 */ jal botactGiveAmmoByWeapon /* f18ab88: 9206005f */ lbu $a2,0x5f($s0) .NB0f18ab8c: /* f18ab8c: 8fae005c */ lw $t6,0x5c($sp) @@ -1398,7 +1398,7 @@ glabel var7f1b3480nb /* f18aba0: 9204005c */ lbu $a0,0x5c($s0) /* f18aba4: 00408825 */ or $s1,$v0,$zero /* f18aba8: 02402025 */ or $a0,$s2,$zero -/* f18abac: 0fc647c4 */ jal aibotGetWeaponPad +/* f18abac: 0fc647c4 */ jal botinvGetWeaponPad /* f18abb0: 9205005c */ lbu $a1,0x5c($s0) /* f18abb4: 8fb8005c */ lw $t8,0x5c($sp) /* f18abb8: 8faf007c */ lw $t7,0x7c($sp) @@ -1413,7 +1413,7 @@ glabel var7f1b3480nb /* f18abdc: 00000000 */ sll $zero,$zero,0x0 /* f18abe0: 10430005 */ beq $v0,$v1,.NB0f18abf8 /* f18abe4: 02402025 */ or $a0,$s2,$zero -/* f18abe8: 0fc647b9 */ jal aibotGiveDualWeapon +/* f18abe8: 0fc647b9 */ jal botinvGiveDualWeapon /* f18abec: 9205005c */ lbu $a1,0x5c($s0) /* f18abf0: 10000006 */ beqz $zero,.NB0f18ac0c /* f18abf4: 24100001 */ addiu $s0,$zero,0x1 @@ -1421,7 +1421,7 @@ glabel var7f1b3480nb /* f18abf8: 10000004 */ beqz $zero,.NB0f18ac0c /* f18abfc: 24100002 */ addiu $s0,$zero,0x2 .NB0f18ac00: -/* f18ac00: 0fc647d3 */ jal aibotGiveProp +/* f18ac00: 0fc647d3 */ jal botinvGiveProp /* f18ac04: 8fa50080 */ lw $a1,0x80($sp) /* f18ac08: 24100001 */ addiu $s0,$zero,0x1 .NB0f18ac0c: @@ -1486,7 +1486,7 @@ glabel var7f1b3480nb #if VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel func0f190be4 +glabel botTestPropForPickup .late_rodata glabel var7f1b8ea4 .word 0x47742400 @@ -1603,7 +1603,7 @@ glabel var7f1b8ea8 /* f190d6c: 8dc20004 */ lw $v0,0x4($t6) /* f190d70: 8fa4008c */ lw $a0,0x8c($sp) /* f190d74: 9045005c */ lbu $a1,0x5c($v0) -/* f190d78: 0fc65f90 */ jal aibotGetInvItemType +/* f190d78: 0fc65f90 */ jal botinvGetItemType /* f190d7c: afa20080 */ sw $v0,0x80($sp) /* f190d80: 8faf0080 */ lw $t7,0x80($sp) /* f190d84: 91e4005c */ lbu $a0,0x5c($t7) @@ -1632,12 +1632,12 @@ glabel var7f1b8ea8 /* f190dd8: 8d0402d4 */ lw $a0,0x2d4($t0) /* f190ddc: 02002825 */ or $a1,$s0,$zero /* f190de0: 9046005f */ lbu $a2,0x5f($v0) -/* f190de4: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f190de4: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f190de8: 00003825 */ or $a3,$zero,$zero /* f190dec: 8fa90080 */ lw $t1,0x80($sp) /* f190df0: 00408025 */ or $s0,$v0,$zero /* f190df4: 9124005c */ lbu $a0,0x5c($t1) -/* f190df8: 0fc6666c */ jal weaponGetAmmoTypeByFunction +/* f190df8: 0fc6666c */ jal botactGetAmmoTypeByFunction /* f190dfc: 9125005f */ lbu $a1,0x5f($t1) /* f190e00: 0fc2a63d */ jal bgunGetCapacityByAmmotype /* f190e04: 00402025 */ or $a0,$v0,$zero @@ -1670,7 +1670,7 @@ glabel var7f1b8ea8 /* f190e64: 8fae008c */ lw $t6,0x8c($sp) /* f190e68: 00003025 */ or $a2,$zero,$zero /* f190e6c: 8e05005c */ lw $a1,0x5c($s0) -/* f190e70: 0fc6672e */ jal aibotGetAmmoQuantityByType +/* f190e70: 0fc6672e */ jal botactGetAmmoQuantityByType /* f190e74: 8dc402d4 */ lw $a0,0x2d4($t6) /* f190e78: 8e04005c */ lw $a0,0x5c($s0) /* f190e7c: 0fc2a63d */ jal bgunGetCapacityByAmmotype @@ -1701,7 +1701,7 @@ glabel var7f1b8ea8 .L0f190ed8: /* f190ed8: 24500001 */ addiu $s0,$v0,0x1 /* f190edc: 02002025 */ or $a0,$s0,$zero -/* f190ee0: 0fc668c7 */ jal ammotypeGetWeapon +/* f190ee0: 0fc668c7 */ jal botactGetWeaponByAmmoType /* f190ee4: afa30028 */ sw $v1,0x28($sp) /* f190ee8: 8fa30028 */ lw $v1,0x28($sp) /* f190eec: afa20068 */ sw $v0,0x68($sp) @@ -1712,7 +1712,7 @@ glabel var7f1b8ea8 /* f190f00: 5b20001d */ blezl $t9,.L0f190f78 /* f190f04: 24010013 */ addiu $at,$zero,0x13 /* f190f08: 8d0402d4 */ lw $a0,0x2d4($t0) -/* f190f0c: 0fc6672e */ jal aibotGetAmmoQuantityByType +/* f190f0c: 0fc6672e */ jal botactGetAmmoQuantityByType /* f190f10: afa30028 */ sw $v1,0x28($sp) /* f190f14: 02002025 */ or $a0,$s0,$zero /* f190f18: 0fc2a63d */ jal bgunGetCapacityByAmmotype @@ -1727,14 +1727,14 @@ glabel var7f1b8ea8 /* f190f3c: 8fa4008c */ lw $a0,0x8c($sp) /* f190f40: 51200011 */ beqzl $t1,.L0f190f88 /* f190f44: 8faa0064 */ lw $t2,0x64($sp) -/* f190f48: 0fc65f90 */ jal aibotGetInvItemType +/* f190f48: 0fc65f90 */ jal botinvGetItemType /* f190f4c: 01202825 */ or $a1,$t1,$zero /* f190f50: 5440000d */ bnezl $v0,.L0f190f88 /* f190f54: 8faa0064 */ lw $t2,0x64($sp) /* f190f58: 0fc47bba */ jal dprint /* f190f5c: 00000000 */ nop /* f190f60: 8fa4008c */ lw $a0,0x8c($sp) -/* f190f64: 0fc65fdb */ jal aibotGiveProp +/* f190f64: 0fc65fdb */ jal botinvGiveProp /* f190f68: 8fa50088 */ lw $a1,0x88($sp) /* f190f6c: 10000006 */ b .L0f190f88 /* f190f70: 8faa0064 */ lw $t2,0x64($sp) @@ -1878,7 +1878,7 @@ glabel var7f1b8ea8 /* f191164: 0fc47bba */ jal dprint /* f191168: 00000000 */ nop /* f19116c: 8fa40088 */ lw $a0,0x88($sp) -/* f191170: 0fc641e1 */ jal propobjHandlePickupByAibot +/* f191170: 0fc641e1 */ jal botPickupProp /* f191174: 8fa5008c */ lw $a1,0x8c($sp) /* f191178: 10000002 */ b .L0f191184 /* f19117c: 8fbf0024 */ lw $ra,0x24($sp) @@ -1892,7 +1892,7 @@ glabel var7f1b8ea8 ); #else GLOBAL_ASM( -glabel func0f190be4 +glabel botTestPropForPickup .late_rodata glabel var7f1b8ea4 .word 0x47742400 @@ -2004,7 +2004,7 @@ glabel var7f1b8ea8 /* f18ae58: 8da20004 */ lw $v0,0x4($t5) /* f18ae5c: 8fa4008c */ lw $a0,0x8c($sp) /* f18ae60: 9045005c */ lbu $a1,0x5c($v0) -/* f18ae64: 0fc64788 */ jal aibotGetInvItemType +/* f18ae64: 0fc64788 */ jal botinvGetItemType /* f18ae68: afa20080 */ sw $v0,0x80($sp) /* f18ae6c: 8fae0080 */ lw $t6,0x80($sp) /* f18ae70: 91c4005c */ lbu $a0,0x5c($t6) @@ -2033,12 +2033,12 @@ glabel var7f1b8ea8 /* f18aec4: 8f2402d4 */ lw $a0,0x2d4($t9) /* f18aec8: 02002825 */ or $a1,$s0,$zero /* f18aecc: 9046005f */ lbu $a2,0x5f($v0) -/* f18aed0: 0fc64ef1 */ jal aibotGetAmmoQuantityByWeapon +/* f18aed0: 0fc64ef1 */ jal botactGetAmmoQuantityByWeapon /* f18aed4: 00003825 */ or $a3,$zero,$zero /* f18aed8: 8fa80080 */ lw $t0,0x80($sp) /* f18aedc: 00408025 */ or $s0,$v0,$zero /* f18aee0: 9104005c */ lbu $a0,0x5c($t0) -/* f18aee4: 0fc64e64 */ jal weaponGetAmmoTypeByFunction +/* f18aee4: 0fc64e64 */ jal botactGetAmmoTypeByFunction /* f18aee8: 9105005f */ lbu $a1,0x5f($t0) /* f18aeec: 0fc29da5 */ jal bgunGetCapacityByAmmotype /* f18aef0: 00402025 */ or $a0,$v0,$zero @@ -2071,7 +2071,7 @@ glabel var7f1b8ea8 /* f18af50: 8fad008c */ lw $t5,0x8c($sp) /* f18af54: 00003025 */ or $a2,$zero,$zero /* f18af58: 8e05005c */ lw $a1,0x5c($s0) -/* f18af5c: 0fc64f26 */ jal aibotGetAmmoQuantityByType +/* f18af5c: 0fc64f26 */ jal botactGetAmmoQuantityByType /* f18af60: 8da402d4 */ lw $a0,0x2d4($t5) /* f18af64: 8e04005c */ lw $a0,0x5c($s0) /* f18af68: 0fc29da5 */ jal bgunGetCapacityByAmmotype @@ -2102,7 +2102,7 @@ glabel var7f1b8ea8 .NB0f18afc4: /* f18afc4: 24500001 */ addiu $s0,$v0,0x1 /* f18afc8: 02002025 */ or $a0,$s0,$zero -/* f18afcc: 0fc650bf */ jal ammotypeGetWeapon +/* f18afcc: 0fc650bf */ jal botactGetWeaponByAmmoType /* f18afd0: afa30028 */ sw $v1,0x28($sp) /* f18afd4: 8fa30028 */ lw $v1,0x28($sp) /* f18afd8: afa20068 */ sw $v0,0x68($sp) @@ -2113,7 +2113,7 @@ glabel var7f1b8ea8 /* f18afec: 5b00001d */ blezl $t8,.NB0f18b064 /* f18aff0: 24010013 */ addiu $at,$zero,0x13 /* f18aff4: 8f2402d4 */ lw $a0,0x2d4($t9) -/* f18aff8: 0fc64f26 */ jal aibotGetAmmoQuantityByType +/* f18aff8: 0fc64f26 */ jal botactGetAmmoQuantityByType /* f18affc: afa30028 */ sw $v1,0x28($sp) /* f18b000: 02002025 */ or $a0,$s0,$zero /* f18b004: 0fc29da5 */ jal bgunGetCapacityByAmmotype @@ -2128,14 +2128,14 @@ glabel var7f1b8ea8 /* f18b028: 8fa4008c */ lw $a0,0x8c($sp) /* f18b02c: 51000011 */ beqzl $t0,.NB0f18b074 /* f18b030: 8fa90064 */ lw $t1,0x64($sp) -/* f18b034: 0fc64788 */ jal aibotGetInvItemType +/* f18b034: 0fc64788 */ jal botinvGetItemType /* f18b038: 01002825 */ or $a1,$t0,$zero /* f18b03c: 5440000d */ bnezl $v0,.NB0f18b074 /* f18b040: 8fa90064 */ lw $t1,0x64($sp) /* f18b044: 0fc466bd */ jal dprint /* f18b048: 00000000 */ sll $zero,$zero,0x0 /* f18b04c: 8fa4008c */ lw $a0,0x8c($sp) -/* f18b050: 0fc647d3 */ jal aibotGiveProp +/* f18b050: 0fc647d3 */ jal botinvGiveProp /* f18b054: 8fa50088 */ lw $a1,0x88($sp) /* f18b058: 10000006 */ beqz $zero,.NB0f18b074 /* f18b05c: 8fa90064 */ lw $t1,0x64($sp) @@ -2279,7 +2279,7 @@ glabel var7f1b8ea8 /* f18b250: 0fc466bd */ jal dprint /* f18b254: 00000000 */ sll $zero,$zero,0x0 /* f18b258: 8fa40088 */ lw $a0,0x88($sp) -/* f18b25c: 0fc62a46 */ jal propobjHandlePickupByAibot +/* f18b25c: 0fc62a46 */ jal botPickupProp /* f18b260: 8fa5008c */ lw $a1,0x8c($sp) /* f18b264: 10000002 */ beqz $zero,.NB0f18b270 /* f18b268: 8fbf0024 */ lw $ra,0x24($sp) @@ -2294,7 +2294,7 @@ glabel var7f1b8ea8 #endif // Mismatch: Uses too many callee-save registers -//bool func0f190be4(struct prop *prop, struct chrdata *chr) +//bool botTestPropForPickup(struct prop *prop, struct chrdata *chr) //{ // struct defaultobj *obj = prop->obj; // 84 // @@ -2371,7 +2371,7 @@ glabel var7f1b8ea8 // // d64 // if (obj->type == OBJTYPE_WEAPON) { // weaponobj = prop->weapon; // 80 -// itemtype = aibotGetInvItemType(chr, weaponobj->weaponnum); // 7c +// itemtype = botinvGetItemType(chr, weaponobj->weaponnum); // 7c // weapon = weaponFindById(weaponobj->weaponnum); // singleonly = weapon && (weapon->flags & WEAPONFLAG_DUALWIELD) == 0; // @@ -2379,8 +2379,8 @@ glabel var7f1b8ea8 // // If aibot is dual wielding, or single wielding and weapon doesn't support dual, // // ignore the pickup if at max ammo already // if (itemtype == INVITEMTYPE_DUAL || (itemtype == INVITEMTYPE_WEAP && singleonly)) { -// qty = aibotGetAmmoQuantityByWeapon(chr->aibot, weaponobj->weaponnum, weaponobj->gunfunc, false); -// cap = bgunGetCapacityByAmmotype(weaponGetAmmoTypeByFunction(weaponobj->weaponnum, weaponobj->gunfunc)); +// qty = botactGetAmmoQuantityByWeapon(chr->aibot, weaponobj->weaponnum, weaponobj->gunfunc, false); +// cap = bgunGetCapacityByAmmotype(botactGetAmmoTypeByFunction(weaponobj->weaponnum, weaponobj->gunfunc)); // // if (qty >= cap) { // return false; @@ -2397,7 +2397,7 @@ glabel var7f1b8ea8 // crate = (struct ammocrateobj *)prop->obj; // // // Ignore ammo crate if at max ammo already -// if (aibotGetAmmoQuantityByType(chr->aibot, crate->ammotype, false) >= bgunGetCapacityByAmmotype(crate->ammotype)) { +// if (botactGetAmmoQuantityByType(chr->aibot, crate->ammotype, false) >= bgunGetCapacityByAmmotype(crate->ammotype)) { // return false; // } // } else /*e9c*/ if (obj->type == OBJTYPE_MULTIAMMOCRATE) { @@ -2410,15 +2410,15 @@ glabel var7f1b8ea8 // } // // for (i = 0; i < 0x13; i++) { -// weaponnum = ammotypeGetWeapon(i + 1); +// weaponnum = botactGetWeaponByAmmoType(i + 1); // // if (crate2->slots[i].quantity > 0) { -// if (aibotGetAmmoQuantityByType(chr->aibot, i + 1, false) < bgunGetCapacityByAmmotype(i + 1)) { +// if (botactGetAmmoQuantityByType(chr->aibot, i + 1, false) < bgunGetCapacityByAmmotype(i + 1)) { // ignore1 = false; // -// if (weaponnum && !aibotGetInvItemType(chr, weaponnum)) { +// if (weaponnum && !botinvGetItemType(chr, weaponnum)) { // dprint(); -// aibotGiveProp(chr, prop); +// botinvGiveProp(chr, prop); // } // // break; @@ -2476,13 +2476,13 @@ glabel var7f1b8ea8 // // 15c // if (sp3c) { // dprint(); -// return propobjHandlePickupByAibot(prop, chr); +// return botPickupProp(prop, chr); // } // // return false; //} -s32 mpObjIsSafe(struct defaultobj *obj) +s32 botIsObjCollectable(struct defaultobj *obj) { if (!obj) { return false; @@ -2497,14 +2497,14 @@ s32 mpObjIsSafe(struct defaultobj *obj) if (obj->type == OBJTYPE_WEAPON) { struct weaponobj *weapon = (struct weaponobj *)obj; - if (weapon->weaponnum == WEAPON_NBOMB || - weapon->weaponnum == WEAPON_GRENADE || - weapon->weaponnum == WEAPON_GRENADEROUND || - weapon->weaponnum == WEAPON_PROXIMITYMINE || - weapon->weaponnum == WEAPON_REMOTEMINE || - weapon->weaponnum == WEAPON_TIMEDMINE || - weapon->weaponnum == WEAPON_SKROCKET || - (weapon->weaponnum == WEAPON_DRAGON && weapon->gunfunc == FUNC_SECONDARY)) { + if (weapon->weaponnum == WEAPON_NBOMB + || weapon->weaponnum == WEAPON_GRENADE + || weapon->weaponnum == WEAPON_GRENADEROUND + || weapon->weaponnum == WEAPON_PROXIMITYMINE + || weapon->weaponnum == WEAPON_REMOTEMINE + || weapon->weaponnum == WEAPON_TIMEDMINE + || weapon->weaponnum == WEAPON_SKROCKET + || (weapon->weaponnum == WEAPON_DRAGON && weapon->gunfunc == FUNC_SECONDARY)) { return false; } @@ -2514,7 +2514,10 @@ s32 mpObjIsSafe(struct defaultobj *obj) return false; } -void func0f19124c(struct chrdata *chr) +/** + * Check nearby props to see if the chr is picking them up on this frame. + */ +void botCheckPickups(struct chrdata *chr) { s32 i; s16 *propnumptr; @@ -2547,9 +2550,9 @@ void func0f19124c(struct chrdata *chr) || obj->projectile == NULL || obj->projectile->unk0b4 <= 0 || obj->projectile->unk090) { - if (mpObjIsSafe(obj)) { - if (func0f190be4(prop, chr)) { - propExecuteTickOperation(prop, 1); + if (botIsObjCollectable(obj)) { + if (botTestPropForPickup(prop, chr)) { + propExecuteTickOperation(prop, TICKOP_FREE); } else { dprint(); } @@ -2563,7 +2566,7 @@ void func0f19124c(struct chrdata *chr) } } -s32 chrGuessCrouchPos(struct chrdata *chr) +s32 botGuessCrouchPos(struct chrdata *chr) { s32 crouchpos; @@ -2578,7 +2581,7 @@ s32 chrGuessCrouchPos(struct chrdata *chr) return crouchpos; } -bool func0f191448(struct chrdata *chr) +bool botApplyMovement(struct chrdata *chr) { struct aibot *aibot; u32 stack; @@ -2602,7 +2605,7 @@ bool func0f191448(struct chrdata *chr) speedforwards = aibot->unk06c * cosf(angle) - sinf(angle) * aibot->unk070; speedsideways = aibot->unk06c * sinf(angle) + cosf(angle) * aibot->unk070; - func0f0c2a58(chr, chrGuessCrouchPos(chr), speedsideways, speedforwards, aibot->speedtheta, &aibot->angleoffset, &aibot->unk068); + func0f0c2a58(chr, botGuessCrouchPos(chr), speedsideways, speedforwards, aibot->speedtheta, &aibot->angleoffset, &aibot->unk068); angle2 = chrGetInverseTheta(chr) - aibot->angleoffset; @@ -2619,7 +2622,7 @@ bool func0f191448(struct chrdata *chr) return true; } -s32 mpchrGetWeaponNum(struct chrdata *chr) +s32 botGetWeaponNum(struct chrdata *chr) { if (chr->aibot) { return chr->aibot->weaponnum; @@ -2628,19 +2631,19 @@ s32 mpchrGetWeaponNum(struct chrdata *chr) return g_Vars.players[propGetPlayerNum(chr->prop)]->hands[HAND_RIGHT].gset.weaponnum; } -u8 mpchrGetTargetsWeaponNum(struct chrdata *chr) +u8 botGetTargetsWeaponNum(struct chrdata *chr) { struct prop *target = chrGetTargetProp(chr); - u8 weaponnum = 0; + u8 weaponnum = WEAPON_NONE; if (target) { - weaponnum = mpchrGetWeaponNum(target->chr); + weaponnum = botGetWeaponNum(target->chr); } return weaponnum; } -bool func0f191638(struct chrdata *chr, bool arg1) +bool bot0f191638(struct chrdata *chr, bool arg1) { bool result = false; struct prop *target; @@ -2656,20 +2659,20 @@ bool func0f191638(struct chrdata *chr, bool arg1) result = true; } - if (chr->aibot->simulant->difficulty > SIMDIFF_MEAT) { + if (chr->aibot->config->difficulty > BOTDIFF_MEAT) { if (chr->aibot->unk178[mpindex] >= g_Vars.lvframe60 - PALDOWN(240) || (arrayIntersects(chr->prop->rooms, target->rooms))) { result = true; } - if (chr->aibot->simulant->difficulty >= SIMDIFF_NORMAL) { + if (chr->aibot->config->difficulty >= BOTDIFF_NORMAL) { if (roomsAreNeighbours(chr->prop->rooms[0], target->rooms[0]) || chr->aibot->unk1a8[mpindex] == target->rooms[0] || roomsAreNeighbours(chr->aibot->unk1a8[mpindex], target->rooms[0])) { result = true; } - if (chr->aibot->simulant->difficulty == SIMDIFF_NORMAL) { + if (chr->aibot->config->difficulty == BOTDIFF_NORMAL) { if (chr->aibot->unk208 > 0 && chr->aibot->unk208 < 4) { result = true; } @@ -2682,7 +2685,7 @@ bool func0f191638(struct chrdata *chr, bool arg1) } if (!arg1 - && (chr->aibot->simulant->difficulty == SIMDIFF_MEAT || chr->aibot->simulant->difficulty == SIMDIFF_EASY) + && (chr->aibot->config->difficulty == BOTDIFF_MEAT || chr->aibot->config->difficulty == BOTDIFF_EASY) && !func0f02e064(chr)) { f32 tmp = func0f03e578(chr); f32 angle = atan2f(target->pos.x - chr->prop->pos.x, target->pos.z - chr->prop->pos.z) - tmp; @@ -2695,12 +2698,12 @@ bool func0f191638(struct chrdata *chr, bool arg1) angle = M_BADTAU - angle; } - if (chr->aibot->simulant->difficulty == SIMDIFF_MEAT) { + if (chr->aibot->config->difficulty == BOTDIFF_MEAT) { if (angle > 0.43626284599304f) { result = false; } } else { - if (chr->aibot->simulant->difficulty == SIMDIFF_EASY && angle > 1.5705461502075f) { + if (chr->aibot->config->difficulty == BOTDIFF_EASY && angle > 1.5705461502075f) { result = false; } } @@ -2712,7 +2715,7 @@ bool func0f191638(struct chrdata *chr, bool arg1) #if VERSION >= VERSION_PAL_FINAL GLOBAL_ASM( -glabel aibotTick +glabel botTick .late_rodata glabel var7f1b8ecc .word 0x40c907a9 @@ -2761,7 +2764,7 @@ glabel var7f1b8ef0 /* f191928: 29010091 */ slti $at,$t0,0x91 /* f19192c: 1420017f */ bnez $at,.L0f191f2c /* f191930: 00000000 */ nop -/* f191934: 0fc652d0 */ jal func0f194b40 +/* f191934: 0fc652d0 */ jal botTickUnpaused /* f191938: 02202025 */ or $a0,$s1,$zero /* f19193c: 920a009c */ lbu $t2,0x9c($s0) /* f191940: 2401ffff */ addiu $at,$zero,-1 @@ -2837,7 +2840,7 @@ glabel var7f1b8ef0 /* f191a3c: 10000053 */ b .L0f191b8c /* f191a40: 46000086 */ mov.s $f2,$f0 .L0f191a44: -/* f191a44: 0fc6458e */ jal func0f191638 +/* f191a44: 0fc6458e */ jal bot0f191638 /* f191a48: 00002825 */ or $a1,$zero,$zero /* f191a4c: 5040000c */ beqzl $v0,.L0f191a80 /* f191a50: 922402a0 */ lbu $a0,0x2a0($s1) @@ -2897,10 +2900,10 @@ glabel var7f1b8ef0 /* f191b20: 914b0048 */ lbu $t3,0x48($t2) /* f191b24: 51600008 */ beqzl $t3,.L0f191b48 /* f191b28: 24010033 */ addiu $at,$zero,0x33 -/* f191b2c: 3c04800b */ lui $a0,%hi(g_MpPlayerChrs) +/* f191b2c: 3c04800b */ lui $a0,%hi(g_MpAllChrPtrs) /* f191b30: 00832021 */ addu $a0,$a0,$v1 /* f191b34: 0fc0f917 */ jal chrGetInverseTheta -/* f191b38: 8c84c4d0 */ lw $a0,%lo(g_MpPlayerChrs)($a0) +/* f191b38: 8c84c4d0 */ lw $a0,%lo(g_MpAllChrPtrs)($a0) /* f191b3c: 10000013 */ b .L0f191b8c /* f191b40: 46000086 */ mov.s $f2,$f0 .L0f191b44: @@ -3188,7 +3191,7 @@ glabel var7f1b8ef0 /* f191f24: 8d8c9fc8 */ lw $t4,%lo(g_Vars+0x8)($t4) /* f191f28: ae0c01e4 */ sw $t4,0x1e4($s0) .L0f191f2c: -/* f191f2c: 0fc64512 */ jal func0f191448 +/* f191f2c: 0fc64512 */ jal botApplyMovement /* f191f30: 02202025 */ or $a0,$s1,$zero /* f191f34: 0fc08c26 */ jal chrTick /* f191f38: 8fa40068 */ lw $a0,0x68($sp) @@ -3211,7 +3214,7 @@ glabel var7f1b8ef0 /* f191f78: 02202025 */ or $a0,$s1,$zero /* f191f7c: 54400004 */ bnezl $v0,.L0f191f90 /* f191f80: 8fbf0024 */ lw $ra,0x24($sp) -/* f191f84: 0fc64493 */ jal func0f19124c +/* f191f84: 0fc64493 */ jal botCheckPickups /* f191f88: 02202025 */ or $a0,$s1,$zero .L0f191f8c: /* f191f8c: 8fbf0024 */ lw $ra,0x24($sp) @@ -3224,7 +3227,7 @@ glabel var7f1b8ef0 ); #else GLOBAL_ASM( -glabel aibotTick +glabel botTick .late_rodata glabel var7f1b8ecc .word 0x40c907a9 @@ -3273,7 +3276,7 @@ glabel var7f1b8ef0 /* f191928: 29010091 */ slti $at,$t0,0x91 /* f19192c: 1420017f */ bnez $at,.L0f191f2c /* f191930: 00000000 */ nop -/* f191934: 0fc652d0 */ jal func0f194b40 +/* f191934: 0fc652d0 */ jal botTickUnpaused /* f191938: 02202025 */ or $a0,$s1,$zero /* f19193c: 920a009c */ lbu $t2,0x9c($s0) /* f191940: 2401ffff */ addiu $at,$zero,-1 @@ -3349,7 +3352,7 @@ glabel var7f1b8ef0 /* f191a3c: 10000053 */ b .L0f191b8c /* f191a40: 46000086 */ mov.s $f2,$f0 .L0f191a44: -/* f191a44: 0fc6458e */ jal func0f191638 +/* f191a44: 0fc6458e */ jal bot0f191638 /* f191a48: 00002825 */ or $a1,$zero,$zero /* f191a4c: 5040000c */ beqzl $v0,.L0f191a80 /* f191a50: 922402a0 */ lbu $a0,0x2a0($s1) @@ -3409,10 +3412,10 @@ glabel var7f1b8ef0 /* f191b20: 914b0048 */ lbu $t3,0x48($t2) /* f191b24: 51600008 */ beqzl $t3,.L0f191b48 /* f191b28: 24010033 */ addiu $at,$zero,0x33 -/* f191b2c: 3c04800b */ lui $a0,%hi(g_MpPlayerChrs) +/* f191b2c: 3c04800b */ lui $a0,%hi(g_MpAllChrPtrs) /* f191b30: 00832021 */ addu $a0,$a0,$v1 /* f191b34: 0fc0f917 */ jal chrGetInverseTheta -/* f191b38: 8c84c4d0 */ lw $a0,%lo(g_MpPlayerChrs)($a0) +/* f191b38: 8c84c4d0 */ lw $a0,%lo(g_MpAllChrPtrs)($a0) /* f191b3c: 10000013 */ b .L0f191b8c /* f191b40: 46000086 */ mov.s $f2,$f0 .L0f191b44: @@ -3700,7 +3703,7 @@ glabel var7f1b8ef0 /* f191f24: 8d8c9fc8 */ lw $t4,%lo(g_Vars+0x8)($t4) /* f191f28: ae0c01e4 */ sw $t4,0x1e4($s0) .L0f191f2c: -/* f191f2c: 0fc64512 */ jal func0f191448 +/* f191f2c: 0fc64512 */ jal botApplyMovement /* f191f30: 02202025 */ or $a0,$s1,$zero /* f191f34: 0fc08c26 */ jal chrTick /* f191f38: 8fa40068 */ lw $a0,0x68($sp) @@ -3723,7 +3726,7 @@ glabel var7f1b8ef0 /* f191f78: 02202025 */ or $a0,$s1,$zero /* f191f7c: 54400004 */ bnezl $v0,.L0f191f90 /* f191f80: 8fbf0024 */ lw $ra,0x24($sp) -/* f191f84: 0fc64493 */ jal func0f19124c +/* f191f84: 0fc64493 */ jal botCheckPickups /* f191f88: 02202025 */ or $a0,$s1,$zero .L0f191f8c: /* f191f8c: 8fbf0024 */ lw $ra,0x24($sp) @@ -3737,7 +3740,7 @@ glabel var7f1b8ef0 #endif // Mismatch: updateable is calculated differently -//s32 aibotTick(struct prop *prop) +//s32 botTick(struct prop *prop) //{ // struct chrdata *chr = prop->chr; // struct aibot *aibot = chr->aibot; @@ -3753,7 +3756,7 @@ glabel var7f1b8ef0 // // if (aibot) { // if (updateable && g_Vars.lvframe60 >= 145) { -// func0f194b40(chr); +// botTickUnpaused(chr); // // // Calculate cheap // aibot->cheap = true; @@ -3786,7 +3789,7 @@ glabel var7f1b8ef0 // newangle = chrGetInverseTheta(chr); // } else if (aibot->skrocket) { // newangle = chrGetInverseTheta(chr); -// } else if (func0f191638(chr, false)) { +// } else if (bot0f191638(chr, false)) { // struct prop *target = chrGetTargetProp(chr); // newangle = oldangle + chrGetAngleToPos(chr, &target->pos) + aibot->unk1c0; // } else if (chr->myaction == MA_AIBOTDOWNLOAD && g_ScenarioData.htm.unk0d4 != -1) { @@ -3795,11 +3798,11 @@ glabel var7f1b8ef0 // && aibot->followingplayernum >= 0 // && aibot->playerdistances[aibot->followingplayernum] < 300 // && aibot->unk1e4 >= g_Vars.lvframe60 - 60 -// && aibot->simulant->difficulty != SIMDIFF_MEAT) { -// newangle = chrGetInverseTheta(g_MpPlayerChrs[aibot->followingplayernum]); +// && aibot->config->difficulty != BOTDIFF_MEAT) { +// newangle = chrGetInverseTheta(g_MpAllChrPtrs[aibot->followingplayernum]); // } else if (chr->myaction == MA_AIBOTDEFEND // && aibot->unk1e4 >= g_Vars.lvframe60 - 60 -// && aibot->simulant->difficulty != SIMDIFF_MEAT) { +// && aibot->config->difficulty != BOTDIFF_MEAT) { // newangle = aibot->unk098; // } else { // newangle = func0f03e578(chr); @@ -3906,7 +3909,7 @@ glabel var7f1b8ef0 // } // } // -// func0f191448(chr); +// botApplyMovement(chr); // // result = chrTick(prop); // @@ -3916,7 +3919,7 @@ glabel var7f1b8ef0 // } // // if (updateable && !chrIsDead(chr)) { -// func0f19124c(chr); +// botCheckPickups(chr); // } // } // } @@ -3924,7 +3927,7 @@ glabel var7f1b8ef0 // return result; //} -f32 aibotCalculateMaxSpeed(struct chrdata *chr) +f32 botCalculateMaxSpeed(struct chrdata *chr) { f32 speed; @@ -3936,37 +3939,37 @@ f32 aibotCalculateMaxSpeed(struct chrdata *chr) speed = speed * 0.002830188954249f + 1.0f; - if (chr->aibot->simulant->base.simtype == SIMTYPE_TURTLE) { + if (chr->aibot->config->type == BOTTYPE_TURTLE) { speed *= 3.5f; - } else if (chr->aibot->simulant->base.simtype == SIMTYPE_SPEED) { + } else if (chr->aibot->config->type == BOTTYPE_SPEED) { speed *= 14.0f; } else { - switch (chr->aibot->simulant->difficulty) { - case SIMDIFF_MEAT: + switch (chr->aibot->config->difficulty) { + case BOTDIFF_MEAT: speed *= 5.0f; break; - case SIMDIFF_EASY: + case BOTDIFF_EASY: speed *= 6.2f; break; default: - case SIMDIFF_NORMAL: + case BOTDIFF_NORMAL: speed *= 7.6f; break; - case SIMDIFF_HARD: + case BOTDIFF_HARD: speed *= 9.4f; break; - case SIMDIFF_PERFECT: + case BOTDIFF_PERFECT: speed *= 11.2f; break; - case SIMDIFF_DARK: + case BOTDIFF_DARK: speed *= 11.2f; break; } } - if (chrGuessCrouchPos(chr) == CROUCHPOS_SQUAT) { + if (botGuessCrouchPos(chr) == CROUCHPOS_SQUAT) { speed *= 0.35f; - } else if (chrGuessCrouchPos(chr) == CROUCHPOS_DUCK) { + } else if (botGuessCrouchPos(chr) == CROUCHPOS_DUCK) { speed *= 0.5f; } else if (chr->actiontype == ACT_GOPOS && chr->act_gopos.waypoints[chr->act_gopos.curindex] == NULL @@ -3978,7 +3981,7 @@ f32 aibotCalculateMaxSpeed(struct chrdata *chr) } #if VERSION >= VERSION_NTSC_1_0 -void func0f1921f8(struct chrdata *chr, f32 *move, s32 numupdates, f32 arg3) +void bot0f1921f8(struct chrdata *chr, f32 *move, s32 numupdates, f32 arg3) { s32 i; f32 sp50; @@ -4004,7 +4007,7 @@ void func0f1921f8(struct chrdata *chr, f32 *move, s32 numupdates, f32 arg3) fVar7 = chr->aibot->unk070; fVar8 = chr->aibot->unk06c; - speed = aibotCalculateMaxSpeed(chr); + speed = botCalculateMaxSpeed(chr); fVar7 *= speed; fVar8 *= speed; @@ -4032,7 +4035,7 @@ void func0f1921f8(struct chrdata *chr, f32 *move, s32 numupdates, f32 arg3) } #else GLOBAL_ASM( -glabel func0f1921f8 +glabel bot0f1921f8 .late_rodata glabel var7f1b3510nb .word 0x3d6147b0 @@ -4064,7 +4067,7 @@ glabel var7f1b3514nb /* f18c334: c4540070 */ lwc1 $f20,0x70($v0) .NB0f18c338: /* f18c338: c456006c */ lwc1 $f22,0x6c($v0) -/* f18c33c: 0fc63022 */ jal aibotCalculateMaxSpeed +/* f18c33c: 0fc63022 */ jal botCalculateMaxSpeed /* f18c340: afa5005c */ sw $a1,0x5c($sp) /* f18c344: 4600a502 */ mul.s $f20,$f20,$f0 /* f18c348: 02002025 */ or $a0,$s0,$zero @@ -4146,7 +4149,7 @@ glabel var7f1b3514nb ); #endif -char *mpGetBotCommandName(s32 command) +char *botGetCommandName(s32 command) { if (command < 0 || command >= NUM_MPBOTCOMMANDS) { return langGet(L_MISC_179); // "Normal" @@ -4155,28 +4158,28 @@ char *mpGetBotCommandName(s32 command) return langGet(g_MpBotCommands[command]); } -void mpAibotApplyAttack(struct chrdata *chr, struct prop *prop) +void botApplyAttack(struct chrdata *chr, struct prop *prop) { chr->aibot->command = AIBOTCMD_ATTACK; chr->aibot->attackpropnum = prop - g_Vars.props; chr->aibot->unk0d8 = 1; } -void mpAibotApplyFollow(struct chrdata *chr, struct prop *prop) +void botApplyFollow(struct chrdata *chr, struct prop *prop) { chr->aibot->command = AIBOTCMD_FOLLOW; chr->aibot->followprotectpropnum = prop - g_Vars.props; chr->aibot->unk0d8 = 1; } -void mpAibotApplyProtect(struct chrdata *chr, struct prop *prop) +void botApplyProtect(struct chrdata *chr, struct prop *prop) { chr->aibot->command = AIBOTCMD_PROTECT; chr->aibot->followprotectpropnum = prop - g_Vars.props; chr->aibot->unk0d8 = 1; } -void mpAibotApplyDefend(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3) +void botApplyDefend(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3) { chr->aibot->command = AIBOTCMD_DEFEND; chr->aibot->defendholdpos.x = pos->x; @@ -4187,7 +4190,7 @@ void mpAibotApplyDefend(struct chrdata *chr, struct coord *pos, s16 *room, f32 a chr->aibot->unk0d8 = 1; } -void mpAibotApplyHold(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3) +void botApplyHold(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3) { chr->aibot->command = AIBOTCMD_HOLD; chr->aibot->defendholdpos.x = pos->x; @@ -4198,13 +4201,13 @@ void mpAibotApplyHold(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg chr->aibot->unk0d8 = 1; } -void mpAibotApplyScenarioCommand(struct chrdata *chr, u32 command) +void botApplyScenarioCommand(struct chrdata *chr, u32 command) { chr->aibot->command = command; chr->aibot->unk0d8 = 1; } -void aibotLoseGun(struct chrdata *chr, struct prop *attackerprop) +void botLoseGun(struct chrdata *chr, struct prop *attackerprop) { if (chr->aibot->weaponnum >= WEAPON_FALCON2 && chr->aibot->weaponnum != WEAPON_BRIEFCASE2) { struct prop *prop = NULL; @@ -4240,16 +4243,16 @@ void aibotLoseGun(struct chrdata *chr, struct prop *attackerprop) } } - aibotRemoveInvItem(chr, chr->aibot->weaponnum); + botinvRemoveItem(chr, chr->aibot->weaponnum); chr->aibot->loadedammo[0] = 0; chr->aibot->loadedammo[1] = 0; - aibotSwitchToWeapon(chr, WEAPON_UNARMED, FUNC_PRIMARY); + botinvSwitchToWeapon(chr, WEAPON_UNARMED, FUNC_PRIMARY); } } -void func0f19277c(struct chrdata *chr, s32 propnum) +void bot0f19277c(struct chrdata *chr, s32 propnum) { struct chrdata *chr2 = NULL; s32 index; @@ -4310,7 +4313,7 @@ void func0f19277c(struct chrdata *chr, s32 propnum) } } -bool func0f19294c(struct chrdata *botchr, struct chrdata *otherchr) +bool bot0f19294c(struct chrdata *botchr, struct chrdata *otherchr) { if (otherchr->prop->type == PROPTYPE_PLAYER && !g_Vars.bondvisible) { return true; @@ -4339,15 +4342,15 @@ bool func0f19294c(struct chrdata *botchr, struct chrdata *otherchr) * The death barrier is at -30000. * It's assumed that no walkable ground exists below -20000. */ -bool chrHasGround(struct chrdata *chr) +bool botHasGround(struct chrdata *chr) { return chr->ground >= -20000; } -void func0f192a74(struct chrdata *chr) +void bot0f192a74(struct chrdata *chr) { struct aibot *aibot = chr->aibot; - s32 diff = aibot->simulant->difficulty; + s32 diff = aibot->config->difficulty; s32 i; f32 fVar12; f32 fVar11; @@ -4421,49 +4424,57 @@ void func0f192a74(struct chrdata *chr) aibot->unk1c0 = aibot->unk1c4 * (PAL ? 0.029999971389771f : 0.024999976158142f); } -bool func0f192d64(struct chrdata *botchr, struct chrdata *otherchr) +/** + * Return true if the bot is a peacesim and is happy to fight the given chr, + * or if the bot is not a peacesim. + */ +bool botPassesPeaceCheck(struct chrdata *botchr, struct chrdata *otherchr) { struct aibot *aibot = botchr->aibot; - bool result = true; + bool pass = true; - if (aibot->simulant->base.simtype == SIMTYPE_PEACE) { - s32 weaponnum = mpchrGetWeaponNum(otherchr); + if (aibot->config->type == BOTTYPE_PEACE) { + s32 otherweaponnum = botGetWeaponNum(otherchr); - if (weaponnum == WEAPON_NONE || weaponnum == WEAPON_UNARMED) { - result = false; + if (otherweaponnum == WEAPON_NONE || otherweaponnum == WEAPON_UNARMED) { + pass = false; } } - return result; + return pass; } -bool func0f192dc0(struct chrdata *botchr, struct chrdata *chr) +/** + * Return true if the bot is a cowardsim and is happy to fight the given chr, + * or if the bot is not a cowardsim. + */ +bool botPassesCowardCheck(struct chrdata *botchr, struct chrdata *otherchr) { struct aibot *aibot = botchr->aibot; - bool result = true; + bool pass = true; s32 otherweaponnum; s32 myscore1; s32 myscore2; s32 theirscore1; s32 theirscore2; - if (aibot->simulant->base.simtype == SIMTYPE_COWARD) { - otherweaponnum = mpchrGetWeaponNum(chr); + if (aibot->config->type == BOTTYPE_COWARD) { + otherweaponnum = botGetWeaponNum(otherchr); - aibotScoreWeapon(botchr, aibot->weaponnum, FUNC_PRIMARY, 1, false, &myscore1, &myscore2, false, false); - aibotScoreWeapon(botchr, otherweaponnum, FUNC_PRIMARY, 1, false, &theirscore1, &theirscore2, false, false); + botinvScoreWeapon(botchr, aibot->weaponnum, FUNC_PRIMARY, 1, false, &myscore1, &myscore2, false, false); + botinvScoreWeapon(botchr, otherweaponnum, FUNC_PRIMARY, 1, false, &theirscore1, &theirscore2, false, false); if (theirscore1 >= myscore1 - 30) { - result = false; + pass = false; } } - return result; + return pass; } #if VERSION >= VERSION_PAL_FINAL GLOBAL_ASM( -glabel func0f192e90 +glabel bot0f192e90 /* f192e90: 27bdff58 */ addiu $sp,$sp,-168 /* f192e94: afbf002c */ sw $ra,0x2c($sp) /* f192e98: afb50028 */ sw $s5,0x28($sp) @@ -4476,8 +4487,8 @@ glabel func0f192e90 /* f192eb4: 240effff */ addiu $t6,$zero,-1 /* f192eb8: a7ae006a */ sh $t6,0x6a($sp) /* f192ebc: 8e6f012c */ lw $t7,0x12c($s3) -/* f192ec0: 3c19800b */ lui $t9,%hi(g_MpNumPlayers) -/* f192ec4: 8f39c530 */ lw $t9,%lo(g_MpNumPlayers)($t9) +/* f192ec0: 3c19800b */ lui $t9,%hi(g_MpNumChrs) +/* f192ec4: 8f39c530 */ lw $t9,%lo(g_MpNumChrs)($t9) /* f192ec8: 25f80001 */ addiu $t8,$t7,0x1 /* f192ecc: 0080a825 */ or $s5,$a0,$zero /* f192ed0: 0319001a */ div $zero,$t8,$t9 @@ -4502,10 +4513,10 @@ glabel func0f192e90 /* f192f14: 00000000 */ nop /* f192f18: 24013840 */ addiu $at,$zero,0x2ee0 /* f192f1c: 0041001b */ divu $zero,$v0,$at -/* f192f20: 3c0d800b */ lui $t5,%hi(g_MpNumPlayers) +/* f192f20: 3c0d800b */ lui $t5,%hi(g_MpNumChrs) /* f192f24: 3c0e800a */ lui $t6,%hi(g_Vars+0x38) /* f192f28: 8dce9ff8 */ lw $t6,%lo(g_Vars+0x38)($t6) -/* f192f2c: 8dadc530 */ lw $t5,%lo(g_MpNumPlayers)($t5) +/* f192f2c: 8dadc530 */ lw $t5,%lo(g_MpNumChrs)($t5) /* f192f30: 00006010 */ mfhi $t4 /* f192f34: 00000000 */ nop /* f192f38: 00000000 */ nop @@ -4542,8 +4553,8 @@ glabel func0f192e90 /* f192fb0: 318fffef */ andi $t7,$t4,0xffef /* f192fb4: a26f009c */ sb $t7,0x9c($s3) .L0f192fb8: -/* f192fb8: 3c07800b */ lui $a3,%hi(g_MpNumPlayers) -/* f192fbc: 8ce7c530 */ lw $a3,%lo(g_MpNumPlayers)($a3) +/* f192fb8: 3c07800b */ lui $a3,%hi(g_MpNumChrs) +/* f192fbc: 8ce7c530 */ lw $a3,%lo(g_MpNumChrs)($a3) /* f192fc0: 00009025 */ or $s2,$zero,$zero /* f192fc4: 02608025 */ or $s0,$s3,$zero /* f192fc8: 18e00010 */ blez $a3,.L0f19300c @@ -4556,9 +4567,9 @@ glabel func0f192e90 /* f192fe0: 26520001 */ addiu $s2,$s2,0x1 /* f192fe4: 8d4b0008 */ lw $t3,0x8($t2) /* f192fe8: 026dc821 */ addu $t9,$s3,$t5 -/* f192fec: 3c07800b */ lui $a3,%hi(g_MpNumPlayers) +/* f192fec: 3c07800b */ lui $a3,%hi(g_MpNumChrs) /* f192ff0: af2b0178 */ sw $t3,0x178($t9) -/* f192ff4: 8ce7c530 */ lw $a3,%lo(g_MpNumPlayers)($a3) +/* f192ff4: 8ce7c530 */ lw $a3,%lo(g_MpNumChrs)($a3) /* f192ff8: 26520001 */ addiu $s2,$s2,0x1 .L0f192ffc: /* f192ffc: 0247082a */ slt $at,$s2,$a3 @@ -4615,22 +4626,22 @@ glabel func0f192e90 /* f1930a8: a3060130 */ sb $a2,0x130($t8) /* f1930ac: 010d5821 */ addu $t3,$t0,$t5 /* f1930b0: ad690000 */ sw $t1,0x0($t3) -/* f1930b4: 3c07800b */ lui $a3,%hi(g_MpNumPlayers) -/* f1930b8: 8ce7c530 */ lw $a3,%lo(g_MpNumPlayers)($a3) +/* f1930b4: 3c07800b */ lui $a3,%hi(g_MpNumChrs) +/* f1930b8: 8ce7c530 */ lw $a3,%lo(g_MpNumChrs)($a3) .L0f1930bc: /* f1930bc: 26520001 */ addiu $s2,$s2,0x1 /* f1930c0: 0247082a */ slt $at,$s2,$a3 /* f1930c4: 5420ffdf */ bnezl $at,.L0f193044 /* f1930c8: 2406ffff */ addiu $a2,$zero,-1 .L0f1930cc: -/* f1930cc: 0fc64a9d */ jal func0f192a74 +/* f1930cc: 0fc64a9d */ jal bot0f192a74 /* f1930d0: 02a02025 */ or $a0,$s5,$zero /* f1930d4: 92a202a0 */ lbu $v0,0x2a0($s5) /* f1930d8: 2401002e */ addiu $at,$zero,0x2e /* f1930dc: 02a02025 */ or $a0,$s5,$zero /* f1930e0: 54410006 */ bnel $v0,$at,.L0f1930fc /* f1930e4: 2401002f */ addiu $at,$zero,0x2f -/* f1930e8: 0fc649df */ jal func0f19277c +/* f1930e8: 0fc649df */ jal bot0f19277c /* f1930ec: 2405ffff */ addiu $a1,$zero,-1 /* f1930f0: 100000f2 */ b .L0f1934bc /* f1930f4: 8fbf002c */ lw $ra,0x2c($sp) @@ -4642,8 +4653,8 @@ glabel func0f192e90 /* f193108: 0440001b */ bltz $v0,.L0f193178 /* f19310c: 0262c821 */ addu $t9,$s3,$v0 /* f193110: 932c016c */ lbu $t4,0x16c($t9) -/* f193114: 3c10800b */ lui $s0,%hi(g_MpPlayerChrs) -/* f193118: 2610c4d0 */ addiu $s0,$s0,%lo(g_MpPlayerChrs) +/* f193114: 3c10800b */ lui $s0,%hi(g_MpAllChrPtrs) +/* f193118: 2610c4d0 */ addiu $s0,$s0,%lo(g_MpAllChrPtrs) /* f19311c: 11800016 */ beqz $t4,.L0f193178 /* f193120: 00027080 */ sll $t6,$v0,0x2 /* f193124: 020e7821 */ addu $t7,$s0,$t6 @@ -4663,7 +4674,7 @@ glabel func0f192e90 /* f19315c: 018e2823 */ subu $a1,$t4,$t6 /* f193160: 00a1001a */ div $zero,$a1,$at /* f193164: 00002812 */ mflo $a1 -/* f193168: 0fc649df */ jal func0f19277c +/* f193168: 0fc649df */ jal bot0f19277c /* f19316c: 00000000 */ nop /* f193170: 100000d2 */ b .L0f1934bc /* f193174: 8fbf002c */ lw $ra,0x2c($sp) @@ -4686,7 +4697,7 @@ glabel func0f192e90 /* f1931ac: 8dab0128 */ lw $t3,0x128($t5) /* f1931b0: 55600007 */ bnezl $t3,.L0f1931d0 /* f1931b4: 02a02025 */ or $a0,$s5,$zero -/* f1931b8: 0fc64a53 */ jal func0f19294c +/* f1931b8: 0fc64a53 */ jal bot0f19294c /* f1931bc: 8e050004 */ lw $a1,0x4($s0) /* f1931c0: 50400003 */ beqzl $v0,.L0f1931d0 /* f1931c4: 02a02025 */ or $a0,$s5,$zero @@ -4700,7 +4711,7 @@ glabel func0f192e90 /* f1931e0: 02a02025 */ or $a0,$s5,$zero /* f1931e4: a6b1017e */ sh $s1,0x17e($s5) .L0f1931e8: -/* f1931e8: 0fc64b59 */ jal func0f192d64 +/* f1931e8: 0fc64b59 */ jal botPassesPeaceCheck /* f1931ec: 8e050004 */ lw $a1,0x4($s0) /* f1931f0: 14400002 */ bnez $v0,.L0f1931fc /* f1931f4: 02a02025 */ or $a0,$s5,$zero @@ -4710,18 +4721,18 @@ glabel func0f192e90 /* f193200: 8f2c0128 */ lw $t4,0x128($t9) /* f193204: 55800007 */ bnezl $t4,.L0f193224 /* f193208: 86a2017e */ lh $v0,0x17e($s5) -/* f19320c: 0fc64b70 */ jal func0f192dc0 +/* f19320c: 0fc64b70 */ jal botPassesCowardCheck /* f193210: 8e050004 */ lw $a1,0x4($s0) /* f193214: 54400003 */ bnezl $v0,.L0f193224 /* f193218: 86a2017e */ lh $v0,0x17e($s5) /* f19321c: a6b1017e */ sh $s1,0x17e($s5) /* f193220: 86a2017e */ lh $v0,0x17e($s5) .L0f193224: -/* f193224: 3c0f800b */ lui $t7,%hi(g_MpNumPlayers) +/* f193224: 3c0f800b */ lui $t7,%hi(g_MpNumChrs) /* f193228: 3c0b800a */ lui $t3,%hi(g_Vars+0x338) /* f19322c: 16220062 */ bne $s1,$v0,.L0f1933b8 /* f193230: 000268c0 */ sll $t5,$v0,0x3 -/* f193234: 8defc530 */ lw $t7,%lo(g_MpNumPlayers)($t7) +/* f193234: 8defc530 */ lw $t7,%lo(g_MpNumChrs)($t7) /* f193238: 240effff */ addiu $t6,$zero,-1 /* f19323c: afae0050 */ sw $t6,0x50($sp) /* f193240: 19e00047 */ blez $t7,.L0f193360 @@ -4742,7 +4753,7 @@ glabel func0f192e90 /* f193278: 24060002 */ addiu $a2,$zero,0x2 /* f19327c: 10400031 */ beqz $v0,.L0f193344 /* f193280: 02a02025 */ or $a0,$s5,$zero -/* f193284: 0fc64b59 */ jal func0f192d64 +/* f193284: 0fc64b59 */ jal botPassesPeaceCheck /* f193288: 02202825 */ or $a1,$s1,$zero /* f19328c: 1040002d */ beqz $v0,.L0f193344 /* f193290: 0270c021 */ addu $t8,$s3,$s0 @@ -4757,12 +4768,12 @@ glabel func0f192e90 /* f1932b4: 01792823 */ subu $a1,$t3,$t9 /* f1932b8: 00a1001a */ div $zero,$a1,$at /* f1932bc: 00002812 */ mflo $a1 -/* f1932c0: 0fc649df */ jal func0f19277c +/* f1932c0: 0fc649df */ jal bot0f19277c /* f1932c4: 00000000 */ nop /* f1932c8: 1000007c */ b .L0f1934bc /* f1932cc: 8fbf002c */ lw $ra,0x2c($sp) .L0f1932d0: -/* f1932d0: 0fc64a53 */ jal func0f19294c +/* f1932d0: 0fc64a53 */ jal bot0f19294c /* f1932d4: 02202825 */ or $a1,$s1,$zero /* f1932d8: 14400013 */ bnez $v0,.L0f193328 /* f1932dc: 02a02025 */ or $a0,$s5,$zero @@ -4781,12 +4792,12 @@ glabel func0f192e90 /* f19330c: 01f82823 */ subu $a1,$t7,$t8 /* f193310: 00a1001a */ div $zero,$a1,$at /* f193314: 00002812 */ mflo $a1 -/* f193318: 0fc649df */ jal func0f19277c +/* f193318: 0fc649df */ jal bot0f19277c /* f19331c: 00000000 */ nop /* f193320: 10000066 */ b .L0f1934bc /* f193324: 8fbf002c */ lw $ra,0x2c($sp) .L0f193328: -/* f193328: 0fc64a53 */ jal func0f19294c +/* f193328: 0fc64a53 */ jal bot0f19294c /* f19332c: 02202825 */ or $a1,$s1,$zero /* f193330: 14400004 */ bnez $v0,.L0f193344 /* f193334: 8fab0050 */ lw $t3,0x50($sp) @@ -4794,8 +4805,8 @@ glabel func0f192e90 /* f19333c: 00000000 */ nop /* f193340: afb00050 */ sw $s0,0x50($sp) .L0f193344: -/* f193344: 3c19800b */ lui $t9,%hi(g_MpNumPlayers) -/* f193348: 8f39c530 */ lw $t9,%lo(g_MpNumPlayers)($t9) +/* f193344: 3c19800b */ lui $t9,%hi(g_MpNumChrs) +/* f193348: 8f39c530 */ lw $t9,%lo(g_MpNumChrs)($t9) /* f19334c: 26520001 */ addiu $s2,$s2,0x1 /* f193350: 26940001 */ addiu $s4,$s4,0x1 /* f193354: 0259082a */ slt $at,$s2,$t9 @@ -4816,12 +4827,12 @@ glabel func0f192e90 /* f19338c: 01cf2823 */ subu $a1,$t6,$t7 /* f193390: 00a1001a */ div $zero,$a1,$at /* f193394: 00002812 */ mflo $a1 -/* f193398: 0fc649df */ jal func0f19277c +/* f193398: 0fc649df */ jal bot0f19277c /* f19339c: 00000000 */ nop /* f1933a0: 10000046 */ b .L0f1934bc /* f1933a4: 8fbf002c */ lw $ra,0x2c($sp) .L0f1933a8: -/* f1933a8: 0fc649df */ jal func0f19277c +/* f1933a8: 0fc649df */ jal bot0f19277c /* f1933ac: 2405ffff */ addiu $a1,$zero,-1 /* f1933b0: 10000042 */ b .L0f1934bc /* f1933b4: 8fbf002c */ lw $ra,0x2c($sp) @@ -4835,15 +4846,15 @@ glabel func0f192e90 /* f1933d0: 02626021 */ addu $t4,$s3,$v0 /* f1933d4: 918e016c */ lbu $t6,0x16c($t4) /* f1933d8: 02a02025 */ or $a0,$s5,$zero -/* f1933dc: 3c0f800b */ lui $t7,%hi(g_MpNumPlayers) +/* f1933dc: 3c0f800b */ lui $t7,%hi(g_MpNumChrs) /* f1933e0: 11c00005 */ beqz $t6,.L0f1933f8 /* f1933e4: 00000000 */ nop -/* f1933e8: 0fc649df */ jal func0f19277c +/* f1933e8: 0fc649df */ jal bot0f19277c /* f1933ec: 86a5017e */ lh $a1,0x17e($s5) /* f1933f0: 10000032 */ b .L0f1934bc /* f1933f4: 8fbf002c */ lw $ra,0x2c($sp) .L0f1933f8: -/* f1933f8: 8defc530 */ lw $t7,%lo(g_MpNumPlayers)($t7) +/* f1933f8: 8defc530 */ lw $t7,%lo(g_MpNumChrs)($t7) /* f1933fc: 00009025 */ or $s2,$zero,$zero /* f193400: 02608025 */ or $s0,$s3,$zero /* f193404: 59e0002a */ blezl $t7,.L0f1934b0 @@ -4867,7 +4878,7 @@ glabel func0f192e90 /* f193448: 24060002 */ addiu $a2,$zero,0x2 /* f19344c: 10400010 */ beqz $v0,.L0f193490 /* f193450: 02a02025 */ or $a0,$s5,$zero -/* f193454: 0fc64b59 */ jal func0f192d64 +/* f193454: 0fc64b59 */ jal botPassesPeaceCheck /* f193458: 02202825 */ or $a1,$s1,$zero /* f19345c: 1040000c */ beqz $v0,.L0f193490 /* f193460: 3c19800a */ lui $t9,%hi(g_Vars+0x338) @@ -4878,13 +4889,13 @@ glabel func0f192e90 /* f193474: 01792823 */ subu $a1,$t3,$t9 /* f193478: 00a1001a */ div $zero,$a1,$at /* f19347c: 00002812 */ mflo $a1 -/* f193480: 0fc649df */ jal func0f19277c +/* f193480: 0fc649df */ jal bot0f19277c /* f193484: 00000000 */ nop /* f193488: 1000000c */ b .L0f1934bc /* f19348c: 8fbf002c */ lw $ra,0x2c($sp) .L0f193490: -/* f193490: 3c0e800b */ lui $t6,%hi(g_MpNumPlayers) -/* f193494: 8dcec530 */ lw $t6,%lo(g_MpNumPlayers)($t6) +/* f193490: 3c0e800b */ lui $t6,%hi(g_MpNumChrs) +/* f193494: 8dcec530 */ lw $t6,%lo(g_MpNumChrs)($t6) /* f193498: 26520001 */ addiu $s2,$s2,0x1 /* f19349c: 26100001 */ addiu $s0,$s0,0x1 /* f1934a0: 024e082a */ slt $at,$s2,$t6 @@ -4892,7 +4903,7 @@ glabel func0f192e90 /* f1934a8: 82040130 */ lb $a0,0x130($s0) /* f1934ac: 02a02025 */ or $a0,$s5,$zero .L0f1934b0: -/* f1934b0: 0fc649df */ jal func0f19277c +/* f1934b0: 0fc649df */ jal bot0f19277c /* f1934b4: 86a5017e */ lh $a1,0x17e($s5) /* f1934b8: 8fbf002c */ lw $ra,0x2c($sp) .L0f1934bc: @@ -4907,7 +4918,7 @@ glabel func0f192e90 ); #else GLOBAL_ASM( -glabel func0f192e90 +glabel bot0f192e90 /* f192e90: 27bdff58 */ addiu $sp,$sp,-168 /* f192e94: afbf002c */ sw $ra,0x2c($sp) /* f192e98: afb50028 */ sw $s5,0x28($sp) @@ -4920,8 +4931,8 @@ glabel func0f192e90 /* f192eb4: 240effff */ addiu $t6,$zero,-1 /* f192eb8: a7ae006a */ sh $t6,0x6a($sp) /* f192ebc: 8e6f012c */ lw $t7,0x12c($s3) -/* f192ec0: 3c19800b */ lui $t9,%hi(g_MpNumPlayers) -/* f192ec4: 8f39c530 */ lw $t9,%lo(g_MpNumPlayers)($t9) +/* f192ec0: 3c19800b */ lui $t9,%hi(g_MpNumChrs) +/* f192ec4: 8f39c530 */ lw $t9,%lo(g_MpNumChrs)($t9) /* f192ec8: 25f80001 */ addiu $t8,$t7,0x1 /* f192ecc: 0080a825 */ or $s5,$a0,$zero /* f192ed0: 0319001a */ div $zero,$t8,$t9 @@ -4946,10 +4957,10 @@ glabel func0f192e90 /* f192f14: 00000000 */ nop /* f192f18: 24013840 */ addiu $at,$zero,0x3840 /* f192f1c: 0041001b */ divu $zero,$v0,$at -/* f192f20: 3c0d800b */ lui $t5,%hi(g_MpNumPlayers) +/* f192f20: 3c0d800b */ lui $t5,%hi(g_MpNumChrs) /* f192f24: 3c0e800a */ lui $t6,%hi(g_Vars+0x38) /* f192f28: 8dce9ff8 */ lw $t6,%lo(g_Vars+0x38)($t6) -/* f192f2c: 8dadc530 */ lw $t5,%lo(g_MpNumPlayers)($t5) +/* f192f2c: 8dadc530 */ lw $t5,%lo(g_MpNumChrs)($t5) /* f192f30: 00006010 */ mfhi $t4 /* f192f34: 00000000 */ nop /* f192f38: 00000000 */ nop @@ -4986,8 +4997,8 @@ glabel func0f192e90 /* f192fb0: 318fffef */ andi $t7,$t4,0xffef /* f192fb4: a26f009c */ sb $t7,0x9c($s3) .L0f192fb8: -/* f192fb8: 3c07800b */ lui $a3,%hi(g_MpNumPlayers) -/* f192fbc: 8ce7c530 */ lw $a3,%lo(g_MpNumPlayers)($a3) +/* f192fb8: 3c07800b */ lui $a3,%hi(g_MpNumChrs) +/* f192fbc: 8ce7c530 */ lw $a3,%lo(g_MpNumChrs)($a3) /* f192fc0: 00009025 */ or $s2,$zero,$zero /* f192fc4: 02608025 */ or $s0,$s3,$zero /* f192fc8: 18e00010 */ blez $a3,.L0f19300c @@ -5000,9 +5011,9 @@ glabel func0f192e90 /* f192fe0: 26520001 */ addiu $s2,$s2,0x1 /* f192fe4: 8d4b0008 */ lw $t3,0x8($t2) /* f192fe8: 026dc821 */ addu $t9,$s3,$t5 -/* f192fec: 3c07800b */ lui $a3,%hi(g_MpNumPlayers) +/* f192fec: 3c07800b */ lui $a3,%hi(g_MpNumChrs) /* f192ff0: af2b0178 */ sw $t3,0x178($t9) -/* f192ff4: 8ce7c530 */ lw $a3,%lo(g_MpNumPlayers)($a3) +/* f192ff4: 8ce7c530 */ lw $a3,%lo(g_MpNumChrs)($a3) /* f192ff8: 26520001 */ addiu $s2,$s2,0x1 .L0f192ffc: /* f192ffc: 0247082a */ slt $at,$s2,$a3 @@ -5059,22 +5070,22 @@ glabel func0f192e90 /* f1930a8: a3060130 */ sb $a2,0x130($t8) /* f1930ac: 010d5821 */ addu $t3,$t0,$t5 /* f1930b0: ad690000 */ sw $t1,0x0($t3) -/* f1930b4: 3c07800b */ lui $a3,%hi(g_MpNumPlayers) -/* f1930b8: 8ce7c530 */ lw $a3,%lo(g_MpNumPlayers)($a3) +/* f1930b4: 3c07800b */ lui $a3,%hi(g_MpNumChrs) +/* f1930b8: 8ce7c530 */ lw $a3,%lo(g_MpNumChrs)($a3) .L0f1930bc: /* f1930bc: 26520001 */ addiu $s2,$s2,0x1 /* f1930c0: 0247082a */ slt $at,$s2,$a3 /* f1930c4: 5420ffdf */ bnezl $at,.L0f193044 /* f1930c8: 2406ffff */ addiu $a2,$zero,-1 .L0f1930cc: -/* f1930cc: 0fc64a9d */ jal func0f192a74 +/* f1930cc: 0fc64a9d */ jal bot0f192a74 /* f1930d0: 02a02025 */ or $a0,$s5,$zero /* f1930d4: 92a202a0 */ lbu $v0,0x2a0($s5) /* f1930d8: 2401002e */ addiu $at,$zero,0x2e /* f1930dc: 02a02025 */ or $a0,$s5,$zero /* f1930e0: 54410006 */ bnel $v0,$at,.L0f1930fc /* f1930e4: 2401002f */ addiu $at,$zero,0x2f -/* f1930e8: 0fc649df */ jal func0f19277c +/* f1930e8: 0fc649df */ jal bot0f19277c /* f1930ec: 2405ffff */ addiu $a1,$zero,-1 /* f1930f0: 100000f2 */ b .L0f1934bc /* f1930f4: 8fbf002c */ lw $ra,0x2c($sp) @@ -5086,8 +5097,8 @@ glabel func0f192e90 /* f193108: 0440001b */ bltz $v0,.L0f193178 /* f19310c: 0262c821 */ addu $t9,$s3,$v0 /* f193110: 932c016c */ lbu $t4,0x16c($t9) -/* f193114: 3c10800b */ lui $s0,%hi(g_MpPlayerChrs) -/* f193118: 2610c4d0 */ addiu $s0,$s0,%lo(g_MpPlayerChrs) +/* f193114: 3c10800b */ lui $s0,%hi(g_MpAllChrPtrs) +/* f193118: 2610c4d0 */ addiu $s0,$s0,%lo(g_MpAllChrPtrs) /* f19311c: 11800016 */ beqz $t4,.L0f193178 /* f193120: 00027080 */ sll $t6,$v0,0x2 /* f193124: 020e7821 */ addu $t7,$s0,$t6 @@ -5107,7 +5118,7 @@ glabel func0f192e90 /* f19315c: 018e2823 */ subu $a1,$t4,$t6 /* f193160: 00a1001a */ div $zero,$a1,$at /* f193164: 00002812 */ mflo $a1 -/* f193168: 0fc649df */ jal func0f19277c +/* f193168: 0fc649df */ jal bot0f19277c /* f19316c: 00000000 */ nop /* f193170: 100000d2 */ b .L0f1934bc /* f193174: 8fbf002c */ lw $ra,0x2c($sp) @@ -5130,7 +5141,7 @@ glabel func0f192e90 /* f1931ac: 8dab0128 */ lw $t3,0x128($t5) /* f1931b0: 55600007 */ bnezl $t3,.L0f1931d0 /* f1931b4: 02a02025 */ or $a0,$s5,$zero -/* f1931b8: 0fc64a53 */ jal func0f19294c +/* f1931b8: 0fc64a53 */ jal bot0f19294c /* f1931bc: 8e050004 */ lw $a1,0x4($s0) /* f1931c0: 50400003 */ beqzl $v0,.L0f1931d0 /* f1931c4: 02a02025 */ or $a0,$s5,$zero @@ -5144,7 +5155,7 @@ glabel func0f192e90 /* f1931e0: 02a02025 */ or $a0,$s5,$zero /* f1931e4: a6b1017e */ sh $s1,0x17e($s5) .L0f1931e8: -/* f1931e8: 0fc64b59 */ jal func0f192d64 +/* f1931e8: 0fc64b59 */ jal botPassesPeaceCheck /* f1931ec: 8e050004 */ lw $a1,0x4($s0) /* f1931f0: 14400002 */ bnez $v0,.L0f1931fc /* f1931f4: 02a02025 */ or $a0,$s5,$zero @@ -5154,18 +5165,18 @@ glabel func0f192e90 /* f193200: 8f2c0128 */ lw $t4,0x128($t9) /* f193204: 55800007 */ bnezl $t4,.L0f193224 /* f193208: 86a2017e */ lh $v0,0x17e($s5) -/* f19320c: 0fc64b70 */ jal func0f192dc0 +/* f19320c: 0fc64b70 */ jal botPassesCowardCheck /* f193210: 8e050004 */ lw $a1,0x4($s0) /* f193214: 54400003 */ bnezl $v0,.L0f193224 /* f193218: 86a2017e */ lh $v0,0x17e($s5) /* f19321c: a6b1017e */ sh $s1,0x17e($s5) /* f193220: 86a2017e */ lh $v0,0x17e($s5) .L0f193224: -/* f193224: 3c0f800b */ lui $t7,%hi(g_MpNumPlayers) +/* f193224: 3c0f800b */ lui $t7,%hi(g_MpNumChrs) /* f193228: 3c0b800a */ lui $t3,%hi(g_Vars+0x338) /* f19322c: 16220062 */ bne $s1,$v0,.L0f1933b8 /* f193230: 000268c0 */ sll $t5,$v0,0x3 -/* f193234: 8defc530 */ lw $t7,%lo(g_MpNumPlayers)($t7) +/* f193234: 8defc530 */ lw $t7,%lo(g_MpNumChrs)($t7) /* f193238: 240effff */ addiu $t6,$zero,-1 /* f19323c: afae0050 */ sw $t6,0x50($sp) /* f193240: 19e00047 */ blez $t7,.L0f193360 @@ -5186,7 +5197,7 @@ glabel func0f192e90 /* f193278: 24060002 */ addiu $a2,$zero,0x2 /* f19327c: 10400031 */ beqz $v0,.L0f193344 /* f193280: 02a02025 */ or $a0,$s5,$zero -/* f193284: 0fc64b59 */ jal func0f192d64 +/* f193284: 0fc64b59 */ jal botPassesPeaceCheck /* f193288: 02202825 */ or $a1,$s1,$zero /* f19328c: 1040002d */ beqz $v0,.L0f193344 /* f193290: 0270c021 */ addu $t8,$s3,$s0 @@ -5201,12 +5212,12 @@ glabel func0f192e90 /* f1932b4: 01792823 */ subu $a1,$t3,$t9 /* f1932b8: 00a1001a */ div $zero,$a1,$at /* f1932bc: 00002812 */ mflo $a1 -/* f1932c0: 0fc649df */ jal func0f19277c +/* f1932c0: 0fc649df */ jal bot0f19277c /* f1932c4: 00000000 */ nop /* f1932c8: 1000007c */ b .L0f1934bc /* f1932cc: 8fbf002c */ lw $ra,0x2c($sp) .L0f1932d0: -/* f1932d0: 0fc64a53 */ jal func0f19294c +/* f1932d0: 0fc64a53 */ jal bot0f19294c /* f1932d4: 02202825 */ or $a1,$s1,$zero /* f1932d8: 14400013 */ bnez $v0,.L0f193328 /* f1932dc: 02a02025 */ or $a0,$s5,$zero @@ -5225,12 +5236,12 @@ glabel func0f192e90 /* f19330c: 01f82823 */ subu $a1,$t7,$t8 /* f193310: 00a1001a */ div $zero,$a1,$at /* f193314: 00002812 */ mflo $a1 -/* f193318: 0fc649df */ jal func0f19277c +/* f193318: 0fc649df */ jal bot0f19277c /* f19331c: 00000000 */ nop /* f193320: 10000066 */ b .L0f1934bc /* f193324: 8fbf002c */ lw $ra,0x2c($sp) .L0f193328: -/* f193328: 0fc64a53 */ jal func0f19294c +/* f193328: 0fc64a53 */ jal bot0f19294c /* f19332c: 02202825 */ or $a1,$s1,$zero /* f193330: 14400004 */ bnez $v0,.L0f193344 /* f193334: 8fab0050 */ lw $t3,0x50($sp) @@ -5238,8 +5249,8 @@ glabel func0f192e90 /* f19333c: 00000000 */ nop /* f193340: afb00050 */ sw $s0,0x50($sp) .L0f193344: -/* f193344: 3c19800b */ lui $t9,%hi(g_MpNumPlayers) -/* f193348: 8f39c530 */ lw $t9,%lo(g_MpNumPlayers)($t9) +/* f193344: 3c19800b */ lui $t9,%hi(g_MpNumChrs) +/* f193348: 8f39c530 */ lw $t9,%lo(g_MpNumChrs)($t9) /* f19334c: 26520001 */ addiu $s2,$s2,0x1 /* f193350: 26940001 */ addiu $s4,$s4,0x1 /* f193354: 0259082a */ slt $at,$s2,$t9 @@ -5260,12 +5271,12 @@ glabel func0f192e90 /* f19338c: 01cf2823 */ subu $a1,$t6,$t7 /* f193390: 00a1001a */ div $zero,$a1,$at /* f193394: 00002812 */ mflo $a1 -/* f193398: 0fc649df */ jal func0f19277c +/* f193398: 0fc649df */ jal bot0f19277c /* f19339c: 00000000 */ nop /* f1933a0: 10000046 */ b .L0f1934bc /* f1933a4: 8fbf002c */ lw $ra,0x2c($sp) .L0f1933a8: -/* f1933a8: 0fc649df */ jal func0f19277c +/* f1933a8: 0fc649df */ jal bot0f19277c /* f1933ac: 2405ffff */ addiu $a1,$zero,-1 /* f1933b0: 10000042 */ b .L0f1934bc /* f1933b4: 8fbf002c */ lw $ra,0x2c($sp) @@ -5279,15 +5290,15 @@ glabel func0f192e90 /* f1933d0: 02626021 */ addu $t4,$s3,$v0 /* f1933d4: 918e016c */ lbu $t6,0x16c($t4) /* f1933d8: 02a02025 */ or $a0,$s5,$zero -/* f1933dc: 3c0f800b */ lui $t7,%hi(g_MpNumPlayers) +/* f1933dc: 3c0f800b */ lui $t7,%hi(g_MpNumChrs) /* f1933e0: 11c00005 */ beqz $t6,.L0f1933f8 /* f1933e4: 00000000 */ nop -/* f1933e8: 0fc649df */ jal func0f19277c +/* f1933e8: 0fc649df */ jal bot0f19277c /* f1933ec: 86a5017e */ lh $a1,0x17e($s5) /* f1933f0: 10000032 */ b .L0f1934bc /* f1933f4: 8fbf002c */ lw $ra,0x2c($sp) .L0f1933f8: -/* f1933f8: 8defc530 */ lw $t7,%lo(g_MpNumPlayers)($t7) +/* f1933f8: 8defc530 */ lw $t7,%lo(g_MpNumChrs)($t7) /* f1933fc: 00009025 */ or $s2,$zero,$zero /* f193400: 02608025 */ or $s0,$s3,$zero /* f193404: 59e0002a */ blezl $t7,.L0f1934b0 @@ -5311,7 +5322,7 @@ glabel func0f192e90 /* f193448: 24060002 */ addiu $a2,$zero,0x2 /* f19344c: 10400010 */ beqz $v0,.L0f193490 /* f193450: 02a02025 */ or $a0,$s5,$zero -/* f193454: 0fc64b59 */ jal func0f192d64 +/* f193454: 0fc64b59 */ jal botPassesPeaceCheck /* f193458: 02202825 */ or $a1,$s1,$zero /* f19345c: 1040000c */ beqz $v0,.L0f193490 /* f193460: 3c19800a */ lui $t9,%hi(g_Vars+0x338) @@ -5322,13 +5333,13 @@ glabel func0f192e90 /* f193474: 01792823 */ subu $a1,$t3,$t9 /* f193478: 00a1001a */ div $zero,$a1,$at /* f19347c: 00002812 */ mflo $a1 -/* f193480: 0fc649df */ jal func0f19277c +/* f193480: 0fc649df */ jal bot0f19277c /* f193484: 00000000 */ nop /* f193488: 1000000c */ b .L0f1934bc /* f19348c: 8fbf002c */ lw $ra,0x2c($sp) .L0f193490: -/* f193490: 3c0e800b */ lui $t6,%hi(g_MpNumPlayers) -/* f193494: 8dcec530 */ lw $t6,%lo(g_MpNumPlayers)($t6) +/* f193490: 3c0e800b */ lui $t6,%hi(g_MpNumChrs) +/* f193494: 8dcec530 */ lw $t6,%lo(g_MpNumChrs)($t6) /* f193498: 26520001 */ addiu $s2,$s2,0x1 /* f19349c: 26100001 */ addiu $s0,$s0,0x1 /* f1934a0: 024e082a */ slt $at,$s2,$t6 @@ -5336,7 +5347,7 @@ glabel func0f192e90 /* f1934a8: 82040130 */ lb $a0,0x130($s0) /* f1934ac: 02a02025 */ or $a0,$s5,$zero .L0f1934b0: -/* f1934b0: 0fc649df */ jal func0f19277c +/* f1934b0: 0fc649df */ jal bot0f19277c /* f1934b4: 86a5017e */ lh $a1,0x17e($s5) /* f1934b8: 8fbf002c */ lw $ra,0x2c($sp) .L0f1934bc: @@ -5351,7 +5362,7 @@ glabel func0f192e90 ); #endif -bool mpIsChrFollowedByChr(struct chrdata *leader, struct chrdata *follower) +bool botIsFollowing(struct chrdata *leader, struct chrdata *follower) { bool result = true; @@ -5362,7 +5373,7 @@ bool mpIsChrFollowedByChr(struct chrdata *leader, struct chrdata *follower) break; } - follower = g_MpPlayerChrs[aibot->followingplayernum]; + follower = g_MpAllChrPtrs[aibot->followingplayernum]; if (follower == leader) { result = false; @@ -5373,7 +5384,7 @@ bool mpIsChrFollowedByChr(struct chrdata *leader, struct chrdata *follower) return result; } -s32 func0f193530(struct chrdata *chr, f32 range) +s32 bot0f193530(struct chrdata *chr, f32 range) { s32 result = -1; @@ -5384,11 +5395,11 @@ s32 func0f193530(struct chrdata *chr, f32 range) s32 closestplayernum = -1; s32 i; - for (i = 0; i < g_MpNumPlayers; i++) { - if (chr != g_MpPlayerChrs[i] - && !chrIsDead(g_MpPlayerChrs[i]) - && chr->team == g_MpPlayerChrs[i]->team - && mpIsChrFollowedByChr(chr, g_MpPlayerChrs[i])) { + for (i = 0; i < g_MpNumChrs; i++) { + if (chr != g_MpAllChrPtrs[i] + && !chrIsDead(g_MpAllChrPtrs[i]) + && chr->team == g_MpAllChrPtrs[i]->team + && botIsFollowing(chr, g_MpAllChrPtrs[i])) { f32 distance = chr->aibot->playerdistances[i]; if (closestplayernum < 0 || distance < closestdistance) { @@ -5406,12 +5417,12 @@ s32 func0f193530(struct chrdata *chr, f32 range) return result; } -void func0f19369c(struct chrdata *chr, s32 arg1) +void bot0f19369c(struct chrdata *chr, s32 arg1) { chr->aibot->unk02c[arg1] = g_AibotWeaponPreferences[chr->aibot->weaponnum].unk0e_00 * (PAL ? 50 : 60); if (g_AibotWeaponPreferences[chr->aibot->weaponnum].unk0e_03) { - s32 capacity = weaponGetClipCapacityByFunction(chr->aibot->weaponnum, chr->aibot->gunfunc); + s32 capacity = botactGetClipCapacityByFunction(chr->aibot->weaponnum, chr->aibot->gunfunc); chr->aibot->unk02c[arg1] *= capacity - chr->aibot->loadedammo[arg1]; chr->aibot->unk02c[arg1] /= capacity; @@ -5420,7 +5431,7 @@ void func0f19369c(struct chrdata *chr, s32 arg1) #if VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel func0f1937a4 +glabel bot0f1937a4 .late_rodata glabel var7f1b8f48 .word 0x40fccccd @@ -5460,10 +5471,10 @@ glabel var7f1b8f50 /* f193814: 852a0028 */ lh $t2,0x28($t1) /* f193818: 554b000e */ bnel $t2,$t3,.L0f193854 /* f19381c: 03c02025 */ or $a0,$s8,$zero -/* f193820: 0fc65241 */ jal mpGetNumTeammatesDefendingHill +/* f193820: 0fc65241 */ jal botGetNumTeammatesDefendingHill /* f193824: 00000000 */ nop /* f193828: 00408025 */ or $s0,$v0,$zero -/* f19382c: 0fc65264 */ jal mpGetNumOpponentsInHill +/* f19382c: 0fc65264 */ jal botGetNumOpponentsInHill /* f193830: 03c02025 */ or $a0,$s8,$zero /* f193834: 0202082a */ slt $at,$s0,$v0 /* f193838: 14200005 */ bnez $at,.L0f193850 @@ -5477,7 +5488,7 @@ glabel var7f1b8f50 .L0f193854: /* f193854: 27a5025c */ addiu $a1,$sp,0x25c /* f193858: 27a60244 */ addiu $a2,$sp,0x244 -/* f19385c: 0fc6601a */ jal func0f198068 +/* f19385c: 0fc6601a */ jal botinvScoreAllWeapons /* f193860: 27a7022c */ addiu $a3,$sp,0x22c /* f193864: 27b00214 */ addiu $s0,$sp,0x214 /* f193868: 24140001 */ addiu $s4,$zero,0x1 @@ -5502,7 +5513,7 @@ glabel var7f1b8f50 /* f1938ac: 27b100f4 */ addiu $s1,$sp,0xf4 .L0f1938b0: /* f1938b0: 03c02025 */ or $a0,$s8,$zero -/* f1938b4: 0fc65f3c */ jal aibotGetInvItem +/* f1938b4: 0fc65f3c */ jal botinvGetItem /* f1938b8: 8e650000 */ lw $a1,0x0($s3) /* f1938bc: 26100004 */ addiu $s0,$s0,0x4 /* f1938c0: 26940001 */ addiu $s4,$s4,0x1 @@ -5578,7 +5589,7 @@ glabel var7f1b8f50 /* f1939c4: 1662ffe0 */ bne $s3,$v0,.L0f193948 /* f1939c8: 26d60004 */ addiu $s6,$s6,0x4 .L0f1939cc: -/* f1939cc: 0fc6666c */ jal weaponGetAmmoTypeByFunction +/* f1939cc: 0fc6666c */ jal botactGetAmmoTypeByFunction /* f1939d0: 00002825 */ or $a1,$zero,$zero /* f1939d4: 18400019 */ blez $v0,.L0f193a3c /* f1939d8: 00408825 */ or $s1,$v0,$zero @@ -5634,7 +5645,7 @@ glabel var7f1b8f50 /* f193a90: 966d005e */ lhu $t5,0x5e($s3) /* f193a94: 59a0003f */ blezl $t5,.L0f193b94 /* f193a98: 26940001 */ addiu $s4,$s4,0x1 -/* f193a9c: 0fc668c7 */ jal ammotypeGetWeapon +/* f193a9c: 0fc668c7 */ jal botactGetWeaponByAmmoType /* f193aa0: 02802025 */ or $a0,$s4,$zero /* f193aa4: 18400022 */ blez $v0,.L0f193b30 /* f193aa8: 00008025 */ or $s0,$zero,$zero @@ -5765,12 +5776,12 @@ glabel var7f1b8f50 .L0f193c64: /* f193c64: 03c02025 */ or $a0,$s8,$zero /* f193c68: 8e650000 */ lw $a1,0x0($s3) -/* f193c6c: 0fc6639e */ jal func0f198e78 +/* f193c6c: 0fc6639e */ jal botinvAllowsWeapon /* f193c70: 00003025 */ or $a2,$zero,$zero /* f193c74: 14400006 */ bnez $v0,.L0f193c90 /* f193c78: 03c02025 */ or $a0,$s8,$zero /* f193c7c: 8e650000 */ lw $a1,0x0($s3) -/* f193c80: 0fc6639e */ jal func0f198e78 +/* f193c80: 0fc6639e */ jal botinvAllowsWeapon /* f193c84: 24060001 */ addiu $a2,$zero,0x1 /* f193c88: 50400013 */ beqzl $v0,.L0f193cd8 /* f193c8c: 26730004 */ addiu $s3,$s3,0x4 @@ -5880,7 +5891,7 @@ glabel var7f1b8f50 .L0f193e0c: /* f193e0c: 14610016 */ bne $v1,$at,.L0f193e68 /* f193e10: 03c02025 */ or $a0,$s8,$zero -/* f193e14: 0fc65227 */ jal func0f19489c +/* f193e14: 0fc65227 */ jal bot0f19489c /* f193e18: e7a20094 */ swc1 $f2,0x94($sp) /* f193e1c: 3c014080 */ lui $at,0x4080 /* f193e20: 44818000 */ mtc1 $at,$f16 @@ -6086,7 +6097,7 @@ glabel var7f1b8f50 /* f1940fc: 24140001 */ addiu $s4,$zero,0x1 /* f194100: 55810008 */ bnel $t4,$at,.L0f194124 /* f194104: 93cf02a0 */ lbu $t7,0x2a0($s8) -/* f194108: 0fc65227 */ jal func0f19489c +/* f194108: 0fc65227 */ jal bot0f19489c /* f19410c: 03c02025 */ or $a0,$s8,$zero /* f194110: 10400003 */ beqz $v0,.L0f194120 /* f194114: 240d0001 */ addiu $t5,$zero,0x1 @@ -6127,7 +6138,7 @@ glabel var7f1b8f50 .L0f194190: /* f194190: 5080000c */ beqzl $a0,.L0f1941c4 /* f194194: 00035c40 */ sll $t3,$v1,0x11 -/* f194198: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f194198: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f19419c: 8fa40274 */ lw $a0,0x274($sp) /* f1941a0: 0057082a */ slt $at,$v0,$s7 /* f1941a4: 5020000f */ beqzl $at,.L0f1941e4 @@ -6142,7 +6153,7 @@ glabel var7f1b8f50 /* f1941c4: 05610080 */ bgez $t3,.L0f1943c8 /* f1941c8: 8fa40274 */ lw $a0,0x274($sp) /* f1941cc: 24060001 */ addiu $a2,$zero,0x1 -/* f1941d0: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f1941d0: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f1941d4: 24070001 */ addiu $a3,$zero,0x1 /* f1941d8: 0055082a */ slt $at,$v0,$s5 /* f1941dc: 1420007a */ bnez $at,.L0f1943c8 @@ -6154,13 +6165,13 @@ glabel var7f1b8f50 /* f1941ec: 15a1002f */ bne $t5,$at,.L0f1942ac /* f1941f0: 8fa9027c */ lw $t1,0x27c($sp) /* f1941f4: 8e640000 */ lw $a0,0x0($s3) -/* f1941f8: 0fc6666c */ jal weaponGetAmmoTypeByFunction +/* f1941f8: 0fc6666c */ jal botactGetAmmoTypeByFunction /* f1941fc: 00002825 */ or $a1,$zero,$zero /* f194200: 0fc2a63d */ jal bgunGetCapacityByAmmotype /* f194204: 00402025 */ or $a0,$v0,$zero /* f194208: 0040b825 */ or $s7,$v0,$zero /* f19420c: 8e640000 */ lw $a0,0x0($s3) -/* f194210: 0fc6666c */ jal weaponGetAmmoTypeByFunction +/* f194210: 0fc6666c */ jal botactGetAmmoTypeByFunction /* f194214: 24050001 */ addiu $a1,$zero,0x1 /* f194218: 0fc2a63d */ jal bgunGetCapacityByAmmotype /* f19421c: 00402025 */ or $a0,$v0,$zero @@ -6175,7 +6186,7 @@ glabel var7f1b8f50 /* f194240: 0003c3c2 */ srl $t8,$v1,0xf /* f194244: 5300000c */ beqzl $t8,.L0f194278 /* f194248: 00034440 */ sll $t0,$v1,0x11 -/* f19424c: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f19424c: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f194250: 00003825 */ or $a3,$zero,$zero /* f194254: 0057082a */ slt $at,$v0,$s7 /* f194258: 14200012 */ bnez $at,.L0f1942a4 @@ -6190,7 +6201,7 @@ glabel var7f1b8f50 /* f194278: 05010007 */ bgez $t0,.L0f194298 /* f19427c: 8fa40274 */ lw $a0,0x274($sp) /* f194280: 24060001 */ addiu $a2,$zero,0x1 -/* f194284: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f194284: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f194288: 00003825 */ or $a3,$zero,$zero /* f19428c: 0055082a */ slt $at,$v0,$s5 /* f194290: 14200004 */ bnez $at,.L0f1942a4 @@ -6217,7 +6228,7 @@ glabel var7f1b8f50 /* f1942d8: 1180000c */ beqz $t4,.L0f19430c /* f1942dc: 8fa40274 */ lw $a0,0x274($sp) /* f1942e0: 00003025 */ or $a2,$zero,$zero -/* f1942e4: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f1942e4: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f1942e8: 24070001 */ addiu $a3,$zero,0x1 /* f1942ec: 0057082a */ slt $at,$v0,$s7 /* f1942f0: 5020000f */ beqzl $at,.L0f194330 @@ -6232,7 +6243,7 @@ glabel var7f1b8f50 /* f194310: 0701002d */ bgez $t8,.L0f1943c8 /* f194314: 8fa40274 */ lw $a0,0x274($sp) /* f194318: 24060001 */ addiu $a2,$zero,0x1 -/* f19431c: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f19431c: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f194320: 24070001 */ addiu $a3,$zero,0x1 /* f194324: 0055082a */ slt $at,$v0,$s5 /* f194328: 14200027 */ bnez $at,.L0f1943c8 @@ -6256,7 +6267,7 @@ glabel var7f1b8f50 /* f194368: 1140000c */ beqz $t2,.L0f19439c /* f19436c: 8fa40274 */ lw $a0,0x274($sp) /* f194370: 00003025 */ or $a2,$zero,$zero -/* f194374: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f194374: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f194378: 24070001 */ addiu $a3,$zero,0x1 /* f19437c: 0057082a */ slt $at,$v0,$s7 /* f194380: 5020000f */ beqzl $at,.L0f1943c0 @@ -6271,7 +6282,7 @@ glabel var7f1b8f50 /* f1943a0: 05a10009 */ bgez $t5,.L0f1943c8 /* f1943a4: 8fa40274 */ lw $a0,0x274($sp) /* f1943a8: 24060001 */ addiu $a2,$zero,0x1 -/* f1943ac: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f1943ac: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f1943b0: 24070001 */ addiu $a3,$zero,0x1 /* f1943b4: 0055082a */ slt $at,$v0,$s5 /* f1943b8: 14200003 */ bnez $at,.L0f1943c8 @@ -6285,11 +6296,11 @@ glabel var7f1b8f50 /* f1943cc: 03c02025 */ or $a0,$s8,$zero .L0f1943d0: /* f1943d0: 8e650000 */ lw $a1,0x0($s3) -/* f1943d4: 0fc6639e */ jal func0f198e78 +/* f1943d4: 0fc6639e */ jal botinvAllowsWeapon /* f1943d8: 02003025 */ or $a2,$s0,$zero /* f1943dc: 10400017 */ beqz $v0,.L0f19443c /* f1943e0: 02002825 */ or $a1,$s0,$zero -/* f1943e4: 0fc6666c */ jal weaponGetAmmoTypeByFunction +/* f1943e4: 0fc6666c */ jal botactGetAmmoTypeByFunction /* f1943e8: 8e640000 */ lw $a0,0x0($s3) /* f1943ec: 18400013 */ blez $v0,.L0f19443c /* f1943f0: 00409025 */ or $s2,$v0,$zero @@ -6301,7 +6312,7 @@ glabel var7f1b8f50 /* f194404: 02e08825 */ or $s1,$s7,$zero .L0f194408: /* f194408: 02402825 */ or $a1,$s2,$zero -/* f19440c: 0fc6672e */ jal aibotGetAmmoQuantityByType +/* f19440c: 0fc6672e */ jal botactGetAmmoQuantityByType /* f194410: 02803025 */ or $a2,$s4,$zero /* f194414: 0051082a */ slt $at,$v0,$s1 /* f194418: 10200008 */ beqz $at,.L0f19443c @@ -6352,7 +6363,7 @@ glabel var7f1b8f50 /* f1944b4: 24010005 */ addiu $at,$zero,0x5 /* f1944b8: 55810008 */ bnel $t4,$at,.L0f1944dc /* f1944bc: 93cf02a0 */ lbu $t7,0x2a0($s8) -/* f1944c0: 0fc65227 */ jal func0f19489c +/* f1944c0: 0fc65227 */ jal bot0f19489c /* f1944c4: 03c02025 */ or $a0,$s8,$zero /* f1944c8: 10400003 */ beqz $v0,.L0f1944d8 /* f1944cc: 240d0001 */ addiu $t5,$zero,0x1 @@ -6371,12 +6382,12 @@ glabel var7f1b8f50 .L0f1944f8: /* f1944f8: 15c00014 */ bnez $t6,.L0f19454c /* f1944fc: 00003025 */ or $a2,$zero,$zero -/* f194500: 0fc6639e */ jal func0f198e78 +/* f194500: 0fc6639e */ jal botinvAllowsWeapon /* f194504: 8e650000 */ lw $a1,0x0($s3) /* f194508: 14400005 */ bnez $v0,.L0f194520 /* f19450c: 03c02025 */ or $a0,$s8,$zero /* f194510: 8e650000 */ lw $a1,0x0($s3) -/* f194514: 0fc6639e */ jal func0f198e78 +/* f194514: 0fc6639e */ jal botinvAllowsWeapon /* f194518: 24060001 */ addiu $a2,$zero,0x1 /* f19451c: 1040000b */ beqz $v0,.L0f19454c .L0f194520: @@ -6419,17 +6430,17 @@ glabel var7f1b8f50 /* f1945a0: 03c02025 */ or $a0,$s8,$zero .L0f1945a4: /* f1945a4: 8e650000 */ lw $a1,0x0($s3) -/* f1945a8: 0fc6639e */ jal func0f198e78 +/* f1945a8: 0fc6639e */ jal botinvAllowsWeapon /* f1945ac: 02203025 */ or $a2,$s1,$zero /* f1945b0: 10400016 */ beqz $v0,.L0f19460c /* f1945b4: 02202825 */ or $a1,$s1,$zero -/* f1945b8: 0fc6666c */ jal weaponGetAmmoTypeByFunction +/* f1945b8: 0fc6666c */ jal botactGetAmmoTypeByFunction /* f1945bc: 8e640000 */ lw $a0,0x0($s3) /* f1945c0: 18400012 */ blez $v0,.L0f19460c /* f1945c4: 00408025 */ or $s0,$v0,$zero /* f1945c8: 8fa40274 */ lw $a0,0x274($sp) /* f1945cc: 00402825 */ or $a1,$v0,$zero -/* f1945d0: 0fc6672e */ jal aibotGetAmmoQuantityByType +/* f1945d0: 0fc6672e */ jal botactGetAmmoQuantityByType /* f1945d4: 00003025 */ or $a2,$zero,$zero /* f1945d8: 00409025 */ or $s2,$v0,$zero /* f1945dc: 0fc2a63d */ jal bgunGetCapacityByAmmotype @@ -6476,7 +6487,7 @@ glabel var7f1b8f50 ); #else GLOBAL_ASM( -glabel func0f1937a4 +glabel bot0f1937a4 .late_rodata glabel var7f1b8f48 .word 0x40fccccd @@ -6516,10 +6527,10 @@ glabel var7f1b8f50 /* f193814: 852a0028 */ lh $t2,0x28($t1) /* f193818: 554b000e */ bnel $t2,$t3,.L0f193854 /* f19381c: 03c02025 */ or $a0,$s8,$zero -/* f193820: 0fc65241 */ jal mpGetNumTeammatesDefendingHill +/* f193820: 0fc65241 */ jal botGetNumTeammatesDefendingHill /* f193824: 00000000 */ nop /* f193828: 00408025 */ or $s0,$v0,$zero -/* f19382c: 0fc65264 */ jal mpGetNumOpponentsInHill +/* f19382c: 0fc65264 */ jal botGetNumOpponentsInHill /* f193830: 03c02025 */ or $a0,$s8,$zero /* f193834: 0202082a */ slt $at,$s0,$v0 /* f193838: 14200005 */ bnez $at,.L0f193850 @@ -6533,7 +6544,7 @@ glabel var7f1b8f50 .L0f193854: /* f193854: 27a5025c */ addiu $a1,$sp,0x25c /* f193858: 27a60244 */ addiu $a2,$sp,0x244 -/* f19385c: 0fc6601a */ jal func0f198068 +/* f19385c: 0fc6601a */ jal botinvScoreAllWeapons /* f193860: 27a7022c */ addiu $a3,$sp,0x22c /* f193864: 27b00214 */ addiu $s0,$sp,0x214 /* f193868: 24140001 */ addiu $s4,$zero,0x1 @@ -6558,7 +6569,7 @@ glabel var7f1b8f50 /* f1938ac: 27b100f4 */ addiu $s1,$sp,0xf4 .L0f1938b0: /* f1938b0: 03c02025 */ or $a0,$s8,$zero -/* f1938b4: 0fc65f3c */ jal aibotGetInvItem +/* f1938b4: 0fc65f3c */ jal botinvGetItem /* f1938b8: 8e650000 */ lw $a1,0x0($s3) /* f1938bc: 26100004 */ addiu $s0,$s0,0x4 /* f1938c0: 26940001 */ addiu $s4,$s4,0x1 @@ -6634,7 +6645,7 @@ glabel var7f1b8f50 /* f1939c4: 1662ffe0 */ bne $s3,$v0,.L0f193948 /* f1939c8: 26d60004 */ addiu $s6,$s6,0x4 .L0f1939cc: -/* f1939cc: 0fc6666c */ jal weaponGetAmmoTypeByFunction +/* f1939cc: 0fc6666c */ jal botactGetAmmoTypeByFunction /* f1939d0: 00002825 */ or $a1,$zero,$zero /* f1939d4: 18400019 */ blez $v0,.L0f193a3c /* f1939d8: 00408825 */ or $s1,$v0,$zero @@ -6690,7 +6701,7 @@ glabel var7f1b8f50 /* f193a90: 966d005e */ lhu $t5,0x5e($s3) /* f193a94: 59a0003f */ blezl $t5,.L0f193b94 /* f193a98: 26940001 */ addiu $s4,$s4,0x1 -/* f193a9c: 0fc668c7 */ jal ammotypeGetWeapon +/* f193a9c: 0fc668c7 */ jal botactGetWeaponByAmmoType /* f193aa0: 02802025 */ or $a0,$s4,$zero /* f193aa4: 18400022 */ blez $v0,.L0f193b30 /* f193aa8: 00008025 */ or $s0,$zero,$zero @@ -6821,12 +6832,12 @@ glabel var7f1b8f50 .L0f193c64: /* f193c64: 03c02025 */ or $a0,$s8,$zero /* f193c68: 8e650000 */ lw $a1,0x0($s3) -/* f193c6c: 0fc6639e */ jal func0f198e78 +/* f193c6c: 0fc6639e */ jal botinvAllowsWeapon /* f193c70: 00003025 */ or $a2,$zero,$zero /* f193c74: 14400006 */ bnez $v0,.L0f193c90 /* f193c78: 03c02025 */ or $a0,$s8,$zero /* f193c7c: 8e650000 */ lw $a1,0x0($s3) -/* f193c80: 0fc6639e */ jal func0f198e78 +/* f193c80: 0fc6639e */ jal botinvAllowsWeapon /* f193c84: 24060001 */ addiu $a2,$zero,0x1 /* f193c88: 50400013 */ beqzl $v0,.L0f193cd8 /* f193c8c: 26730004 */ addiu $s3,$s3,0x4 @@ -6936,7 +6947,7 @@ glabel var7f1b8f50 .L0f193e0c: /* f193e0c: 14610016 */ bne $v1,$at,.L0f193e68 /* f193e10: 03c02025 */ or $a0,$s8,$zero -/* f193e14: 0fc65227 */ jal func0f19489c +/* f193e14: 0fc65227 */ jal bot0f19489c /* f193e18: e7a20094 */ swc1 $f2,0x94($sp) /* f193e1c: 3c014080 */ lui $at,0x4080 /* f193e20: 44818000 */ mtc1 $at,$f16 @@ -7142,7 +7153,7 @@ glabel var7f1b8f50 /* f1940fc: 24140001 */ addiu $s4,$zero,0x1 /* f194100: 55810008 */ bnel $t4,$at,.L0f194124 /* f194104: 93cf02a0 */ lbu $t7,0x2a0($s8) -/* f194108: 0fc65227 */ jal func0f19489c +/* f194108: 0fc65227 */ jal bot0f19489c /* f19410c: 03c02025 */ or $a0,$s8,$zero /* f194110: 10400003 */ beqz $v0,.L0f194120 /* f194114: 240d0001 */ addiu $t5,$zero,0x1 @@ -7183,7 +7194,7 @@ glabel var7f1b8f50 .L0f194190: /* f194190: 5080000c */ beqzl $a0,.L0f1941c4 /* f194194: 00035c40 */ sll $t3,$v1,0x11 -/* f194198: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f194198: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f19419c: 8fa40274 */ lw $a0,0x274($sp) /* f1941a0: 0057082a */ slt $at,$v0,$s7 /* f1941a4: 5020000f */ beqzl $at,.L0f1941e4 @@ -7198,7 +7209,7 @@ glabel var7f1b8f50 /* f1941c4: 05610080 */ bgez $t3,.L0f1943c8 /* f1941c8: 8fa40274 */ lw $a0,0x274($sp) /* f1941cc: 24060001 */ addiu $a2,$zero,0x1 -/* f1941d0: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f1941d0: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f1941d4: 24070001 */ addiu $a3,$zero,0x1 /* f1941d8: 0055082a */ slt $at,$v0,$s5 /* f1941dc: 1420007a */ bnez $at,.L0f1943c8 @@ -7210,13 +7221,13 @@ glabel var7f1b8f50 /* f1941ec: 15a1002f */ bne $t5,$at,.L0f1942ac /* f1941f0: 8fa9027c */ lw $t1,0x27c($sp) /* f1941f4: 8e640000 */ lw $a0,0x0($s3) -/* f1941f8: 0fc6666c */ jal weaponGetAmmoTypeByFunction +/* f1941f8: 0fc6666c */ jal botactGetAmmoTypeByFunction /* f1941fc: 00002825 */ or $a1,$zero,$zero /* f194200: 0fc2a63d */ jal bgunGetCapacityByAmmotype /* f194204: 00402025 */ or $a0,$v0,$zero /* f194208: 0040b825 */ or $s7,$v0,$zero /* f19420c: 8e640000 */ lw $a0,0x0($s3) -/* f194210: 0fc6666c */ jal weaponGetAmmoTypeByFunction +/* f194210: 0fc6666c */ jal botactGetAmmoTypeByFunction /* f194214: 24050001 */ addiu $a1,$zero,0x1 /* f194218: 0fc2a63d */ jal bgunGetCapacityByAmmotype /* f19421c: 00402025 */ or $a0,$v0,$zero @@ -7231,7 +7242,7 @@ glabel var7f1b8f50 /* f194240: 0003c3c2 */ srl $t8,$v1,0xf /* f194244: 5300000c */ beqzl $t8,.L0f194278 /* f194248: 00034440 */ sll $t0,$v1,0x11 -/* f19424c: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f19424c: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f194250: 00003825 */ or $a3,$zero,$zero /* f194254: 0057082a */ slt $at,$v0,$s7 /* f194258: 14200012 */ bnez $at,.L0f1942a4 @@ -7246,7 +7257,7 @@ glabel var7f1b8f50 /* f194278: 05010007 */ bgez $t0,.L0f194298 /* f19427c: 8fa40274 */ lw $a0,0x274($sp) /* f194280: 24060001 */ addiu $a2,$zero,0x1 -/* f194284: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f194284: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f194288: 00003825 */ or $a3,$zero,$zero /* f19428c: 0055082a */ slt $at,$v0,$s5 /* f194290: 14200004 */ bnez $at,.L0f1942a4 @@ -7273,7 +7284,7 @@ glabel var7f1b8f50 /* f1942d8: 1180000c */ beqz $t4,.L0f19430c /* f1942dc: 8fa40274 */ lw $a0,0x274($sp) /* f1942e0: 00003025 */ or $a2,$zero,$zero -/* f1942e4: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f1942e4: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f1942e8: 24070001 */ addiu $a3,$zero,0x1 /* f1942ec: 0057082a */ slt $at,$v0,$s7 /* f1942f0: 5020000f */ beqzl $at,.L0f194330 @@ -7288,7 +7299,7 @@ glabel var7f1b8f50 /* f194310: 0701002d */ bgez $t8,.L0f1943c8 /* f194314: 8fa40274 */ lw $a0,0x274($sp) /* f194318: 24060001 */ addiu $a2,$zero,0x1 -/* f19431c: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f19431c: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f194320: 24070001 */ addiu $a3,$zero,0x1 /* f194324: 0055082a */ slt $at,$v0,$s5 /* f194328: 14200027 */ bnez $at,.L0f1943c8 @@ -7312,7 +7323,7 @@ glabel var7f1b8f50 /* f194368: 1140000c */ beqz $t2,.L0f19439c /* f19436c: 8fa40274 */ lw $a0,0x274($sp) /* f194370: 00003025 */ or $a2,$zero,$zero -/* f194374: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f194374: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f194378: 24070001 */ addiu $a3,$zero,0x1 /* f19437c: 0057082a */ slt $at,$v0,$s7 /* f194380: 5020000f */ beqzl $at,.L0f1943c0 @@ -7327,7 +7338,7 @@ glabel var7f1b8f50 /* f1943a0: 05a10009 */ bgez $t5,.L0f1943c8 /* f1943a4: 8fa40274 */ lw $a0,0x274($sp) /* f1943a8: 24060001 */ addiu $a2,$zero,0x1 -/* f1943ac: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f1943ac: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f1943b0: 24070001 */ addiu $a3,$zero,0x1 /* f1943b4: 0055082a */ slt $at,$v0,$s5 /* f1943b8: 14200003 */ bnez $at,.L0f1943c8 @@ -7341,11 +7352,11 @@ glabel var7f1b8f50 /* f1943cc: 03c02025 */ or $a0,$s8,$zero .L0f1943d0: /* f1943d0: 8e650000 */ lw $a1,0x0($s3) -/* f1943d4: 0fc6639e */ jal func0f198e78 +/* f1943d4: 0fc6639e */ jal botinvAllowsWeapon /* f1943d8: 02003025 */ or $a2,$s0,$zero /* f1943dc: 10400017 */ beqz $v0,.L0f19443c /* f1943e0: 02002825 */ or $a1,$s0,$zero -/* f1943e4: 0fc6666c */ jal weaponGetAmmoTypeByFunction +/* f1943e4: 0fc6666c */ jal botactGetAmmoTypeByFunction /* f1943e8: 8e640000 */ lw $a0,0x0($s3) /* f1943ec: 18400013 */ blez $v0,.L0f19443c /* f1943f0: 00409025 */ or $s2,$v0,$zero @@ -7357,7 +7368,7 @@ glabel var7f1b8f50 /* f194404: 02e08825 */ or $s1,$s7,$zero .L0f194408: /* f194408: 02402825 */ or $a1,$s2,$zero -/* f19440c: 0fc6672e */ jal aibotGetAmmoQuantityByType +/* f19440c: 0fc6672e */ jal botactGetAmmoQuantityByType /* f194410: 02803025 */ or $a2,$s4,$zero /* f194414: 0051082a */ slt $at,$v0,$s1 /* f194418: 10200008 */ beqz $at,.L0f19443c @@ -7408,7 +7419,7 @@ glabel var7f1b8f50 /* f1944b4: 24010005 */ addiu $at,$zero,0x5 /* f1944b8: 55810008 */ bnel $t4,$at,.L0f1944dc /* f1944bc: 93cf02a0 */ lbu $t7,0x2a0($s8) -/* f1944c0: 0fc65227 */ jal func0f19489c +/* f1944c0: 0fc65227 */ jal bot0f19489c /* f1944c4: 03c02025 */ or $a0,$s8,$zero /* f1944c8: 10400003 */ beqz $v0,.L0f1944d8 /* f1944cc: 240d0001 */ addiu $t5,$zero,0x1 @@ -7427,12 +7438,12 @@ glabel var7f1b8f50 .L0f1944f8: /* f1944f8: 15c00014 */ bnez $t6,.L0f19454c /* f1944fc: 00003025 */ or $a2,$zero,$zero -/* f194500: 0fc6639e */ jal func0f198e78 +/* f194500: 0fc6639e */ jal botinvAllowsWeapon /* f194504: 8e650000 */ lw $a1,0x0($s3) /* f194508: 14400005 */ bnez $v0,.L0f194520 /* f19450c: 03c02025 */ or $a0,$s8,$zero /* f194510: 8e650000 */ lw $a1,0x0($s3) -/* f194514: 0fc6639e */ jal func0f198e78 +/* f194514: 0fc6639e */ jal botinvAllowsWeapon /* f194518: 24060001 */ addiu $a2,$zero,0x1 /* f19451c: 1040000b */ beqz $v0,.L0f19454c .L0f194520: @@ -7475,17 +7486,17 @@ glabel var7f1b8f50 /* f1945a0: 03c02025 */ or $a0,$s8,$zero .L0f1945a4: /* f1945a4: 8e650000 */ lw $a1,0x0($s3) -/* f1945a8: 0fc6639e */ jal func0f198e78 +/* f1945a8: 0fc6639e */ jal botinvAllowsWeapon /* f1945ac: 02203025 */ or $a2,$s1,$zero /* f1945b0: 10400016 */ beqz $v0,.L0f19460c /* f1945b4: 02202825 */ or $a1,$s1,$zero -/* f1945b8: 0fc6666c */ jal weaponGetAmmoTypeByFunction +/* f1945b8: 0fc6666c */ jal botactGetAmmoTypeByFunction /* f1945bc: 8e640000 */ lw $a0,0x0($s3) /* f1945c0: 18400012 */ blez $v0,.L0f19460c /* f1945c4: 00408025 */ or $s0,$v0,$zero /* f1945c8: 8fa40274 */ lw $a0,0x274($sp) /* f1945cc: 00402825 */ or $a1,$v0,$zero -/* f1945d0: 0fc6672e */ jal aibotGetAmmoQuantityByType +/* f1945d0: 0fc6672e */ jal botactGetAmmoQuantityByType /* f1945d4: 00003025 */ or $a2,$zero,$zero /* f1945d8: 00409025 */ or $s2,$v0,$zero /* f1945dc: 0fc2a63d */ jal bgunGetCapacityByAmmotype @@ -7532,28 +7543,28 @@ glabel var7f1b8f50 ); #endif -bool func0f194670(struct chrdata *chr) +bool bot0f194670(struct chrdata *chr) { - return func0f1937a4(chr, 1) != 0; + return bot0f1937a4(chr, 1) != 0; } -s32 func0f194694(struct chrdata *chr) +s32 bot0f194694(struct chrdata *chr) { - return func0f1937a4(chr, 0); + return bot0f1937a4(chr, 0); } -s32 func0f1946b4(struct chrdata *chr) +s32 bot0f1946b4(struct chrdata *chr) { - return func0f1937a4(chr, 2); + return bot0f1937a4(chr, 2); } -s32 mpGetNumPlayerTeammates(struct chrdata *chr) +s32 botGetNumPlayerTeammates(struct chrdata *chr) { s32 count = 0; s32 i; - for (i = 0; i < g_MpNumPlayers; i++) { - if (chr->team == g_MpPlayerChrs[i]->team) { + for (i = 0; i < g_MpNumChrs; i++) { + if (chr->team == g_MpAllChrPtrs[i]->team) { count++; } } @@ -7561,15 +7572,15 @@ s32 mpGetNumPlayerTeammates(struct chrdata *chr) return count; } -s32 mpCountAibotsWithCommand(struct chrdata *self, u32 command, bool includeself) +s32 botCountByCommand(struct chrdata *self, u32 command, bool includeself) { s32 count = 0; s32 i; - for (i = PLAYERCOUNT(); i < g_MpNumPlayers; i++) { - if (self->team == g_MpPlayerChrs[i]->team) { - if (includeself || self != g_MpPlayerChrs[i]) { - if (command == g_MpPlayerChrs[i]->aibot->command) { + for (i = PLAYERCOUNT(); i < g_MpNumChrs; i++) { + if (self->team == g_MpAllChrPtrs[i]->team) { + if (includeself || self != g_MpAllChrPtrs[i]) { + if (command == g_MpAllChrPtrs[i]->aibot->command) { count++; } } @@ -7579,20 +7590,20 @@ s32 mpCountAibotsWithCommand(struct chrdata *self, u32 command, bool includeself return count; } -s32 scenarioCtcIsChrsTokenHeld(struct chrdata *chr) +s32 botIsChrsTokenHeld(struct chrdata *chr) { - struct mpchr *mpchr = var800ac500[mpPlayerGetIndex(chr)]; + struct mpchrconfig *mpchr = g_MpAllChrConfigPtrs[mpPlayerGetIndex(chr)]; struct prop *prop = g_ScenarioData.ctc.tokens[mpchr->team]; return prop && (prop->type == PROPTYPE_CHR || prop->type == PROPTYPE_PLAYER); } -bool func0f19489c(struct chrdata *chr) +bool bot0f19489c(struct chrdata *chr) { if (chr->aibot->unk09c_01) { if (!chr->aibot->teamisonlyai - || mpGetNumPlayerTeammates(chr) >= 2 - || !scenarioCtcIsChrsTokenHeld(chr)) { + || botGetNumPlayerTeammates(chr) >= 2 + || !botIsChrsTokenHeld(chr)) { return true; } } @@ -7600,16 +7611,16 @@ bool func0f19489c(struct chrdata *chr) return false; } -s32 mpGetNumTeammatesDefendingHill(struct chrdata *bot) +s32 botGetNumTeammatesDefendingHill(struct chrdata *bot) { s32 count = 0; s32 i; - for (i = 0; i < g_MpNumPlayers; i++) { - if (bot->team == g_MpPlayerChrs[i]->team - && g_MpPlayerChrs[i]->prop->rooms[0] == g_ScenarioData.cbt.unk0e[0]) { - if (g_MpPlayerChrs[i]->aibot->command == AIBOTCMD_DEFHILL - || g_MpPlayerChrs[i]->aibot->command == AIBOTCMD_HOLDHILL) { + for (i = 0; i < g_MpNumChrs; i++) { + if (bot->team == g_MpAllChrPtrs[i]->team + && g_MpAllChrPtrs[i]->prop->rooms[0] == g_ScenarioData.cbt.unk0e[0]) { + if (g_MpAllChrPtrs[i]->aibot->command == AIBOTCMD_DEFHILL + || g_MpAllChrPtrs[i]->aibot->command == AIBOTCMD_HOLDHILL) { count++; } } @@ -7624,22 +7635,22 @@ s32 mpGetNumTeammatesDefendingHill(struct chrdata *bot) * * This function is slightly misnamed. */ -s32 mpGetNumOpponentsInHill(struct chrdata *chr) +s32 botGetNumOpponentsInHill(struct chrdata *chr) { - struct mpchr *mpchr = var800ac500[mpPlayerGetIndex(chr)]; - struct mpchr *loopmpchr; + struct mpchrconfig *mpchr = g_MpAllChrConfigPtrs[mpPlayerGetIndex(chr)]; + struct mpchrconfig *loopmpchr; s32 countsperteam[8] = {0}; s32 max = 0; s32 i; - for (i = 0; i < g_MpNumPlayers; i++) { - if (g_MpPlayerChrs[i]->prop->rooms[0] == g_ScenarioData.koh.hillrooms[0]) { + for (i = 0; i < g_MpNumChrs; i++) { + if (g_MpAllChrPtrs[i]->prop->rooms[0] == g_ScenarioData.koh.hillrooms[0]) { s32 mpindex = func0f18d074(i); if (mpindex < 4) { - loopmpchr = &g_MpPlayers[mpindex].base; + loopmpchr = &g_PlayerConfigsArray[mpindex].base; } else { - loopmpchr = &g_MpSimulants[mpindex - 4].base; + loopmpchr = &g_BotConfigsArray[mpindex - 4].base; } if (loopmpchr->team != mpchr->team) { @@ -7659,66 +7670,66 @@ s32 mpGetNumOpponentsInHill(struct chrdata *chr) #if VERSION >= VERSION_PAL_FINAL GLOBAL_ASM( -glabel func0f194b40 +glabel botTickUnpaused .late_rodata glabel var7f1b8f54 .word 0x49742400 glabel var7f1b8f58 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8f5c -.word func0f194b40+0x23fc +.word botTickUnpaused+0x23fc glabel var7f1b8f60 -.word func0f194b40+0x23fc +.word botTickUnpaused+0x23fc glabel var7f1b8f64 -.word func0f194b40+0x23fc +.word botTickUnpaused+0x23fc glabel var7f1b8f68 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8f6c -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8f70 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8f74 -.word func0f194b40+0x23fc +.word botTickUnpaused+0x23fc glabel var7f1b8f78 -.word func0f194b40+0x23fc +.word botTickUnpaused+0x23fc glabel var7f1b8f7c -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8f80 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8f84 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8f88 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8f8c -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8f90 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8f94 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8f98 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8f9c -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8fa0 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8fa4 -.word func0f194b40+0x2474 +.word botTickUnpaused+0x2474 glabel var7f1b8fa8 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8fac -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8fb0 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8fb4 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8fb8 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8fbc -.word func0f194b40+0x23fc +.word botTickUnpaused+0x23fc glabel var7f1b8fc0 -.word func0f194b40+0x2398 +.word botTickUnpaused+0x2398 glabel var7f1b8fc4 -.word func0f194b40+0x2450 +.word botTickUnpaused+0x2450 glabel var7f1b8fc8 .word 0x3d4ccccd .text @@ -7784,7 +7795,7 @@ glabel var7f1b8fc8 /* f195cd8: 26100001 */ addiu $s0,$s0,0x1 /* f195cdc: 02002825 */ move $a1,$s0 /* f195ce0: 24060001 */ li $a2,0x1 -/* f195ce4: 0fc66ad0 */ jal aibotReloadWeapon +/* f195ce4: 0fc66ad0 */ jal botactReload /* f195ce8: afa70054 */ sw $a3,0x54($sp) /* f195cec: 10000030 */ b .PF0f195db0 /* f195cf0: 8fa70054 */ lw $a3,0x54($sp) @@ -7793,7 +7804,7 @@ glabel var7f1b8fc8 /* f195cf8: 8e440020 */ lw $a0,0x20($s2) /* f195cfc: afa70054 */ sw $a3,0x54($sp) /* f195d00: 00057080 */ sll $t6,$a1,0x2 -/* f195d04: 0fc66ce7 */ jal func0f19a29c +/* f195d04: 0fc66ce7 */ jal botactIsWeaponThrowable /* f195d08: 000e2fc2 */ srl $a1,$t6,0x1f /* f195d0c: 14400028 */ bnez $v0,.PF0f195db0 /* f195d10: 8fa70054 */ lw $a3,0x54($sp) @@ -7805,7 +7816,7 @@ glabel var7f1b8fc8 /* f195d28: 00054880 */ sll $t1,$a1,0x2 /* f195d2c: 00092fc2 */ srl $a1,$t1,0x1f /* f195d30: afa70054 */ sw $a3,0x54($sp) -/* f195d34: 0fc66abe */ jal weaponGetClipCapacityByFunction +/* f195d34: 0fc66abe */ jal botactGetClipCapacityByFunction /* f195d38: afa302e8 */ sw $v1,0x2e8($sp) /* f195d3c: 8fa302e8 */ lw $v1,0x2e8($sp) /* f195d40: 8fa70054 */ lw $a3,0x54($sp) @@ -7814,7 +7825,7 @@ glabel var7f1b8fc8 /* f195d4c: 18400006 */ blez $v0,.PF0f195d68 /* f195d50: 02802025 */ move $a0,$s4 /* f195d54: 02002825 */ move $a1,$s0 -/* f195d58: 0fc651d3 */ jal func0f19369c +/* f195d58: 0fc651d3 */ jal bot0f19369c /* f195d5c: afa70054 */ sw $a3,0x54($sp) /* f195d60: 10000013 */ b .PF0f195db0 /* f195d64: 8fa70054 */ lw $a3,0x54($sp) @@ -7835,7 +7846,7 @@ glabel var7f1b8fc8 /* f195d98: 50200006 */ beqzl $at,.PF0f195db4 /* f195d9c: 26100001 */ addiu $s0,$s0,0x1 /* f195da0: 02002825 */ move $a1,$s0 -/* f195da4: 0fc651d3 */ jal func0f19369c +/* f195da4: 0fc651d3 */ jal bot0f19369c /* f195da8: afa70054 */ sw $a3,0x54($sp) /* f195dac: 8fa70054 */ lw $a3,0x54($sp) .PF0f195db0: @@ -7852,7 +7863,7 @@ glabel var7f1b8fc8 /* f195dd4: 004fc823 */ subu $t9,$v0,$t7 /* f195dd8: 1f20003f */ bgtz $t9,.PF0f195ed8 /* f195ddc: ae5900cc */ sw $t9,0xcc($s2) -/* f195de0: 0fc6637c */ jal aibotGetInvItem +/* f195de0: 0fc6637c */ jal botinvGetItem /* f195de4: 8e450020 */ lw $a1,0x20($s2) /* f195de8: 00408025 */ move $s0,$v0 /* f195dec: 0fc4a571 */ jal weaponGetModel @@ -7867,7 +7878,7 @@ glabel var7f1b8fc8 /* f195e10: 00003825 */ move $a3,$zero /* f195e14: 02802025 */ move $a0,$s4 /* f195e18: 00002825 */ move $a1,$zero -/* f195e1c: 0fc66ad0 */ jal aibotReloadWeapon +/* f195e1c: 0fc66ad0 */ jal botactReload /* f195e20: 00003025 */ move $a2,$zero /* f195e24: 8e090000 */ lw $t1,0x0($s0) /* f195e28: 24010003 */ li $at,0x3 @@ -7879,7 +7890,7 @@ glabel var7f1b8fc8 /* f195e40: 3c071000 */ lui $a3,0x1000 /* f195e44: 02802025 */ move $a0,$s4 /* f195e48: 24050001 */ li $a1,0x1 -/* f195e4c: 0fc66ad0 */ jal aibotReloadWeapon +/* f195e4c: 0fc66ad0 */ jal botactReload /* f195e50: 00003025 */ move $a2,$zero .PF0f195e54: /* f195e54: 1000000e */ b .PF0f195e90 @@ -7934,7 +7945,7 @@ glabel var7f1b8fc8 /* f195efc: 8df80050 */ lw $t8,0x50($t7) /* f195f00: 1b00000d */ blez $t8,.PF0f195f38 /* f195f04: 02802025 */ move $a0,$s4 -/* f195f08: 0fc649bc */ jal func0f191638 +/* f195f08: 0fc649bc */ jal bot0f191638 /* f195f0c: 02e02825 */ move $a1,$s7 /* f195f10: 54400006 */ bnezl $v0,.PF0f195f2c /* f195f14: 924a004c */ lbu $t2,0x4c($s2) @@ -7993,11 +8004,11 @@ glabel var7f1b8fc8 /* f195fc8: 17210033 */ bne $t9,$at,.PF0f196098 /* f195fcc: 2405000d */ li $a1,0xd /* f195fd0: 00003025 */ move $a2,$zero -/* f195fd4: 0fc66b39 */ jal aibotGetAmmoQuantityByWeapon +/* f195fd4: 0fc66b39 */ jal botactGetAmmoQuantityByWeapon /* f195fd8: 02e03825 */ move $a3,$s7 /* f195fdc: 00408025 */ move $s0,$v0 /* f195fe0: 02802025 */ move $a0,$s4 -/* f195fe4: 0fc649bc */ jal func0f191638 +/* f195fe4: 0fc649bc */ jal bot0f191638 /* f195fe8: 02e02825 */ move $a1,$s7 /* f195fec: 5040001a */ beqzl $v0,.PF0f196058 /* f195ff0: 8e4b0210 */ lw $t3,0x210($s2) @@ -8084,7 +8095,7 @@ glabel var7f1b8fc8 .PF0f196114: /* f196114: 5c40013a */ bgtzl $v0,.PF0f196600 /* f196118: 928d02a0 */ lbu $t5,0x2a0($s4) -/* f19611c: 0fc655e3 */ jal mpGetNumPlayerTeammates +/* f19611c: 0fc655e3 */ jal botGetNumPlayerTeammates /* f196120: 02802025 */ move $a0,$s4 /* f196124: 3c03800b */ lui $v1,0x800b /* f196128: 9063d138 */ lbu $v1,-0x2ec8($v1) @@ -8093,7 +8104,7 @@ glabel var7f1b8fc8 /* f196134: 16e3001e */ bne $s7,$v1,.PF0f1961b0 /* f196138: 24010002 */ li $at,0x2 /* f19613c: 2405000b */ li $a1,0xb -/* f196140: 0fc655f7 */ jal mpCountAibotsWithCommand +/* f196140: 0fc655f7 */ jal botCountByCommand /* f196144: 00003025 */ move $a2,$zero /* f196148: 18400010 */ blez $v0,.PF0f19618c /* f19614c: 266c0001 */ addiu $t4,$s3,0x1 @@ -8116,12 +8127,12 @@ glabel var7f1b8fc8 .PF0f19618c: /* f19618c: 02802025 */ move $a0,$s4 .PF0f196190: -/* f196190: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f196190: 0fc64db2 */ jal botApplyScenarioCommand /* f196194: 2405000b */ li $a1,0xb /* f196198: 10000111 */ b .PF0f1965e0 /* f19619c: 00000000 */ nop .PF0f1961a0: -/* f1961a0: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f1961a0: 0fc64db2 */ jal botApplyScenarioCommand /* f1961a4: 24050004 */ li $a1,0x4 /* f1961a8: 1000010d */ b .PF0f1965e0 /* f1961ac: 00000000 */ nop @@ -8129,7 +8140,7 @@ glabel var7f1b8fc8 /* f1961b0: 14610022 */ bne $v1,$at,.PF0f19623c /* f1961b4: 02802025 */ move $a0,$s4 /* f1961b8: 24050005 */ li $a1,0x5 -/* f1961bc: 0fc655f7 */ jal mpCountAibotsWithCommand +/* f1961bc: 0fc655f7 */ jal botCountByCommand /* f1961c0: 00003025 */ move $a2,$zero /* f1961c4: 8e58004c */ lw $t8,0x4c($s2) /* f1961c8: 00184940 */ sll $t1,$t8,0x5 @@ -8156,12 +8167,12 @@ glabel var7f1b8fc8 .PF0f196218: /* f196218: 02802025 */ move $a0,$s4 .PF0f19621c: -/* f19621c: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f19621c: 0fc64db2 */ jal botApplyScenarioCommand /* f196220: 24050005 */ li $a1,0x5 /* f196224: 100000ee */ b .PF0f1965e0 /* f196228: 00000000 */ nop .PF0f19622c: -/* f19622c: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f19622c: 0fc64db2 */ jal botApplyScenarioCommand /* f196230: 24050004 */ li $a1,0x4 /* f196234: 100000ea */ b .PF0f1965e0 /* f196238: 00000000 */ nop @@ -8170,7 +8181,7 @@ glabel var7f1b8fc8 /* f196240: 1461001e */ bne $v1,$at,.PF0f1962bc /* f196244: 02802025 */ move $a0,$s4 /* f196248: 2405000c */ li $a1,0xc -/* f19624c: 0fc655f7 */ jal mpCountAibotsWithCommand +/* f19624c: 0fc655f7 */ jal botCountByCommand /* f196250: 00003025 */ move $a2,$zero /* f196254: 18400010 */ blez $v0,.PF0f196298 /* f196258: 266c0001 */ addiu $t4,$s3,0x1 @@ -8193,12 +8204,12 @@ glabel var7f1b8fc8 .PF0f196298: /* f196298: 02802025 */ move $a0,$s4 .PF0f19629c: -/* f19629c: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f19629c: 0fc64db2 */ jal botApplyScenarioCommand /* f1962a0: 2405000c */ li $a1,0xc /* f1962a4: 100000ce */ b .PF0f1965e0 /* f1962a8: 00000000 */ nop .PF0f1962ac: -/* f1962ac: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f1962ac: 0fc64db2 */ jal botApplyScenarioCommand /* f1962b0: 24050004 */ li $a1,0x4 /* f1962b4: 100000ca */ b .PF0f1965e0 /* f1962b8: 00000000 */ nop @@ -8206,7 +8217,7 @@ glabel var7f1b8fc8 /* f1962bc: 24010004 */ li $at,0x4 /* f1962c0: 54610034 */ bnel $v1,$at,.PF0f196394 /* f1962c4: 24010005 */ li $at,0x5 -/* f1962c8: 0fc6566f */ jal mpGetNumTeammatesDefendingHill +/* f1962c8: 0fc6566f */ jal botGetNumTeammatesDefendingHill /* f1962cc: 02802025 */ move $a0,$s4 /* f1962d0: 8e98001c */ lw $t8,0x1c($s4) /* f1962d4: 3c09800b */ lui $t1,0x800b @@ -8229,12 +8240,12 @@ glabel var7f1b8fc8 /* f196310: 10200005 */ beqz $at,.PF0f196328 /* f196314: 00000000 */ nop .PF0f196318: -/* f196318: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f196318: 0fc64db2 */ jal botApplyScenarioCommand /* f19631c: 2405000a */ li $a1,0xa /* f196320: 100000af */ b .PF0f1965e0 /* f196324: 00000000 */ nop .PF0f196328: -/* f196328: 0fc65692 */ jal mpGetNumOpponentsInHill +/* f196328: 0fc65692 */ jal botGetNumOpponentsInHill /* f19632c: 02802025 */ move $a0,$s4 /* f196330: 0050082a */ slt $at,$v0,$s0 /* f196334: 10200012 */ beqz $at,.PF0f196380 @@ -8248,17 +8259,17 @@ glabel var7f1b8fc8 /* f196354: 10200006 */ beqz $at,.PF0f196370 /* f196358: 02802025 */ move $a0,$s4 /* f19635c: 02802025 */ move $a0,$s4 -/* f196360: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f196360: 0fc64db2 */ jal botApplyScenarioCommand /* f196364: 24050009 */ li $a1,0x9 /* f196368: 1000009d */ b .PF0f1965e0 /* f19636c: 00000000 */ nop .PF0f196370: -/* f196370: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f196370: 0fc64db2 */ jal botApplyScenarioCommand /* f196374: 24050004 */ li $a1,0x4 /* f196378: 10000099 */ b .PF0f1965e0 /* f19637c: 00000000 */ nop .PF0f196380: -/* f196380: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f196380: 0fc64db2 */ jal botApplyScenarioCommand /* f196384: 2405000a */ li $a1,0xa /* f196388: 10000095 */ b .PF0f1965e0 /* f19638c: 00000000 */ nop @@ -8270,19 +8281,19 @@ glabel var7f1b8fc8 /* f1963a0: 02802025 */ move $a0,$s4 /* f1963a4: 02802025 */ move $a0,$s4 /* f1963a8: 24050006 */ li $a1,0x6 -/* f1963ac: 0fc655f7 */ jal mpCountAibotsWithCommand +/* f1963ac: 0fc655f7 */ jal botCountByCommand /* f1963b0: 02e03025 */ move $a2,$s7 /* f1963b4: 00408025 */ move $s0,$v0 -/* f1963b8: 0fc65655 */ jal func0f19489c +/* f1963b8: 0fc65655 */ jal bot0f19489c /* f1963bc: 02802025 */ move $a0,$s4 /* f1963c0: 10400005 */ beqz $v0,.PF0f1963d8 /* f1963c4: 02802025 */ move $a0,$s4 -/* f1963c8: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f1963c8: 0fc64db2 */ jal botApplyScenarioCommand /* f1963cc: 24050006 */ li $a1,0x6 /* f1963d0: 10000083 */ b .PF0f1965e0 /* f1963d4: 00000000 */ nop .PF0f1963d8: -/* f1963d8: 0fc6563b */ jal scenarioCtcIsChrsTokenHeld +/* f1963d8: 0fc6563b */ jal botIsChrsTokenHeld /* f1963dc: 02802025 */ move $a0,$s4 /* f1963e0: 10400012 */ beqz $v0,.PF0f19642c /* f1963e4: 00000000 */ nop @@ -8295,12 +8306,12 @@ glabel var7f1b8fc8 /* f196400: 10200006 */ beqz $at,.PF0f19641c /* f196404: 02802025 */ move $a0,$s4 /* f196408: 02802025 */ move $a0,$s4 -/* f19640c: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f19640c: 0fc64db2 */ jal botApplyScenarioCommand /* f196410: 24050006 */ li $a1,0x6 /* f196414: 10000072 */ b .PF0f1965e0 /* f196418: 00000000 */ nop .PF0f19641c: -/* f19641c: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f19641c: 0fc64db2 */ jal botApplyScenarioCommand /* f196420: 24050008 */ li $a1,0x8 /* f196424: 1000006e */ b .PF0f1965e0 /* f196428: 00000000 */ nop @@ -8316,35 +8327,35 @@ glabel var7f1b8fc8 /* f19644c: 1e000005 */ bgtz $s0,.PF0f196464 /* f196450: 24050008 */ li $a1,0x8 .PF0f196454: -/* f196454: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f196454: 0fc64db2 */ jal botApplyScenarioCommand /* f196458: 24050006 */ li $a1,0x6 /* f19645c: 10000060 */ b .PF0f1965e0 /* f196460: 00000000 */ nop .PF0f196464: -/* f196464: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f196464: 0fc64db2 */ jal botApplyScenarioCommand /* f196468: 02802025 */ move $a0,$s4 /* f19646c: 1000005c */ b .PF0f1965e0 /* f196470: 00000000 */ nop .PF0f196474: /* f196474: 24050006 */ li $a1,0x6 -/* f196478: 0fc655f7 */ jal mpCountAibotsWithCommand +/* f196478: 0fc655f7 */ jal botCountByCommand /* f19647c: 00003025 */ move $a2,$zero /* f196480: 00408825 */ move $s1,$v0 /* f196484: 02802025 */ move $a0,$s4 /* f196488: 24050008 */ li $a1,0x8 -/* f19648c: 0fc655f7 */ jal mpCountAibotsWithCommand +/* f19648c: 0fc655f7 */ jal botCountByCommand /* f196490: 00003025 */ move $a2,$zero /* f196494: 00408025 */ move $s0,$v0 -/* f196498: 0fc65655 */ jal func0f19489c +/* f196498: 0fc65655 */ jal bot0f19489c /* f19649c: 02802025 */ move $a0,$s4 /* f1964a0: 10400005 */ beqz $v0,.PF0f1964b8 /* f1964a4: 02802025 */ move $a0,$s4 -/* f1964a8: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f1964a8: 0fc64db2 */ jal botApplyScenarioCommand /* f1964ac: 24050006 */ li $a1,0x6 /* f1964b0: 1000004b */ b .PF0f1965e0 /* f1964b4: 00000000 */ nop .PF0f1964b8: -/* f1964b8: 0fc6563b */ jal scenarioCtcIsChrsTokenHeld +/* f1964b8: 0fc6563b */ jal botIsChrsTokenHeld /* f1964bc: 02802025 */ move $a0,$s4 /* f1964c0: 10400014 */ beqz $v0,.PF0f196514 /* f1964c4: 00000000 */ nop @@ -8360,12 +8371,12 @@ glabel var7f1b8fc8 /* f1964ec: 02802025 */ move $a0,$s4 /* f1964f0: 02802025 */ move $a0,$s4 .PF0f1964f4: -/* f1964f4: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f1964f4: 0fc64db2 */ jal botApplyScenarioCommand /* f1964f8: 24050008 */ li $a1,0x8 /* f1964fc: 10000038 */ b .PF0f1965e0 /* f196500: 00000000 */ nop .PF0f196504: -/* f196504: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f196504: 0fc64db2 */ jal botApplyScenarioCommand /* f196508: 24050006 */ li $a1,0x6 /* f19650c: 10000034 */ b .PF0f1965e0 /* f196510: 00000000 */ nop @@ -8378,7 +8389,7 @@ glabel var7f1b8fc8 /* f196528: 10200005 */ beqz $at,.PF0f196540 .PF0f19652c: /* f19652c: 02802025 */ move $a0,$s4 -/* f196530: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f196530: 0fc64db2 */ jal botApplyScenarioCommand /* f196534: 24050006 */ li $a1,0x6 /* f196538: 10000029 */ b .PF0f1965e0 /* f19653c: 00000000 */ nop @@ -8394,7 +8405,7 @@ glabel var7f1b8fc8 /* f19655c: 10200005 */ beqz $at,.PF0f196574 /* f196560: 00000000 */ nop .PF0f196564: -/* f196564: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f196564: 0fc64db2 */ jal botApplyScenarioCommand /* f196568: 24050008 */ li $a1,0x8 /* f19656c: 1000001c */ b .PF0f1965e0 /* f196570: 00000000 */ nop @@ -8407,7 +8418,7 @@ glabel var7f1b8fc8 /* f196588: 2f21001e */ sltiu $at,$t9,0x1e /* f19658c: 10200005 */ beqz $at,.PF0f1965a4 /* f196590: 02802025 */ move $a0,$s4 -/* f196594: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f196594: 0fc64db2 */ jal botApplyScenarioCommand /* f196598: 24050006 */ li $a1,0x6 /* f19659c: 10000010 */ b .PF0f1965e0 /* f1965a0: 00000000 */ nop @@ -8421,12 +8432,12 @@ glabel var7f1b8fc8 /* f1965bc: 10200006 */ beqz $at,.PF0f1965d8 /* f1965c0: 02802025 */ move $a0,$s4 /* f1965c4: 02802025 */ move $a0,$s4 -/* f1965c8: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f1965c8: 0fc64db2 */ jal botApplyScenarioCommand /* f1965cc: 24050008 */ li $a1,0x8 /* f1965d0: 10000003 */ b .PF0f1965e0 /* f1965d4: 00000000 */ nop .PF0f1965d8: -/* f1965d8: 0fc64db2 */ jal mpAibotApplyScenarioCommand +/* f1965d8: 0fc64db2 */ jal botApplyScenarioCommand /* f1965dc: 24050004 */ li $a1,0x4 .PF0f1965e0: /* f1965e0: 0c004ad4 */ jal random @@ -8468,7 +8479,7 @@ glabel var7f1b8fc8 .PF0f196668: /* f196668: 06a10006 */ bgez $s5,.PF0f196684 /* f19666c: 00000000 */ nop -/* f196670: 0fc655d3 */ jal func0f194694 +/* f196670: 0fc655d3 */ jal bot0f194694 /* f196674: 02802025 */ move $a0,$s4 /* f196678: 10400002 */ beqz $v0,.PF0f196684 /* f19667c: ae420010 */ sw $v0,0x10($s2) @@ -8490,11 +8501,11 @@ glabel var7f1b8fc8 /* f1966b8: 02002025 */ move $a0,$s0 /* f1966bc: 14400232 */ bnez $v0,.PF0f196f88 /* f1966c0: 02802025 */ move $a0,$s4 -/* f1966c4: 0fc64e81 */ jal func0f19294c +/* f1966c4: 0fc64e81 */ jal bot0f19294c /* f1966c8: 02002825 */ move $a1,$s0 /* f1966cc: 1440022e */ bnez $v0,.PF0f196f88 /* f1966d0: 02802025 */ move $a0,$s4 -/* f1966d4: 0fc64f9c */ jal func0f192dc0 +/* f1966d4: 0fc64f9c */ jal botPassesCowardCheck /* f1966d8: 02002825 */ move $a1,$s0 /* f1966dc: 1040022a */ beqz $v0,.PF0f196f88 /* f1966e0: 02002025 */ move $a0,$s0 @@ -8689,7 +8700,7 @@ glabel var7f1b8fc8 /* f196980: 10000181 */ b .PF0f196f88 /* f196984: ae420010 */ sw $v0,0x10($s2) .PF0f196988: -/* f196988: 0fc65163 */ jal mpIsChrFollowedByChr +/* f196988: 0fc65163 */ jal botIsFollowing /* f19698c: 8c450004 */ lw $a1,0x4($v0) /* f196990: 1040000a */ beqz $v0,.PF0f1969bc /* f196994: 00000000 */ nop @@ -8732,7 +8743,7 @@ glabel var7f1b8fc8 /* f196a1c: 920b0125 */ lbu $t3,0x125($s0) /* f196a20: 154b000e */ bne $t2,$t3,.PF0f196a5c /* f196a24: 00000000 */ nop -/* f196a28: 0fc65163 */ jal mpIsChrFollowedByChr +/* f196a28: 0fc65163 */ jal botIsFollowing /* f196a2c: 02002825 */ move $a1,$s0 /* f196a30: 10400155 */ beqz $v0,.PF0f196f88 /* f196a34: 00000000 */ nop @@ -8750,11 +8761,11 @@ glabel var7f1b8fc8 /* f196a60: 02002025 */ move $a0,$s0 /* f196a64: 14400148 */ bnez $v0,.PF0f196f88 /* f196a68: 02802025 */ move $a0,$s4 -/* f196a6c: 0fc64e81 */ jal func0f19294c +/* f196a6c: 0fc64e81 */ jal bot0f19294c /* f196a70: 02002825 */ move $a1,$s0 /* f196a74: 14400144 */ bnez $v0,.PF0f196f88 /* f196a78: 02802025 */ move $a0,$s4 -/* f196a7c: 0fc64f9c */ jal func0f192dc0 +/* f196a7c: 0fc64f9c */ jal botPassesCowardCheck /* f196a80: 02002825 */ move $a1,$s0 /* f196a84: 10400140 */ beqz $v0,.PF0f196f88 /* f196a88: 02002025 */ move $a0,$s0 @@ -8801,7 +8812,7 @@ glabel var7f1b8fc8 /* f196b24: 0fc0a26a */ jal chrGetTargetProp /* f196b28: 02802025 */ move $a0,$s4 /* f196b2c: 02802025 */ move $a0,$s4 -/* f196b30: 0fc64f9c */ jal func0f192dc0 +/* f196b30: 0fc64f9c */ jal botPassesCowardCheck /* f196b34: 8c450004 */ lw $a1,0x4($v0) /* f196b38: 10400009 */ beqz $v0,.PF0f196b60 /* f196b3c: 02802025 */ move $a0,$s4 @@ -8935,7 +8946,7 @@ glabel var7f1b8fc8 /* f196d2c: 02002825 */ move $a1,$s0 /* f196d30: 15cc000e */ bne $t6,$t4,.PF0f196d6c /* f196d34: 00000000 */ nop -/* f196d38: 0fc65163 */ jal mpIsChrFollowedByChr +/* f196d38: 0fc65163 */ jal botIsFollowing /* f196d3c: 02802025 */ move $a0,$s4 /* f196d40: 10400091 */ beqz $v0,.PF0f196f88 /* f196d44: 00000000 */ nop @@ -8949,11 +8960,11 @@ glabel var7f1b8fc8 /* f196d64: 10000088 */ b .PF0f196f88 /* f196d68: a642000a */ sh $v0,0xa($s2) .PF0f196d6c: -/* f196d6c: 0fc64e81 */ jal func0f19294c +/* f196d6c: 0fc64e81 */ jal bot0f19294c /* f196d70: 02002825 */ move $a1,$s0 /* f196d74: 14400084 */ bnez $v0,.PF0f196f88 /* f196d78: 02802025 */ move $a0,$s4 -/* f196d7c: 0fc64f9c */ jal func0f192dc0 +/* f196d7c: 0fc64f9c */ jal botPassesCowardCheck /* f196d80: 02002825 */ move $a1,$s0 /* f196d84: 10400080 */ beqz $v0,.PF0f196f88 /* f196d88: 02002025 */ move $a0,$s0 @@ -8999,7 +9010,7 @@ glabel var7f1b8fc8 /* f196e1c: 02002825 */ move $a1,$s0 /* f196e20: 156e000e */ bne $t3,$t6,.PF0f196e5c /* f196e24: 00000000 */ nop -/* f196e28: 0fc65163 */ jal mpIsChrFollowedByChr +/* f196e28: 0fc65163 */ jal botIsFollowing /* f196e2c: 02802025 */ move $a0,$s4 /* f196e30: 10400055 */ beqz $v0,.PF0f196f88 /* f196e34: 00000000 */ nop @@ -9013,11 +9024,11 @@ glabel var7f1b8fc8 /* f196e54: 1000004c */ b .PF0f196f88 /* f196e58: a642000a */ sh $v0,0xa($s2) .PF0f196e5c: -/* f196e5c: 0fc64e81 */ jal func0f19294c +/* f196e5c: 0fc64e81 */ jal bot0f19294c /* f196e60: 02002825 */ move $a1,$s0 /* f196e64: 14400048 */ bnez $v0,.PF0f196f88 /* f196e68: 02802025 */ move $a0,$s4 -/* f196e6c: 0fc64f9c */ jal func0f192dc0 +/* f196e6c: 0fc64f9c */ jal botPassesCowardCheck /* f196e70: 02002825 */ move $a1,$s0 /* f196e74: 10400044 */ beqz $v0,.PF0f196f88 /* f196e78: 02002025 */ move $a0,$s0 @@ -9065,7 +9076,7 @@ glabel var7f1b8fc8 /* f196f18: 02002825 */ move $a1,$s0 /* f196f1c: 15f8000e */ bne $t7,$t8,.PF0f196f58 /* f196f20: 00000000 */ nop -/* f196f24: 0fc65163 */ jal mpIsChrFollowedByChr +/* f196f24: 0fc65163 */ jal botIsFollowing /* f196f28: 02802025 */ move $a0,$s4 /* f196f2c: 10400016 */ beqz $v0,.PF0f196f88 /* f196f30: 00000000 */ nop @@ -9079,11 +9090,11 @@ glabel var7f1b8fc8 /* f196f50: 1000000d */ b .PF0f196f88 /* f196f54: a642000a */ sh $v0,0xa($s2) .PF0f196f58: -/* f196f58: 0fc64e81 */ jal func0f19294c +/* f196f58: 0fc64e81 */ jal bot0f19294c /* f196f5c: 02002825 */ move $a1,$s0 /* f196f60: 14400009 */ bnez $v0,.PF0f196f88 /* f196f64: 02802025 */ move $a0,$s4 -/* f196f68: 0fc64f9c */ jal func0f192dc0 +/* f196f68: 0fc64f9c */ jal botPassesCowardCheck /* f196f6c: 02002825 */ move $a1,$s0 /* f196f70: 10400005 */ beqz $v0,.PF0f196f88 /* f196f74: 02002025 */ move $a0,$s0 @@ -9111,7 +9122,7 @@ glabel var7f1b8fc8 /* f196fc8: 10200005 */ beqz $at,.PF0f196fe0 /* f196fcc: 02802025 */ move $a0,$s4 /* f196fd0: 3c0547c3 */ lui $a1,0x47c3 -/* f196fd4: 0fc65178 */ jal func0f193530 +/* f196fd4: 0fc65178 */ jal bot0f193530 /* f196fd8: 34a55000 */ ori $a1,$a1,0x5000 /* f196fdc: 00408025 */ move $s0,$v0 .PF0f196fe0: @@ -9150,7 +9161,7 @@ glabel var7f1b8fc8 /* f19705c: 10200005 */ beqz $at,.PF0f197074 /* f197060: 02802025 */ move $a0,$s4 /* f197064: 3c0547c3 */ lui $a1,0x47c3 -/* f197068: 0fc65178 */ jal func0f193530 +/* f197068: 0fc65178 */ jal bot0f193530 /* f19706c: 34a55000 */ ori $a1,$a1,0x5000 /* f197070: 00408025 */ move $s0,$v0 .PF0f197074: @@ -9167,7 +9178,7 @@ glabel var7f1b8fc8 /* f197098: 24010005 */ li $at,0x5 /* f19709c: 54610021 */ bnel $v1,$at,.PF0f197124 /* f1970a0: 24010002 */ li $at,0x2 -/* f1970a4: 0fc65655 */ jal func0f19489c +/* f1970a4: 0fc65655 */ jal bot0f19489c /* f1970a8: 02802025 */ move $a0,$s4 /* f1970ac: 1040002f */ beqz $v0,.PF0f19716c /* f1970b0: 00000000 */ nop @@ -9232,7 +9243,7 @@ glabel var7f1b8fc8 /* f197194: 04400098 */ bltz $v0,.PF0f1973f8 /* f197198: 0002c880 */ sll $t9,$v0,0x2 /* f19719c: 00b92821 */ addu $a1,$a1,$t9 -/* f1971a0: 0fc64e81 */ jal func0f19294c +/* f1971a0: 0fc64e81 */ jal bot0f19294c /* f1971a4: 8ca5ca70 */ lw $a1,-0x3590($a1) /* f1971a8: 14400093 */ bnez $v0,.PF0f1973f8 /* f1971ac: 00000000 */ nop @@ -9269,7 +9280,7 @@ glabel var7f1b8fc8 /* f19721c: 04400076 */ bltz $v0,.PF0f1973f8 /* f197220: 00027080 */ sll $t6,$v0,0x2 /* f197224: 00ae2821 */ addu $a1,$a1,$t6 -/* f197228: 0fc64e81 */ jal func0f19294c +/* f197228: 0fc64e81 */ jal bot0f19294c /* f19722c: 8ca5ca70 */ lw $a1,-0x3590($a1) /* f197230: 14400071 */ bnez $v0,.PF0f1973f8 /* f197234: 00000000 */ nop @@ -9309,7 +9320,7 @@ glabel var7f1b8fc8 /* f1972b4: 24060002 */ li $a2,0x2 /* f1972b8: 10400008 */ beqz $v0,.PF0f1972dc /* f1972bc: 02802025 */ move $a0,$s4 -/* f1972c0: 0fc64e81 */ jal func0f19294c +/* f1972c0: 0fc64e81 */ jal bot0f19294c /* f1972c4: 02202825 */ move $a1,$s1 /* f1972c8: 14400004 */ bnez $v0,.PF0f1972dc /* f1972cc: 8fa900d8 */ lw $t1,0xd8($sp) @@ -9351,7 +9362,7 @@ glabel var7f1b8fc8 /* f197350: 1040001f */ beqz $v0,.PF0f1973d0 /* f197354: 8fa500c0 */ lw $a1,0xc0($sp) /* f197358: 02802025 */ move $a0,$s4 -/* f19735c: 0fc64e81 */ jal func0f19294c +/* f19735c: 0fc64e81 */ jal bot0f19294c /* f197360: afa500c0 */ sw $a1,0xc0($sp) /* f197364: 1440001a */ bnez $v0,.PF0f1973d0 /* f197368: 8fa500c0 */ lw $a1,0xc0($sp) @@ -9405,7 +9416,7 @@ glabel var7f1b8fc8 /* f19740c: 0fc0a26a */ jal chrGetTargetProp /* f197410: 02802025 */ move $a0,$s4 /* f197414: 02802025 */ move $a0,$s4 -/* f197418: 0fc64f9c */ jal func0f192dc0 +/* f197418: 0fc64f9c */ jal botPassesCowardCheck /* f19741c: 8c450004 */ lw $a1,0x4($v0) /* f197420: 10400003 */ beqz $v0,.PF0f197430 /* f197424: 00000000 */ nop @@ -9414,7 +9425,7 @@ glabel var7f1b8fc8 .PF0f197430: /* f197430: 06a1000b */ bgez $s5,.PF0f197460 /* f197434: 02802025 */ move $a0,$s4 -/* f197438: 0fc65178 */ jal func0f193530 +/* f197438: 0fc65178 */ jal bot0f193530 /* f19743c: 3c054396 */ lui $a1,0x4396 /* f197440: 04400007 */ bltz $v0,.PF0f197460 /* f197444: 00408025 */ move $s0,$v0 @@ -9427,7 +9438,7 @@ glabel var7f1b8fc8 .PF0f197460: /* f197460: 06a10006 */ bgez $s5,.PF0f19747c /* f197464: 00000000 */ nop -/* f197468: 0fc655db */ jal func0f1946b4 +/* f197468: 0fc655db */ jal bot0f1946b4 /* f19746c: 02802025 */ move $a0,$s4 /* f197470: 10400002 */ beqz $v0,.PF0f19747c /* f197474: ae420010 */ sw $v0,0x10($s2) @@ -9472,7 +9483,7 @@ glabel var7f1b8fc8 /* f197504: 02802025 */ move $a0,$s4 /* f197508: 51c00061 */ beqzl $t6,.PF0f197690 /* f19750c: 928202a0 */ lbu $v0,0x2a0($s4) -/* f197510: 0fc64e0d */ jal func0f19277c +/* f197510: 0fc64e0d */ jal bot0f19277c /* f197514: 03c02825 */ move $a1,$s8 /* f197518: 1000005d */ b .PF0f197690 /* f19751c: 928202a0 */ lbu $v0,0x2a0($s4) @@ -9485,7 +9496,7 @@ glabel var7f1b8fc8 /* f197534: 02802025 */ move $a0,$s4 /* f197538: 51800004 */ beqzl $t4,.PF0f19754c /* f19753c: 02802025 */ move $a0,$s4 -/* f197540: 0fc64e0d */ jal func0f19277c +/* f197540: 0fc64e0d */ jal bot0f19277c /* f197544: 03c02825 */ move $a1,$s8 /* f197548: 02802025 */ move $a0,$s4 .PF0f19754c: @@ -9618,7 +9629,7 @@ glabel var7f1b8fc8 /* f197714: 02802025 */ move $a0,$s4 /* f197718: 000cc080 */ sll $t8,$t4,0x2 /* f19771c: 00b82821 */ addu $a1,$a1,$t8 -/* f197720: 0fc64f9c */ jal func0f192dc0 +/* f197720: 0fc64f9c */ jal botPassesCowardCheck /* f197724: 8ca5ca70 */ lw $a1,-0x3590($a1) /* f197728: 14400003 */ bnez $v0,.PF0f197738 /* f19772c: 240f0029 */ li $t7,0x29 @@ -9641,7 +9652,7 @@ glabel var7f1b8fc8 /* f197768: 0fc0a26a */ jal chrGetTargetProp /* f19776c: 02802025 */ move $a0,$s4 /* f197770: 02802025 */ move $a0,$s4 -/* f197774: 0fc64f9c */ jal func0f192dc0 +/* f197774: 0fc64f9c */ jal botPassesCowardCheck /* f197778: 8c450004 */ lw $a1,0x4($v0) /* f19777c: 14400003 */ bnez $v0,.PF0f19778c /* f197780: 240a0029 */ li $t2,0x29 @@ -9649,9 +9660,9 @@ glabel var7f1b8fc8 /* f197784: 10000134 */ b .PF0f197c58 /* f197788: a28a02a0 */ sb $t2,0x2a0($s4) .PF0f19778c: -/* f19778c: 0fc661c0 */ jal func0f197600 +/* f19778c: 0fc661c0 */ jal botcmdTickDistMode /* f197790: 02802025 */ move $a0,$s4 -/* f197794: 0fc655ca */ jal func0f194670 +/* f197794: 0fc655ca */ jal bot0f194670 /* f197798: 02802025 */ move $a0,$s4 /* f19779c: 10400003 */ beqz $v0,.PF0f1977ac /* f1977a0: 240d0029 */ li $t5,0x29 @@ -9687,7 +9698,7 @@ glabel var7f1b8fc8 /* f19780c: 10000112 */ b .PF0f197c58 /* f197810: a29902a0 */ sb $t9,0x2a0($s4) .PF0f197814: -/* f197814: 0fc661c0 */ jal func0f197600 +/* f197814: 0fc661c0 */ jal botcmdTickDistMode /* f197818: 02802025 */ move $a0,$s4 /* f19781c: 8e4901e0 */ lw $t1,0x1e0($s2) /* f197820: 11200037 */ beqz $t1,.PF0f197900 @@ -9701,7 +9712,7 @@ glabel var7f1b8fc8 /* f197840: 0fc0a26a */ jal chrGetTargetProp /* f197844: 02802025 */ move $a0,$s4 /* f197848: 02802025 */ move $a0,$s4 -/* f19784c: 0fc64f9c */ jal func0f192dc0 +/* f19784c: 0fc64f9c */ jal botPassesCowardCheck /* f197850: 8c450004 */ lw $a1,0x4($v0) /* f197854: 1040002a */ beqz $v0,.PF0f197900 /* f197858: 3c0143fa */ lui $at,0x43fa @@ -9749,7 +9760,7 @@ glabel var7f1b8fc8 /* f1978f8: ae4f01d8 */ sw $t7,0x1d8($s2) /* f1978fc: a25e0074 */ sb $s8,0x74($s2) .PF0f197900: -/* f197900: 0fc655ca */ jal func0f194670 +/* f197900: 0fc655ca */ jal bot0f194670 /* f197904: 02802025 */ move $a0,$s4 /* f197908: 104000d3 */ beqz $v0,.PF0f197c58 /* f19790c: 24190029 */ li $t9,0x29 @@ -9838,7 +9849,7 @@ glabel var7f1b8fc8 /* f197a3c: 0fc0a26a */ jal chrGetTargetProp /* f197a40: 02802025 */ move $a0,$s4 /* f197a44: 02802025 */ move $a0,$s4 -/* f197a48: 0fc64f9c */ jal func0f192dc0 +/* f197a48: 0fc64f9c */ jal botPassesCowardCheck /* f197a4c: 8c450004 */ lw $a1,0x4($v0) /* f197a50: 1040000a */ beqz $v0,.PF0f197a7c /* f197a54: 2409002f */ li $t1,0x2f @@ -9859,7 +9870,7 @@ glabel var7f1b8fc8 /* f197a88: 00000000 */ nop /* f197a8c: ae4e00dc */ sw $t6,0xdc($s2) .PF0f197a90: -/* f197a90: 0fc655ca */ jal func0f194670 +/* f197a90: 0fc655ca */ jal bot0f194670 /* f197a94: 02802025 */ move $a0,$s4 /* f197a98: 1040006f */ beqz $v0,.PF0f197c58 /* f197a9c: 240b0029 */ li $t3,0x29 @@ -9914,7 +9925,7 @@ glabel var7f1b8fc8 /* f197b4c: 10000042 */ b .PF0f197c58 /* f197b50: a28c02a0 */ sb $t4,0x2a0($s4) .PF0f197b54: -/* f197b54: 0fc655ca */ jal func0f194670 +/* f197b54: 0fc655ca */ jal bot0f194670 /* f197b58: 02802025 */ move $a0,$s4 /* f197b5c: 1040003e */ beqz $v0,.PF0f197c58 /* f197b60: 24180029 */ li $t8,0x29 @@ -9924,7 +9935,7 @@ glabel var7f1b8fc8 /* f197b6c: 2401002c */ li $at,0x2c /* f197b70: 54410029 */ bnel $v0,$at,.PF0f197c18 /* f197b74: 2401002e */ li $at,0x2e -/* f197b78: 0fc655ca */ jal func0f194670 +/* f197b78: 0fc655ca */ jal bot0f194670 /* f197b7c: 02802025 */ move $a0,$s4 /* f197b80: 10400003 */ beqz $v0,.PF0f197b90 /* f197b84: 240f0029 */ li $t7,0x29 @@ -9970,7 +9981,7 @@ glabel var7f1b8fc8 .PF0f197c18: /* f197c18: 1441000f */ bne $v0,$at,.PF0f197c58 /* f197c1c: 00000000 */ nop -/* f197c20: 0fc655ca */ jal func0f194670 +/* f197c20: 0fc655ca */ jal bot0f194670 /* f197c24: 02802025 */ move $a0,$s4 /* f197c28: 10400003 */ beqz $v0,.PF0f197c38 /* f197c2c: 24180029 */ li $t8,0x29 @@ -9986,7 +9997,7 @@ glabel var7f1b8fc8 /* f197c50: 00000000 */ nop /* f197c54: a29902a0 */ sb $t9,0x2a0($s4) .PF0f197c58: -/* f197c58: 0fc64fd0 */ jal func0f192e90 +/* f197c58: 0fc64fd0 */ jal bot0f192e90 /* f197c5c: 02802025 */ move $a0,$s4 /* f197c60: 0fc63831 */ jal mpPlayerGetIndex /* f197c64: 02802025 */ move $a0,$s4 @@ -10043,7 +10054,7 @@ glabel var7f1b8fc8 /* f197d28: 0fc45348 */ jal waypointSetHashThing /* f197d2c: 00002825 */ move $a1,$zero .PF0f197d30: -/* f197d30: 0fc667fb */ jal aibotTickInventory +/* f197d30: 0fc667fb */ jal botinvTick /* f197d34: 02802025 */ move $a0,$s4 /* f197d38: afa00088 */ sw $zero,0x88($sp) /* f197d3c: 00009825 */ move $s3,$zero @@ -10096,7 +10107,7 @@ glabel var7f1b8fc8 /* f197de8: 01a2082a */ slt $at,$t5,$v0 /* f197dec: 10200005 */ beqz $at,.PF0f197e04 /* f197df0: 02602825 */ move $a1,$s3 -/* f197df4: 0fc651d3 */ jal func0f19369c +/* f197df4: 0fc651d3 */ jal bot0f19369c /* f197df8: a460003c */ sh $zero,0x3c($v1) /* f197dfc: 100001f2 */ b .PF0f1985c8 /* f197e00: 00000000 */ nop @@ -10122,7 +10133,7 @@ glabel var7f1b8fc8 /* f197e4c: 032e082a */ slt $at,$t9,$t6 /* f197e50: 54200034 */ bnezl $at,.PF0f197f24 /* f197e54: a460003c */ sh $zero,0x3c($v1) -/* f197e58: 0fc644c8 */ jal func0f190260 +/* f197e58: 0fc644c8 */ jal bot0f190260 /* f197e5c: afa30054 */ sw $v1,0x54($sp) /* f197e60: 14400030 */ bnez $v0,.PF0f197f24 /* f197e64: 8fa30054 */ lw $v1,0x54($sp) @@ -10285,7 +10296,7 @@ glabel var7f1b8fc8 /* f1980a4: 00000000 */ nop /* f1980a8: 0fc089cc */ jal chrUncloakTemporarily /* f1980ac: 02802025 */ move $a0,$s4 -/* f1980b0: 0fc66e54 */ jal aibotCreateSlayerRocket +/* f1980b0: 0fc66e54 */ jal botactCreateSlayerRocket /* f1980b4: 02802025 */ move $a0,$s4 /* f1980b8: 8e4c0024 */ lw $t4,0x24($s2) /* f1980bc: 258fffff */ addiu $t7,$t4,-1 @@ -10294,7 +10305,7 @@ glabel var7f1b8fc8 .PF0f1980c8: /* f1980c8: 0005c7c2 */ srl $t8,$a1,0x1f .PF0f1980cc: -/* f1980cc: 0fc66ce7 */ jal func0f19a29c +/* f1980cc: 0fc66ce7 */ jal botactIsWeaponThrowable /* f1980d0: 03002825 */ move $a1,$t8 /* f1980d4: 1040005b */ beqz $v0,.PF0f198244 /* f1980d8: 8fb8004c */ lw $t8,0x4c($sp) @@ -10316,7 +10327,7 @@ glabel var7f1b8fc8 /* f198114: 8e450020 */ lw $a1,0x20($s2) /* f198118: 00003825 */ move $a3,$zero /* f19811c: 00067080 */ sll $t6,$a2,0x2 -/* f198120: 0fc66b39 */ jal aibotGetAmmoQuantityByWeapon +/* f198120: 0fc66b39 */ jal botactGetAmmoQuantityByWeapon /* f198124: 000e37c2 */ srl $a2,$t6,0x1f /* f198128: 5c400008 */ bgtzl $v0,.PF0f19814c /* f19812c: 868c017e */ lh $t4,0x17e($s4) @@ -10345,7 +10356,7 @@ glabel var7f1b8fc8 /* f198180: 0319082a */ slt $at,$t8,$t9 /* f198184: 1420000b */ bnez $at,.PF0f1981b4 /* f198188: 00000000 */ nop -/* f19818c: 0fc644c8 */ jal func0f190260 +/* f19818c: 0fc644c8 */ jal bot0f190260 /* f198190: 02802025 */ move $a0,$s4 /* f198194: 14400006 */ bnez $v0,.PF0f1981b0 /* f198198: 02802025 */ move $a0,$s4 @@ -10366,9 +10377,9 @@ glabel var7f1b8fc8 /* f1981cc: 8e450020 */ lw $a1,0x20($s2) /* f1981d0: 00067080 */ sll $t6,$a2,0x2 /* f1981d4: 000e37c2 */ srl $a2,$t6,0x1f -/* f1981d8: 0fc66b9c */ jal aibotTryRemoveAmmoFromReserve +/* f1981d8: 0fc66b9c */ jal botactTryRemoveAmmoFromReserve /* f1981dc: 02e03825 */ move $a3,$s7 -/* f1981e0: 0fc66d1f */ jal func0f19a37c +/* f1981e0: 0fc66d1f */ jal botact0f19a37c /* f1981e4: 02802025 */ move $a0,$s4 /* f1981e8: 8e45004c */ lw $a1,0x4c($s2) /* f1981ec: 8e440020 */ lw $a0,0x20($s2) @@ -10382,15 +10393,15 @@ glabel var7f1b8fc8 /* f19820c: 00095340 */ sll $t2,$t1,0xd /* f198210: 05430008 */ bgezl $t2,.PF0f198234 /* f198214: 8e8d02d4 */ lw $t5,0x2d4($s4) -/* f198218: 0fc663a5 */ jal aibotRemoveInvItem +/* f198218: 0fc663a5 */ jal botinvRemoveItem /* f19821c: 8e450020 */ lw $a1,0x20($s2) /* f198220: 02802025 */ move $a0,$s4 /* f198224: 02e02825 */ move $a1,$s7 -/* f198228: 0fc6696c */ jal aibotSwitchToWeapon +/* f198228: 0fc6696c */ jal botinvSwitchToWeapon /* f19822c: 00003025 */ move $a2,$zero /* f198230: 8e8d02d4 */ lw $t5,0x2d4($s4) .PF0f198234: -/* f198234: 0fc66cf7 */ jal aibotGetProjectileThrowInterval +/* f198234: 0fc66cf7 */ jal botactGetProjectileThrowInterval /* f198238: 8da40020 */ lw $a0,0x20($t5) /* f19823c: 100000e2 */ b .PF0f1985c8 /* f198240: ae420034 */ sw $v0,0x34($s2) @@ -10492,7 +10503,7 @@ glabel var7f1b8fc8 /* f1983a4: 016a082a */ slt $at,$t3,$t2 /* f1983a8: 1420002a */ bnez $at,.PF0f198454 /* f1983ac: 00000000 */ nop -/* f1983b0: 0fc644c8 */ jal func0f190260 +/* f1983b0: 0fc644c8 */ jal bot0f190260 /* f1983b4: 02802025 */ move $a0,$s4 /* f1983b8: 14400006 */ bnez $v0,.PF0f1983d4 /* f1983bc: 02802025 */ move $a0,$s4 @@ -10564,7 +10575,7 @@ glabel var7f1b8fc8 /* f1984b0: 8e45004c */ lw $a1,0x4c($s2) /* f1984b4: 8e440020 */ lw $a0,0x20($s2) /* f1984b8: 00054880 */ sll $t1,$a1,0x2 -/* f1984bc: 0fc66dc3 */ jal func0f19a60c +/* f1984bc: 0fc66dc3 */ jal botact0f19a60c /* f1984c0: 00092fc2 */ srl $a1,$t1,0x1f /* f1984c4: 28410006 */ slti $at,$v0,0x6 /* f1984c8: 1420000b */ bnez $at,.PF0f1984f8 @@ -10673,66 +10684,66 @@ glabel var7f1b8fc8 ); #else GLOBAL_ASM( -glabel func0f194b40 +glabel botTickUnpaused .late_rodata glabel var7f1b8f54 .word 0x49742400 glabel var7f1b8f58 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8f5c -.word func0f194b40+0x23e4 # f196f24 +.word botTickUnpaused+0x23e4 # f196f24 glabel var7f1b8f60 -.word func0f194b40+0x23e4 # f196f24 +.word botTickUnpaused+0x23e4 # f196f24 glabel var7f1b8f64 -.word func0f194b40+0x23e4 # f196f24 +.word botTickUnpaused+0x23e4 # f196f24 glabel var7f1b8f68 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8f6c -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8f70 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8f74 -.word func0f194b40+0x23e4 # f196f24 +.word botTickUnpaused+0x23e4 # f196f24 glabel var7f1b8f78 -.word func0f194b40+0x23e4 # f196f24 +.word botTickUnpaused+0x23e4 # f196f24 glabel var7f1b8f7c -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8f80 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8f84 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8f88 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8f8c -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8f90 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8f94 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8f98 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8f9c -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8fa0 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8fa4 -.word func0f194b40+0x245c # f196f9c +.word botTickUnpaused+0x245c # f196f9c glabel var7f1b8fa8 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8fac -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8fb0 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8fb4 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8fb8 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8fbc -.word func0f194b40+0x23e4 # f196f24 +.word botTickUnpaused+0x23e4 # f196f24 glabel var7f1b8fc0 -.word func0f194b40+0x2380 # f196ec0 +.word botTickUnpaused+0x2380 # f196ec0 glabel var7f1b8fc4 -.word func0f194b40+0x2438 # f196f78 +.word botTickUnpaused+0x2438 # f196f78 glabel var7f1b8fc8 .word 0x3d4ccccd .text @@ -10798,7 +10809,7 @@ glabel var7f1b8fc8 /* f194c20: 26100001 */ addiu $s0,$s0,0x1 /* f194c24: 02002825 */ or $a1,$s0,$zero /* f194c28: 24060001 */ addiu $a2,$zero,0x1 -/* f194c2c: 0fc66690 */ jal aibotReloadWeapon +/* f194c2c: 0fc66690 */ jal botactReload /* f194c30: afa70054 */ sw $a3,0x54($sp) /* f194c34: 10000030 */ b .L0f194cf8 /* f194c38: 8fa70054 */ lw $a3,0x54($sp) @@ -10807,7 +10818,7 @@ glabel var7f1b8fc8 /* f194c40: 8e440020 */ lw $a0,0x20($s2) /* f194c44: afa70054 */ sw $a3,0x54($sp) /* f194c48: 00057080 */ sll $t6,$a1,0x2 -/* f194c4c: 0fc668a7 */ jal func0f19a29c +/* f194c4c: 0fc668a7 */ jal botactIsWeaponThrowable /* f194c50: 000e2fc2 */ srl $a1,$t6,0x1f /* f194c54: 14400028 */ bnez $v0,.L0f194cf8 /* f194c58: 8fa70054 */ lw $a3,0x54($sp) @@ -10819,7 +10830,7 @@ glabel var7f1b8fc8 /* f194c70: 00054880 */ sll $t1,$a1,0x2 /* f194c74: 00092fc2 */ srl $a1,$t1,0x1f /* f194c78: afa70054 */ sw $a3,0x54($sp) -/* f194c7c: 0fc6667e */ jal weaponGetClipCapacityByFunction +/* f194c7c: 0fc6667e */ jal botactGetClipCapacityByFunction /* f194c80: afa302e8 */ sw $v1,0x2e8($sp) /* f194c84: 8fa302e8 */ lw $v1,0x2e8($sp) /* f194c88: 8fa70054 */ lw $a3,0x54($sp) @@ -10828,7 +10839,7 @@ glabel var7f1b8fc8 /* f194c94: 18400006 */ blez $v0,.L0f194cb0 /* f194c98: 02802025 */ or $a0,$s4,$zero /* f194c9c: 02002825 */ or $a1,$s0,$zero -/* f194ca0: 0fc64da7 */ jal func0f19369c +/* f194ca0: 0fc64da7 */ jal bot0f19369c /* f194ca4: afa70054 */ sw $a3,0x54($sp) /* f194ca8: 10000013 */ b .L0f194cf8 /* f194cac: 8fa70054 */ lw $a3,0x54($sp) @@ -10849,7 +10860,7 @@ glabel var7f1b8fc8 /* f194ce0: 50200006 */ beqzl $at,.L0f194cfc /* f194ce4: 26100001 */ addiu $s0,$s0,0x1 /* f194ce8: 02002825 */ or $a1,$s0,$zero -/* f194cec: 0fc64da7 */ jal func0f19369c +/* f194cec: 0fc64da7 */ jal bot0f19369c /* f194cf0: afa70054 */ sw $a3,0x54($sp) /* f194cf4: 8fa70054 */ lw $a3,0x54($sp) .L0f194cf8: @@ -10866,7 +10877,7 @@ glabel var7f1b8fc8 /* f194d1c: 004fc823 */ subu $t9,$v0,$t7 /* f194d20: 1f20003f */ bgtz $t9,.L0f194e20 /* f194d24: ae5900cc */ sw $t9,0xcc($s2) -/* f194d28: 0fc65f3c */ jal aibotGetInvItem +/* f194d28: 0fc65f3c */ jal botinvGetItem /* f194d2c: 8e450020 */ lw $a1,0x20($s2) /* f194d30: 00408025 */ or $s0,$v0,$zero /* f194d34: 0fc4a2bd */ jal weaponGetModel @@ -10881,7 +10892,7 @@ glabel var7f1b8fc8 /* f194d58: 00003825 */ or $a3,$zero,$zero /* f194d5c: 02802025 */ or $a0,$s4,$zero /* f194d60: 00002825 */ or $a1,$zero,$zero -/* f194d64: 0fc66690 */ jal aibotReloadWeapon +/* f194d64: 0fc66690 */ jal botactReload /* f194d68: 00003025 */ or $a2,$zero,$zero /* f194d6c: 8e090000 */ lw $t1,0x0($s0) /* f194d70: 24010003 */ addiu $at,$zero,0x3 @@ -10893,7 +10904,7 @@ glabel var7f1b8fc8 /* f194d88: 3c071000 */ lui $a3,0x1000 /* f194d8c: 02802025 */ or $a0,$s4,$zero /* f194d90: 24050001 */ addiu $a1,$zero,0x1 -/* f194d94: 0fc66690 */ jal aibotReloadWeapon +/* f194d94: 0fc66690 */ jal botactReload /* f194d98: 00003025 */ or $a2,$zero,$zero .L0f194d9c: /* f194d9c: 1000000e */ b .L0f194dd8 @@ -10948,7 +10959,7 @@ glabel var7f1b8fc8 /* f194e44: 8df80050 */ lw $t8,0x50($t7) /* f194e48: 1b00000d */ blez $t8,.L0f194e80 /* f194e4c: 02802025 */ or $a0,$s4,$zero -/* f194e50: 0fc6458e */ jal func0f191638 +/* f194e50: 0fc6458e */ jal bot0f191638 /* f194e54: 02e02825 */ or $a1,$s7,$zero /* f194e58: 54400006 */ bnezl $v0,.L0f194e74 /* f194e5c: 924a004c */ lbu $t2,0x4c($s2) @@ -11007,11 +11018,11 @@ glabel var7f1b8fc8 /* f194f10: 17210033 */ bne $t9,$at,.L0f194fe0 /* f194f14: 2405000d */ addiu $a1,$zero,0xd /* f194f18: 00003025 */ or $a2,$zero,$zero -/* f194f1c: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f194f1c: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f194f20: 02e03825 */ or $a3,$s7,$zero /* f194f24: 00408025 */ or $s0,$v0,$zero /* f194f28: 02802025 */ or $a0,$s4,$zero -/* f194f2c: 0fc6458e */ jal func0f191638 +/* f194f2c: 0fc6458e */ jal bot0f191638 /* f194f30: 02e02825 */ or $a1,$s7,$zero /* f194f34: 5040001a */ beqzl $v0,.L0f194fa0 /* f194f38: 8e4b0210 */ lw $t3,0x210($s2) @@ -11098,7 +11109,7 @@ glabel var7f1b8fc8 .L0f19505c: /* f19505c: 5c40013a */ bgtzl $v0,.L0f195548 /* f195060: 928d02a0 */ lbu $t5,0x2a0($s4) -/* f195064: 0fc651b5 */ jal mpGetNumPlayerTeammates +/* f195064: 0fc651b5 */ jal botGetNumPlayerTeammates /* f195068: 02802025 */ or $a0,$s4,$zero /* f19506c: 3c03800b */ lui $v1,%hi(g_MpSetup+0x10) /* f195070: 9063cb98 */ lbu $v1,%lo(g_MpSetup+0x10)($v1) @@ -11107,7 +11118,7 @@ glabel var7f1b8fc8 /* f19507c: 16e3001e */ bne $s7,$v1,.L0f1950f8 /* f195080: 24010002 */ addiu $at,$zero,0x2 /* f195084: 2405000b */ addiu $a1,$zero,0xb -/* f195088: 0fc651c9 */ jal mpCountAibotsWithCommand +/* f195088: 0fc651c9 */ jal botCountByCommand /* f19508c: 00003025 */ or $a2,$zero,$zero /* f195090: 18400010 */ blez $v0,.L0f1950d4 /* f195094: 266c0001 */ addiu $t4,$s3,0x1 @@ -11130,12 +11141,12 @@ glabel var7f1b8fc8 .L0f1950d4: /* f1950d4: 02802025 */ or $a0,$s4,$zero .L0f1950d8: -/* f1950d8: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f1950d8: 0fc64984 */ jal botApplyScenarioCommand /* f1950dc: 2405000b */ addiu $a1,$zero,0xb /* f1950e0: 10000111 */ b .L0f195528 /* f1950e4: 00000000 */ nop .L0f1950e8: -/* f1950e8: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f1950e8: 0fc64984 */ jal botApplyScenarioCommand /* f1950ec: 24050004 */ addiu $a1,$zero,0x4 /* f1950f0: 1000010d */ b .L0f195528 /* f1950f4: 00000000 */ nop @@ -11143,7 +11154,7 @@ glabel var7f1b8fc8 /* f1950f8: 14610022 */ bne $v1,$at,.L0f195184 /* f1950fc: 02802025 */ or $a0,$s4,$zero /* f195100: 24050005 */ addiu $a1,$zero,0x5 -/* f195104: 0fc651c9 */ jal mpCountAibotsWithCommand +/* f195104: 0fc651c9 */ jal botCountByCommand /* f195108: 00003025 */ or $a2,$zero,$zero /* f19510c: 8e58004c */ lw $t8,0x4c($s2) /* f195110: 00184940 */ sll $t1,$t8,0x5 @@ -11170,12 +11181,12 @@ glabel var7f1b8fc8 .L0f195160: /* f195160: 02802025 */ or $a0,$s4,$zero .L0f195164: -/* f195164: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f195164: 0fc64984 */ jal botApplyScenarioCommand /* f195168: 24050005 */ addiu $a1,$zero,0x5 /* f19516c: 100000ee */ b .L0f195528 /* f195170: 00000000 */ nop .L0f195174: -/* f195174: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f195174: 0fc64984 */ jal botApplyScenarioCommand /* f195178: 24050004 */ addiu $a1,$zero,0x4 /* f19517c: 100000ea */ b .L0f195528 /* f195180: 00000000 */ nop @@ -11184,7 +11195,7 @@ glabel var7f1b8fc8 /* f195188: 1461001e */ bne $v1,$at,.L0f195204 /* f19518c: 02802025 */ or $a0,$s4,$zero /* f195190: 2405000c */ addiu $a1,$zero,0xc -/* f195194: 0fc651c9 */ jal mpCountAibotsWithCommand +/* f195194: 0fc651c9 */ jal botCountByCommand /* f195198: 00003025 */ or $a2,$zero,$zero /* f19519c: 18400010 */ blez $v0,.L0f1951e0 /* f1951a0: 266c0001 */ addiu $t4,$s3,0x1 @@ -11207,12 +11218,12 @@ glabel var7f1b8fc8 .L0f1951e0: /* f1951e0: 02802025 */ or $a0,$s4,$zero .L0f1951e4: -/* f1951e4: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f1951e4: 0fc64984 */ jal botApplyScenarioCommand /* f1951e8: 2405000c */ addiu $a1,$zero,0xc /* f1951ec: 100000ce */ b .L0f195528 /* f1951f0: 00000000 */ nop .L0f1951f4: -/* f1951f4: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f1951f4: 0fc64984 */ jal botApplyScenarioCommand /* f1951f8: 24050004 */ addiu $a1,$zero,0x4 /* f1951fc: 100000ca */ b .L0f195528 /* f195200: 00000000 */ nop @@ -11220,7 +11231,7 @@ glabel var7f1b8fc8 /* f195204: 24010004 */ addiu $at,$zero,0x4 /* f195208: 54610034 */ bnel $v1,$at,.L0f1952dc /* f19520c: 24010005 */ addiu $at,$zero,0x5 -/* f195210: 0fc65241 */ jal mpGetNumTeammatesDefendingHill +/* f195210: 0fc65241 */ jal botGetNumTeammatesDefendingHill /* f195214: 02802025 */ or $a0,$s4,$zero /* f195218: 8e98001c */ lw $t8,0x1c($s4) /* f19521c: 3c09800b */ lui $t1,%hi(g_ScenarioData+0xe) @@ -11243,12 +11254,12 @@ glabel var7f1b8fc8 /* f195258: 10200005 */ beqz $at,.L0f195270 /* f19525c: 00000000 */ nop .L0f195260: -/* f195260: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f195260: 0fc64984 */ jal botApplyScenarioCommand /* f195264: 2405000a */ addiu $a1,$zero,0xa /* f195268: 100000af */ b .L0f195528 /* f19526c: 00000000 */ nop .L0f195270: -/* f195270: 0fc65264 */ jal mpGetNumOpponentsInHill +/* f195270: 0fc65264 */ jal botGetNumOpponentsInHill /* f195274: 02802025 */ or $a0,$s4,$zero /* f195278: 0050082a */ slt $at,$v0,$s0 /* f19527c: 10200012 */ beqz $at,.L0f1952c8 @@ -11262,17 +11273,17 @@ glabel var7f1b8fc8 /* f19529c: 10200006 */ beqz $at,.L0f1952b8 /* f1952a0: 02802025 */ or $a0,$s4,$zero /* f1952a4: 02802025 */ or $a0,$s4,$zero -/* f1952a8: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f1952a8: 0fc64984 */ jal botApplyScenarioCommand /* f1952ac: 24050009 */ addiu $a1,$zero,0x9 /* f1952b0: 1000009d */ b .L0f195528 /* f1952b4: 00000000 */ nop .L0f1952b8: -/* f1952b8: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f1952b8: 0fc64984 */ jal botApplyScenarioCommand /* f1952bc: 24050004 */ addiu $a1,$zero,0x4 /* f1952c0: 10000099 */ b .L0f195528 /* f1952c4: 00000000 */ nop .L0f1952c8: -/* f1952c8: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f1952c8: 0fc64984 */ jal botApplyScenarioCommand /* f1952cc: 2405000a */ addiu $a1,$zero,0xa /* f1952d0: 10000095 */ b .L0f195528 /* f1952d4: 00000000 */ nop @@ -11284,19 +11295,19 @@ glabel var7f1b8fc8 /* f1952e8: 02802025 */ or $a0,$s4,$zero /* f1952ec: 02802025 */ or $a0,$s4,$zero /* f1952f0: 24050006 */ addiu $a1,$zero,0x6 -/* f1952f4: 0fc651c9 */ jal mpCountAibotsWithCommand +/* f1952f4: 0fc651c9 */ jal botCountByCommand /* f1952f8: 02e03025 */ or $a2,$s7,$zero /* f1952fc: 00408025 */ or $s0,$v0,$zero -/* f195300: 0fc65227 */ jal func0f19489c +/* f195300: 0fc65227 */ jal bot0f19489c /* f195304: 02802025 */ or $a0,$s4,$zero /* f195308: 10400005 */ beqz $v0,.L0f195320 /* f19530c: 02802025 */ or $a0,$s4,$zero -/* f195310: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f195310: 0fc64984 */ jal botApplyScenarioCommand /* f195314: 24050006 */ addiu $a1,$zero,0x6 /* f195318: 10000083 */ b .L0f195528 /* f19531c: 00000000 */ nop .L0f195320: -/* f195320: 0fc6520d */ jal scenarioCtcIsChrsTokenHeld +/* f195320: 0fc6520d */ jal botIsChrsTokenHeld /* f195324: 02802025 */ or $a0,$s4,$zero /* f195328: 10400012 */ beqz $v0,.L0f195374 /* f19532c: 00000000 */ nop @@ -11309,12 +11320,12 @@ glabel var7f1b8fc8 /* f195348: 10200006 */ beqz $at,.L0f195364 /* f19534c: 02802025 */ or $a0,$s4,$zero /* f195350: 02802025 */ or $a0,$s4,$zero -/* f195354: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f195354: 0fc64984 */ jal botApplyScenarioCommand /* f195358: 24050006 */ addiu $a1,$zero,0x6 /* f19535c: 10000072 */ b .L0f195528 /* f195360: 00000000 */ nop .L0f195364: -/* f195364: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f195364: 0fc64984 */ jal botApplyScenarioCommand /* f195368: 24050008 */ addiu $a1,$zero,0x8 /* f19536c: 1000006e */ b .L0f195528 /* f195370: 00000000 */ nop @@ -11330,35 +11341,35 @@ glabel var7f1b8fc8 /* f195394: 1e000005 */ bgtz $s0,.L0f1953ac /* f195398: 24050008 */ addiu $a1,$zero,0x8 .L0f19539c: -/* f19539c: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f19539c: 0fc64984 */ jal botApplyScenarioCommand /* f1953a0: 24050006 */ addiu $a1,$zero,0x6 /* f1953a4: 10000060 */ b .L0f195528 /* f1953a8: 00000000 */ nop .L0f1953ac: -/* f1953ac: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f1953ac: 0fc64984 */ jal botApplyScenarioCommand /* f1953b0: 02802025 */ or $a0,$s4,$zero /* f1953b4: 1000005c */ b .L0f195528 /* f1953b8: 00000000 */ nop .L0f1953bc: /* f1953bc: 24050006 */ addiu $a1,$zero,0x6 -/* f1953c0: 0fc651c9 */ jal mpCountAibotsWithCommand +/* f1953c0: 0fc651c9 */ jal botCountByCommand /* f1953c4: 00003025 */ or $a2,$zero,$zero /* f1953c8: 00408825 */ or $s1,$v0,$zero /* f1953cc: 02802025 */ or $a0,$s4,$zero /* f1953d0: 24050008 */ addiu $a1,$zero,0x8 -/* f1953d4: 0fc651c9 */ jal mpCountAibotsWithCommand +/* f1953d4: 0fc651c9 */ jal botCountByCommand /* f1953d8: 00003025 */ or $a2,$zero,$zero /* f1953dc: 00408025 */ or $s0,$v0,$zero -/* f1953e0: 0fc65227 */ jal func0f19489c +/* f1953e0: 0fc65227 */ jal bot0f19489c /* f1953e4: 02802025 */ or $a0,$s4,$zero /* f1953e8: 10400005 */ beqz $v0,.L0f195400 /* f1953ec: 02802025 */ or $a0,$s4,$zero -/* f1953f0: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f1953f0: 0fc64984 */ jal botApplyScenarioCommand /* f1953f4: 24050006 */ addiu $a1,$zero,0x6 /* f1953f8: 1000004b */ b .L0f195528 /* f1953fc: 00000000 */ nop .L0f195400: -/* f195400: 0fc6520d */ jal scenarioCtcIsChrsTokenHeld +/* f195400: 0fc6520d */ jal botIsChrsTokenHeld /* f195404: 02802025 */ or $a0,$s4,$zero /* f195408: 10400014 */ beqz $v0,.L0f19545c /* f19540c: 00000000 */ nop @@ -11374,12 +11385,12 @@ glabel var7f1b8fc8 /* f195434: 02802025 */ or $a0,$s4,$zero /* f195438: 02802025 */ or $a0,$s4,$zero .L0f19543c: -/* f19543c: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f19543c: 0fc64984 */ jal botApplyScenarioCommand /* f195440: 24050008 */ addiu $a1,$zero,0x8 /* f195444: 10000038 */ b .L0f195528 /* f195448: 00000000 */ nop .L0f19544c: -/* f19544c: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f19544c: 0fc64984 */ jal botApplyScenarioCommand /* f195450: 24050006 */ addiu $a1,$zero,0x6 /* f195454: 10000034 */ b .L0f195528 /* f195458: 00000000 */ nop @@ -11392,7 +11403,7 @@ glabel var7f1b8fc8 /* f195470: 10200005 */ beqz $at,.L0f195488 .L0f195474: /* f195474: 02802025 */ or $a0,$s4,$zero -/* f195478: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f195478: 0fc64984 */ jal botApplyScenarioCommand /* f19547c: 24050006 */ addiu $a1,$zero,0x6 /* f195480: 10000029 */ b .L0f195528 /* f195484: 00000000 */ nop @@ -11408,7 +11419,7 @@ glabel var7f1b8fc8 /* f1954a4: 10200005 */ beqz $at,.L0f1954bc /* f1954a8: 00000000 */ nop .L0f1954ac: -/* f1954ac: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f1954ac: 0fc64984 */ jal botApplyScenarioCommand /* f1954b0: 24050008 */ addiu $a1,$zero,0x8 /* f1954b4: 1000001c */ b .L0f195528 /* f1954b8: 00000000 */ nop @@ -11421,7 +11432,7 @@ glabel var7f1b8fc8 /* f1954d0: 2f21001e */ sltiu $at,$t9,0x1e /* f1954d4: 10200005 */ beqz $at,.L0f1954ec /* f1954d8: 02802025 */ or $a0,$s4,$zero -/* f1954dc: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f1954dc: 0fc64984 */ jal botApplyScenarioCommand /* f1954e0: 24050006 */ addiu $a1,$zero,0x6 /* f1954e4: 10000010 */ b .L0f195528 /* f1954e8: 00000000 */ nop @@ -11435,12 +11446,12 @@ glabel var7f1b8fc8 /* f195504: 10200006 */ beqz $at,.L0f195520 /* f195508: 02802025 */ or $a0,$s4,$zero /* f19550c: 02802025 */ or $a0,$s4,$zero -/* f195510: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f195510: 0fc64984 */ jal botApplyScenarioCommand /* f195514: 24050008 */ addiu $a1,$zero,0x8 /* f195518: 10000003 */ b .L0f195528 /* f19551c: 00000000 */ nop .L0f195520: -/* f195520: 0fc64984 */ jal mpAibotApplyScenarioCommand +/* f195520: 0fc64984 */ jal botApplyScenarioCommand /* f195524: 24050004 */ addiu $a1,$zero,0x4 .L0f195528: /* f195528: 0c004b70 */ jal random @@ -11482,7 +11493,7 @@ glabel var7f1b8fc8 .L0f1955b0: /* f1955b0: 06a10006 */ bgez $s5,.L0f1955cc /* f1955b4: 00000000 */ nop -/* f1955b8: 0fc651a5 */ jal func0f194694 +/* f1955b8: 0fc651a5 */ jal bot0f194694 /* f1955bc: 02802025 */ or $a0,$s4,$zero /* f1955c0: 10400002 */ beqz $v0,.L0f1955cc /* f1955c4: ae420010 */ sw $v0,0x10($s2) @@ -11504,11 +11515,11 @@ glabel var7f1b8fc8 /* f195600: 02002025 */ or $a0,$s0,$zero /* f195604: 14400232 */ bnez $v0,.L0f195ed0 /* f195608: 02802025 */ or $a0,$s4,$zero -/* f19560c: 0fc64a53 */ jal func0f19294c +/* f19560c: 0fc64a53 */ jal bot0f19294c /* f195610: 02002825 */ or $a1,$s0,$zero /* f195614: 1440022e */ bnez $v0,.L0f195ed0 /* f195618: 02802025 */ or $a0,$s4,$zero -/* f19561c: 0fc64b70 */ jal func0f192dc0 +/* f19561c: 0fc64b70 */ jal botPassesCowardCheck /* f195620: 02002825 */ or $a1,$s0,$zero /* f195624: 1040022a */ beqz $v0,.L0f195ed0 /* f195628: 02002025 */ or $a0,$s0,$zero @@ -11703,7 +11714,7 @@ glabel var7f1b8fc8 /* f1958c8: 10000181 */ b .L0f195ed0 /* f1958cc: ae420010 */ sw $v0,0x10($s2) .L0f1958d0: -/* f1958d0: 0fc64d37 */ jal mpIsChrFollowedByChr +/* f1958d0: 0fc64d37 */ jal botIsFollowing /* f1958d4: 8c450004 */ lw $a1,0x4($v0) /* f1958d8: 1040000a */ beqz $v0,.L0f195904 /* f1958dc: 00000000 */ nop @@ -11746,7 +11757,7 @@ glabel var7f1b8fc8 /* f195964: 920b0125 */ lbu $t3,0x125($s0) /* f195968: 154b000e */ bne $t2,$t3,.L0f1959a4 /* f19596c: 00000000 */ nop -/* f195970: 0fc64d37 */ jal mpIsChrFollowedByChr +/* f195970: 0fc64d37 */ jal botIsFollowing /* f195974: 02002825 */ or $a1,$s0,$zero /* f195978: 10400155 */ beqz $v0,.L0f195ed0 /* f19597c: 00000000 */ nop @@ -11764,11 +11775,11 @@ glabel var7f1b8fc8 /* f1959a8: 02002025 */ or $a0,$s0,$zero /* f1959ac: 14400148 */ bnez $v0,.L0f195ed0 /* f1959b0: 02802025 */ or $a0,$s4,$zero -/* f1959b4: 0fc64a53 */ jal func0f19294c +/* f1959b4: 0fc64a53 */ jal bot0f19294c /* f1959b8: 02002825 */ or $a1,$s0,$zero /* f1959bc: 14400144 */ bnez $v0,.L0f195ed0 /* f1959c0: 02802025 */ or $a0,$s4,$zero -/* f1959c4: 0fc64b70 */ jal func0f192dc0 +/* f1959c4: 0fc64b70 */ jal botPassesCowardCheck /* f1959c8: 02002825 */ or $a1,$s0,$zero /* f1959cc: 10400140 */ beqz $v0,.L0f195ed0 /* f1959d0: 02002025 */ or $a0,$s0,$zero @@ -11815,7 +11826,7 @@ glabel var7f1b8fc8 /* f195a6c: 0fc0a221 */ jal chrGetTargetProp /* f195a70: 02802025 */ or $a0,$s4,$zero /* f195a74: 02802025 */ or $a0,$s4,$zero -/* f195a78: 0fc64b70 */ jal func0f192dc0 +/* f195a78: 0fc64b70 */ jal botPassesCowardCheck /* f195a7c: 8c450004 */ lw $a1,0x4($v0) /* f195a80: 10400009 */ beqz $v0,.L0f195aa8 /* f195a84: 02802025 */ or $a0,$s4,$zero @@ -11949,7 +11960,7 @@ glabel var7f1b8fc8 /* f195c74: 02002825 */ or $a1,$s0,$zero /* f195c78: 15cc000e */ bne $t6,$t4,.L0f195cb4 /* f195c7c: 00000000 */ nop -/* f195c80: 0fc64d37 */ jal mpIsChrFollowedByChr +/* f195c80: 0fc64d37 */ jal botIsFollowing /* f195c84: 02802025 */ or $a0,$s4,$zero /* f195c88: 10400091 */ beqz $v0,.L0f195ed0 /* f195c8c: 00000000 */ nop @@ -11963,11 +11974,11 @@ glabel var7f1b8fc8 /* f195cac: 10000088 */ b .L0f195ed0 /* f195cb0: a642000a */ sh $v0,0xa($s2) .L0f195cb4: -/* f195cb4: 0fc64a53 */ jal func0f19294c +/* f195cb4: 0fc64a53 */ jal bot0f19294c /* f195cb8: 02002825 */ or $a1,$s0,$zero /* f195cbc: 14400084 */ bnez $v0,.L0f195ed0 /* f195cc0: 02802025 */ or $a0,$s4,$zero -/* f195cc4: 0fc64b70 */ jal func0f192dc0 +/* f195cc4: 0fc64b70 */ jal botPassesCowardCheck /* f195cc8: 02002825 */ or $a1,$s0,$zero /* f195ccc: 10400080 */ beqz $v0,.L0f195ed0 /* f195cd0: 02002025 */ or $a0,$s0,$zero @@ -12013,7 +12024,7 @@ glabel var7f1b8fc8 /* f195d64: 02002825 */ or $a1,$s0,$zero /* f195d68: 156e000e */ bne $t3,$t6,.L0f195da4 /* f195d6c: 00000000 */ nop -/* f195d70: 0fc64d37 */ jal mpIsChrFollowedByChr +/* f195d70: 0fc64d37 */ jal botIsFollowing /* f195d74: 02802025 */ or $a0,$s4,$zero /* f195d78: 10400055 */ beqz $v0,.L0f195ed0 /* f195d7c: 00000000 */ nop @@ -12027,11 +12038,11 @@ glabel var7f1b8fc8 /* f195d9c: 1000004c */ b .L0f195ed0 /* f195da0: a642000a */ sh $v0,0xa($s2) .L0f195da4: -/* f195da4: 0fc64a53 */ jal func0f19294c +/* f195da4: 0fc64a53 */ jal bot0f19294c /* f195da8: 02002825 */ or $a1,$s0,$zero /* f195dac: 14400048 */ bnez $v0,.L0f195ed0 /* f195db0: 02802025 */ or $a0,$s4,$zero -/* f195db4: 0fc64b70 */ jal func0f192dc0 +/* f195db4: 0fc64b70 */ jal botPassesCowardCheck /* f195db8: 02002825 */ or $a1,$s0,$zero /* f195dbc: 10400044 */ beqz $v0,.L0f195ed0 /* f195dc0: 02002025 */ or $a0,$s0,$zero @@ -12059,11 +12070,11 @@ glabel var7f1b8fc8 /* f195e10: 0002c840 */ sll $t9,$v0,0x1 /* f195e14: 01394821 */ addu $t1,$t1,$t9 /* f195e18: 8529c118 */ lh $t1,%lo(g_ScenarioData+0x8)($t1) -/* f195e1c: 3c0d800b */ lui $t5,%hi(g_MpPlayerChrs) +/* f195e1c: 3c0d800b */ lui $t5,%hi(g_MpAllChrPtrs) /* f195e20: 8e8b001c */ lw $t3,0x1c($s4) /* f195e24: 00095080 */ sll $t2,$t1,0x2 /* f195e28: 01aa6821 */ addu $t5,$t5,$t2 -/* f195e2c: 8dadc4d0 */ lw $t5,%lo(g_MpPlayerChrs)($t5) +/* f195e2c: 8dadc4d0 */ lw $t5,%lo(g_MpAllChrPtrs)($t5) /* f195e30: 3c0e800b */ lui $t6,%hi(g_MpSetup+0xc) /* f195e34: 8da3001c */ lw $v1,0x1c($t5) /* f195e38: 106b0025 */ beq $v1,$t3,.L0f195ed0 @@ -12079,7 +12090,7 @@ glabel var7f1b8fc8 /* f195e60: 02002825 */ or $a1,$s0,$zero /* f195e64: 15f8000e */ bne $t7,$t8,.L0f195ea0 /* f195e68: 00000000 */ nop -/* f195e6c: 0fc64d37 */ jal mpIsChrFollowedByChr +/* f195e6c: 0fc64d37 */ jal botIsFollowing /* f195e70: 02802025 */ or $a0,$s4,$zero /* f195e74: 10400016 */ beqz $v0,.L0f195ed0 /* f195e78: 00000000 */ nop @@ -12093,11 +12104,11 @@ glabel var7f1b8fc8 /* f195e98: 1000000d */ b .L0f195ed0 /* f195e9c: a642000a */ sh $v0,0xa($s2) .L0f195ea0: -/* f195ea0: 0fc64a53 */ jal func0f19294c +/* f195ea0: 0fc64a53 */ jal bot0f19294c /* f195ea4: 02002825 */ or $a1,$s0,$zero /* f195ea8: 14400009 */ bnez $v0,.L0f195ed0 /* f195eac: 02802025 */ or $a0,$s4,$zero -/* f195eb0: 0fc64b70 */ jal func0f192dc0 +/* f195eb0: 0fc64b70 */ jal botPassesCowardCheck /* f195eb4: 02002825 */ or $a1,$s0,$zero /* f195eb8: 10400005 */ beqz $v0,.L0f195ed0 /* f195ebc: 02002025 */ or $a0,$s0,$zero @@ -12125,7 +12136,7 @@ glabel var7f1b8fc8 /* f195f10: 10200005 */ beqz $at,.L0f195f28 /* f195f14: 02802025 */ or $a0,$s4,$zero /* f195f18: 3c0547c3 */ lui $a1,0x47c3 -/* f195f1c: 0fc64d4c */ jal func0f193530 +/* f195f1c: 0fc64d4c */ jal bot0f193530 /* f195f20: 34a55000 */ ori $a1,$a1,0x5000 /* f195f24: 00408025 */ or $s0,$v0,$zero .L0f195f28: @@ -12147,11 +12158,11 @@ glabel var7f1b8fc8 /* f195f60: 00027840 */ sll $t7,$v0,0x1 /* f195f64: 030fc021 */ addu $t8,$t8,$t7 /* f195f68: 8718c118 */ lh $t8,%lo(g_ScenarioData+0x8)($t8) -/* f195f6c: 3c09800b */ lui $t1,%hi(g_MpPlayerChrs) +/* f195f6c: 3c09800b */ lui $t1,%hi(g_MpAllChrPtrs) /* f195f70: 8e8a001c */ lw $t2,0x1c($s4) /* f195f74: 0018c880 */ sll $t9,$t8,0x2 /* f195f78: 01394821 */ addu $t1,$t1,$t9 -/* f195f7c: 8d29c4d0 */ lw $t1,%lo(g_MpPlayerChrs)($t1) +/* f195f7c: 8d29c4d0 */ lw $t1,%lo(g_MpAllChrPtrs)($t1) /* f195f80: 8d23001c */ lw $v1,0x1c($t1) /* f195f84: 146a004b */ bne $v1,$t2,.L0f1960b4 /* f195f88: 00000000 */ nop @@ -12164,7 +12175,7 @@ glabel var7f1b8fc8 /* f195fa4: 10200005 */ beqz $at,.L0f195fbc /* f195fa8: 02802025 */ or $a0,$s4,$zero /* f195fac: 3c0547c3 */ lui $a1,0x47c3 -/* f195fb0: 0fc64d4c */ jal func0f193530 +/* f195fb0: 0fc64d4c */ jal bot0f193530 /* f195fb4: 34a55000 */ ori $a1,$a1,0x5000 /* f195fb8: 00408025 */ or $s0,$v0,$zero .L0f195fbc: @@ -12181,7 +12192,7 @@ glabel var7f1b8fc8 /* f195fe0: 24010005 */ addiu $at,$zero,0x5 /* f195fe4: 54610021 */ bnel $v1,$at,.L0f19606c /* f195fe8: 24010002 */ addiu $at,$zero,0x2 -/* f195fec: 0fc65227 */ jal func0f19489c +/* f195fec: 0fc65227 */ jal bot0f19489c /* f195ff0: 02802025 */ or $a0,$s4,$zero /* f195ff4: 1040002f */ beqz $v0,.L0f1960b4 /* f195ff8: 00000000 */ nop @@ -12242,12 +12253,12 @@ glabel var7f1b8fc8 /* f1960cc: 24010009 */ addiu $at,$zero,0x9 /* f1960d0: 86420076 */ lh $v0,0x76($s2) /* f1960d4: 02802025 */ or $a0,$s4,$zero -/* f1960d8: 3c05800b */ lui $a1,%hi(g_MpPlayerChrs) +/* f1960d8: 3c05800b */ lui $a1,%hi(g_MpAllChrPtrs) /* f1960dc: 04400096 */ bltz $v0,.L0f196338 /* f1960e0: 0002c880 */ sll $t9,$v0,0x2 /* f1960e4: 00b92821 */ addu $a1,$a1,$t9 -/* f1960e8: 0fc64a53 */ jal func0f19294c -/* f1960ec: 8ca5c4d0 */ lw $a1,%lo(g_MpPlayerChrs)($a1) +/* f1960e8: 0fc64a53 */ jal bot0f19294c +/* f1960ec: 8ca5c4d0 */ lw $a1,%lo(g_MpAllChrPtrs)($a1) /* f1960f0: 14400091 */ bnez $v0,.L0f196338 /* f1960f4: 00000000 */ nop /* f1960f8: 86490076 */ lh $t1,0x76($s2) @@ -12264,11 +12275,11 @@ glabel var7f1b8fc8 /* f196120: 8e420114 */ lw $v0,0x114($s2) /* f196124: 86420076 */ lh $v0,0x76($s2) /* f196128: 02802025 */ or $a0,$s4,$zero -/* f19612c: 3c05800b */ lui $a1,%hi(g_MpPlayerChrs) +/* f19612c: 3c05800b */ lui $a1,%hi(g_MpAllChrPtrs) /* f196130: 04400009 */ bltz $v0,.L0f196158 /* f196134: 00026880 */ sll $t5,$v0,0x2 /* f196138: 00ad2821 */ addu $a1,$a1,$t5 -/* f19613c: 8ca5c4d0 */ lw $a1,%lo(g_MpPlayerChrs)($a1) +/* f19613c: 8ca5c4d0 */ lw $a1,%lo(g_MpAllChrPtrs)($a1) /* f196140: 0fc12aa3 */ jal chrCompareTeams /* f196144: 24060001 */ addiu $a2,$zero,0x1 /* f196148: 54400004 */ bnezl $v0,.L0f19615c @@ -12279,12 +12290,12 @@ glabel var7f1b8fc8 /* f196158: 8e420114 */ lw $v0,0x114($s2) .L0f19615c: /* f19615c: 02802025 */ or $a0,$s4,$zero -/* f196160: 3c05800b */ lui $a1,%hi(g_MpPlayerChrs) +/* f196160: 3c05800b */ lui $a1,%hi(g_MpAllChrPtrs) /* f196164: 04400074 */ bltz $v0,.L0f196338 /* f196168: 00027080 */ sll $t6,$v0,0x2 /* f19616c: 00ae2821 */ addu $a1,$a1,$t6 -/* f196170: 0fc64a53 */ jal func0f19294c -/* f196174: 8ca5c4d0 */ lw $a1,%lo(g_MpPlayerChrs)($a1) +/* f196170: 0fc64a53 */ jal bot0f19294c +/* f196174: 8ca5c4d0 */ lw $a1,%lo(g_MpAllChrPtrs)($a1) /* f196178: 1440006f */ bnez $v0,.L0f196338 /* f19617c: 00000000 */ nop /* f196180: 8e4c0114 */ lw $t4,0x114($s2) @@ -12322,7 +12333,7 @@ glabel var7f1b8fc8 /* f1961f8: 24060002 */ addiu $a2,$zero,0x2 /* f1961fc: 10400008 */ beqz $v0,.L0f196220 /* f196200: 02802025 */ or $a0,$s4,$zero -/* f196204: 0fc64a53 */ jal func0f19294c +/* f196204: 0fc64a53 */ jal bot0f19294c /* f196208: 8fa500d4 */ lw $a1,0xd4($sp) /* f19620c: 14400004 */ bnez $v0,.L0f196220 /* f196210: 8fb900d8 */ lw $t9,0xd8($sp) @@ -12339,8 +12350,8 @@ glabel var7f1b8fc8 /* f196238: 24010006 */ addiu $at,$zero,0x6 .L0f19623c: /* f19623c: 1441003e */ bne $v0,$at,.L0f196338 -/* f196240: 3c13800b */ lui $s3,%hi(g_MpNumPlayers) -/* f196244: 2673c530 */ addiu $s3,$s3,%lo(g_MpNumPlayers) +/* f196240: 3c13800b */ lui $s3,%hi(g_MpNumChrs) +/* f196244: 2673c530 */ addiu $s3,$s3,%lo(g_MpNumChrs) /* f196248: 8e690000 */ lw $t1,0x0($s3) /* f19624c: 44805000 */ mtc1 $zero,$f10 /* f196250: 03c08825 */ or $s1,$s8,$zero @@ -12363,7 +12374,7 @@ glabel var7f1b8fc8 /* f196290: 1040001f */ beqz $v0,.L0f196310 /* f196294: 8fa500c0 */ lw $a1,0xc0($sp) /* f196298: 02802025 */ or $a0,$s4,$zero -/* f19629c: 0fc64a53 */ jal func0f19294c +/* f19629c: 0fc64a53 */ jal bot0f19294c /* f1962a0: afa500c0 */ sw $a1,0xc0($sp) /* f1962a4: 1440001a */ bnez $v0,.L0f196310 /* f1962a8: 8fa500c0 */ lw $a1,0xc0($sp) @@ -12417,7 +12428,7 @@ glabel var7f1b8fc8 /* f19634c: 0fc0a221 */ jal chrGetTargetProp /* f196350: 02802025 */ or $a0,$s4,$zero /* f196354: 02802025 */ or $a0,$s4,$zero -/* f196358: 0fc64b70 */ jal func0f192dc0 +/* f196358: 0fc64b70 */ jal botPassesCowardCheck /* f19635c: 8c450004 */ lw $a1,0x4($v0) /* f196360: 10400003 */ beqz $v0,.L0f196370 /* f196364: 00000000 */ nop @@ -12426,7 +12437,7 @@ glabel var7f1b8fc8 .L0f196370: /* f196370: 06a1000b */ bgez $s5,.L0f1963a0 /* f196374: 02802025 */ or $a0,$s4,$zero -/* f196378: 0fc64d4c */ jal func0f193530 +/* f196378: 0fc64d4c */ jal bot0f193530 /* f19637c: 3c054396 */ lui $a1,0x4396 /* f196380: 04400007 */ bltz $v0,.L0f1963a0 /* f196384: 00408025 */ or $s0,$v0,$zero @@ -12439,15 +12450,15 @@ glabel var7f1b8fc8 .L0f1963a0: /* f1963a0: 06a10006 */ bgez $s5,.L0f1963bc /* f1963a4: 00000000 */ nop -/* f1963a8: 0fc651ad */ jal func0f1946b4 +/* f1963a8: 0fc651ad */ jal bot0f1946b4 /* f1963ac: 02802025 */ or $a0,$s4,$zero /* f1963b0: 10400002 */ beqz $v0,.L0f1963bc /* f1963b4: ae420010 */ sw $v0,0x10($s2) /* f1963b8: 2415002a */ addiu $s5,$zero,0x2a .L0f1963bc: -/* f1963bc: 3c13800b */ lui $s3,%hi(g_MpNumPlayers) +/* f1963bc: 3c13800b */ lui $s3,%hi(g_MpNumChrs) /* f1963c0: 06a0007f */ bltz $s5,.L0f1965c0 -/* f1963c4: 2673c530 */ addiu $s3,$s3,%lo(g_MpNumPlayers) +/* f1963c4: 2673c530 */ addiu $s3,$s3,%lo(g_MpNumChrs) /* f1963c8: 2401002a */ addiu $at,$zero,0x2a /* f1963cc: 56a1000a */ bnel $s5,$at,.L0f1963f8 /* f1963d0: 2401002f */ addiu $at,$zero,0x2f @@ -12482,7 +12493,7 @@ glabel var7f1b8fc8 /* f19643c: 02802025 */ or $a0,$s4,$zero /* f196440: 51a00060 */ beqzl $t5,.L0f1965c4 /* f196444: 928202a0 */ lbu $v0,0x2a0($s4) -/* f196448: 0fc649df */ jal func0f19277c +/* f196448: 0fc649df */ jal bot0f19277c /* f19644c: 03c02825 */ or $a1,$s8,$zero /* f196450: 1000005c */ b .L0f1965c4 /* f196454: 928202a0 */ lbu $v0,0x2a0($s4) @@ -12494,7 +12505,7 @@ glabel var7f1b8fc8 /* f196468: 02802025 */ or $a0,$s4,$zero /* f19646c: 51600004 */ beqzl $t3,.L0f196480 /* f196470: 02802025 */ or $a0,$s4,$zero -/* f196474: 0fc649df */ jal func0f19277c +/* f196474: 0fc649df */ jal bot0f19277c /* f196478: 03c02825 */ or $a1,$s8,$zero /* f19647c: 02802025 */ or $a0,$s4,$zero .L0f196480: @@ -12615,21 +12626,21 @@ glabel var7f1b8fc8 /* f196618: 1441003e */ bne $v0,$at,.L0f196714 /* f19661c: 00000000 */ nop /* f196620: 86420008 */ lh $v0,0x8($s2) -/* f196624: 3c04800b */ lui $a0,%hi(g_MpPlayerChrs) +/* f196624: 3c04800b */ lui $a0,%hi(g_MpAllChrPtrs) /* f196628: 04400011 */ bltz $v0,.L0f196670 /* f19662c: 00026880 */ sll $t5,$v0,0x2 /* f196630: 008d2021 */ addu $a0,$a0,$t5 /* f196634: 0fc0e6a5 */ jal chrIsDead -/* f196638: 8c84c4d0 */ lw $a0,%lo(g_MpPlayerChrs)($a0) +/* f196638: 8c84c4d0 */ lw $a0,%lo(g_MpAllChrPtrs)($a0) /* f19663c: 5440000a */ bnezl $v0,.L0f196668 /* f196640: 240c0029 */ addiu $t4,$zero,0x29 /* f196644: 864b0008 */ lh $t3,0x8($s2) -/* f196648: 3c05800b */ lui $a1,%hi(g_MpPlayerChrs) +/* f196648: 3c05800b */ lui $a1,%hi(g_MpAllChrPtrs) /* f19664c: 02802025 */ or $a0,$s4,$zero /* f196650: 000b7080 */ sll $t6,$t3,0x2 /* f196654: 00ae2821 */ addu $a1,$a1,$t6 -/* f196658: 0fc64b70 */ jal func0f192dc0 -/* f19665c: 8ca5c4d0 */ lw $a1,%lo(g_MpPlayerChrs)($a1) +/* f196658: 0fc64b70 */ jal botPassesCowardCheck +/* f19665c: 8ca5c4d0 */ lw $a1,%lo(g_MpAllChrPtrs)($a1) /* f196660: 14400003 */ bnez $v0,.L0f196670 /* f196664: 240c0029 */ addiu $t4,$zero,0x29 .L0f196668: @@ -12651,7 +12662,7 @@ glabel var7f1b8fc8 /* f1966a0: 0fc0a221 */ jal chrGetTargetProp /* f1966a4: 02802025 */ or $a0,$s4,$zero /* f1966a8: 02802025 */ or $a0,$s4,$zero -/* f1966ac: 0fc64b70 */ jal func0f192dc0 +/* f1966ac: 0fc64b70 */ jal botPassesCowardCheck /* f1966b0: 8c450004 */ lw $a1,0x4($v0) /* f1966b4: 14400003 */ bnez $v0,.L0f1966c4 /* f1966b8: 24190029 */ addiu $t9,$zero,0x29 @@ -12659,9 +12670,9 @@ glabel var7f1b8fc8 /* f1966bc: 10000132 */ b .L0f196b88 /* f1966c0: a29902a0 */ sb $t9,0x2a0($s4) .L0f1966c4: -/* f1966c4: 0fc65d80 */ jal func0f197600 +/* f1966c4: 0fc65d80 */ jal botcmdTickDistMode /* f1966c8: 02802025 */ or $a0,$s4,$zero -/* f1966cc: 0fc6519c */ jal func0f194670 +/* f1966cc: 0fc6519c */ jal bot0f194670 /* f1966d0: 02802025 */ or $a0,$s4,$zero /* f1966d4: 10400003 */ beqz $v0,.L0f1966e4 /* f1966d8: 24090029 */ addiu $t1,$zero,0x29 @@ -12684,19 +12695,19 @@ glabel var7f1b8fc8 /* f196714: 1602004d */ bne $s0,$v0,.L0f19684c /* f196718: 24010033 */ addiu $at,$zero,0x33 /* f19671c: 8642000a */ lh $v0,0xa($s2) -/* f196720: 3c04800b */ lui $a0,%hi(g_MpPlayerChrs) +/* f196720: 3c04800b */ lui $a0,%hi(g_MpAllChrPtrs) /* f196724: 04400005 */ bltz $v0,.L0f19673c /* f196728: 00026080 */ sll $t4,$v0,0x2 /* f19672c: 008c2021 */ addu $a0,$a0,$t4 /* f196730: 0fc0e6a5 */ jal chrIsDead -/* f196734: 8c84c4d0 */ lw $a0,%lo(g_MpPlayerChrs)($a0) +/* f196734: 8c84c4d0 */ lw $a0,%lo(g_MpAllChrPtrs)($a0) /* f196738: 10400003 */ beqz $v0,.L0f196748 .L0f19673c: /* f19673c: 24180029 */ addiu $t8,$zero,0x29 /* f196740: 10000111 */ b .L0f196b88 /* f196744: a29802a0 */ sb $t8,0x2a0($s4) .L0f196748: -/* f196748: 0fc65d80 */ jal func0f197600 +/* f196748: 0fc65d80 */ jal botcmdTickDistMode /* f19674c: 02802025 */ or $a0,$s4,$zero /* f196750: 8e4f01e0 */ lw $t7,0x1e0($s2) /* f196754: 11e00037 */ beqz $t7,.L0f196834 @@ -12710,16 +12721,16 @@ glabel var7f1b8fc8 /* f196774: 0fc0a221 */ jal chrGetTargetProp /* f196778: 02802025 */ or $a0,$s4,$zero /* f19677c: 02802025 */ or $a0,$s4,$zero -/* f196780: 0fc64b70 */ jal func0f192dc0 +/* f196780: 0fc64b70 */ jal botPassesCowardCheck /* f196784: 8c450004 */ lw $a1,0x4($v0) /* f196788: 1040002a */ beqz $v0,.L0f196834 /* f19678c: 3c0143fa */ lui $at,0x43fa /* f196790: 864d000a */ lh $t5,0xa($s2) -/* f196794: 3c0b800b */ lui $t3,%hi(g_MpPlayerChrs) +/* f196794: 3c0b800b */ lui $t3,%hi(g_MpAllChrPtrs) /* f196798: 8e83001c */ lw $v1,0x1c($s4) /* f19679c: 000d5080 */ sll $t2,$t5,0x2 /* f1967a0: 016a5821 */ addu $t3,$t3,$t2 -/* f1967a4: 8d6bc4d0 */ lw $t3,%lo(g_MpPlayerChrs)($t3) +/* f1967a4: 8d6bc4d0 */ lw $t3,%lo(g_MpAllChrPtrs)($t3) /* f1967a8: c4680008 */ lwc1 $f8,0x8($v1) /* f1967ac: 44806000 */ mtc1 $zero,$f12 /* f1967b0: 8d62001c */ lw $v0,0x1c($t3) @@ -12758,7 +12769,7 @@ glabel var7f1b8fc8 /* f19682c: ae4c01d8 */ sw $t4,0x1d8($s2) /* f196830: a25e0074 */ sb $s8,0x74($s2) .L0f196834: -/* f196834: 0fc6519c */ jal func0f194670 +/* f196834: 0fc6519c */ jal bot0f194670 /* f196838: 02802025 */ or $a0,$s4,$zero /* f19683c: 104000d2 */ beqz $v0,.L0f196b88 /* f196840: 24180029 */ addiu $t8,$zero,0x29 @@ -12846,7 +12857,7 @@ glabel var7f1b8fc8 /* f19696c: 0fc0a221 */ jal chrGetTargetProp /* f196970: 02802025 */ or $a0,$s4,$zero /* f196974: 02802025 */ or $a0,$s4,$zero -/* f196978: 0fc64b70 */ jal func0f192dc0 +/* f196978: 0fc64b70 */ jal botPassesCowardCheck /* f19697c: 8c450004 */ lw $a1,0x4($v0) /* f196980: 1040000a */ beqz $v0,.L0f1969ac /* f196984: 240f002f */ addiu $t7,$zero,0x2f @@ -12867,7 +12878,7 @@ glabel var7f1b8fc8 /* f1969b8: 00000000 */ nop /* f1969bc: ae4d00dc */ sw $t5,0xdc($s2) .L0f1969c0: -/* f1969c0: 0fc6519c */ jal func0f194670 +/* f1969c0: 0fc6519c */ jal bot0f194670 /* f1969c4: 02802025 */ or $a0,$s4,$zero /* f1969c8: 1040006f */ beqz $v0,.L0f196b88 /* f1969cc: 240a0029 */ addiu $t2,$zero,0x29 @@ -12922,7 +12933,7 @@ glabel var7f1b8fc8 /* f196a7c: 10000042 */ b .L0f196b88 /* f196a80: a28b02a0 */ sb $t3,0x2a0($s4) .L0f196a84: -/* f196a84: 0fc6519c */ jal func0f194670 +/* f196a84: 0fc6519c */ jal bot0f194670 /* f196a88: 02802025 */ or $a0,$s4,$zero /* f196a8c: 1040003e */ beqz $v0,.L0f196b88 /* f196a90: 240e0029 */ addiu $t6,$zero,0x29 @@ -12932,7 +12943,7 @@ glabel var7f1b8fc8 /* f196a9c: 2401002c */ addiu $at,$zero,0x2c /* f196aa0: 54410029 */ bnel $v0,$at,.L0f196b48 /* f196aa4: 2401002e */ addiu $at,$zero,0x2e -/* f196aa8: 0fc6519c */ jal func0f194670 +/* f196aa8: 0fc6519c */ jal bot0f194670 /* f196aac: 02802025 */ or $a0,$s4,$zero /* f196ab0: 10400003 */ beqz $v0,.L0f196ac0 /* f196ab4: 240c0029 */ addiu $t4,$zero,0x29 @@ -12978,7 +12989,7 @@ glabel var7f1b8fc8 .L0f196b48: /* f196b48: 1441000f */ bne $v0,$at,.L0f196b88 /* f196b4c: 00000000 */ nop -/* f196b50: 0fc6519c */ jal func0f194670 +/* f196b50: 0fc6519c */ jal bot0f194670 /* f196b54: 02802025 */ or $a0,$s4,$zero /* f196b58: 10400003 */ beqz $v0,.L0f196b68 /* f196b5c: 240e0029 */ addiu $t6,$zero,0x29 @@ -12994,7 +13005,7 @@ glabel var7f1b8fc8 /* f196b80: 00000000 */ nop /* f196b84: a29802a0 */ sb $t8,0x2a0($s4) .L0f196b88: -/* f196b88: 0fc64ba4 */ jal func0f192e90 +/* f196b88: 0fc64ba4 */ jal bot0f192e90 /* f196b8c: 02802025 */ or $a0,$s4,$zero /* f196b90: 0fc633fe */ jal mpPlayerGetIndex /* f196b94: 02802025 */ or $a0,$s4,$zero @@ -13051,7 +13062,7 @@ glabel var7f1b8fc8 /* f196c58: 0fc45090 */ jal waypointSetHashThing /* f196c5c: 00002825 */ or $a1,$zero,$zero .L0f196c60: -/* f196c60: 0fc663bb */ jal aibotTickInventory +/* f196c60: 0fc663bb */ jal botinvTick /* f196c64: 02802025 */ or $a0,$s4,$zero /* f196c68: afa00088 */ sw $zero,0x88($sp) /* f196c6c: 00009825 */ or $s3,$zero,$zero @@ -13104,7 +13115,7 @@ glabel var7f1b8fc8 /* f196d18: 0122082a */ slt $at,$t1,$v0 /* f196d1c: 10200005 */ beqz $at,.L0f196d34 /* f196d20: 02602825 */ or $a1,$s3,$zero -/* f196d24: 0fc64da7 */ jal func0f19369c +/* f196d24: 0fc64da7 */ jal bot0f19369c /* f196d28: a460003c */ sh $zero,0x3c($v1) /* f196d2c: 100001e7 */ b .L0f1974cc /* f196d30: 00000000 */ nop @@ -13130,7 +13141,7 @@ glabel var7f1b8fc8 /* f196d7c: 030d082a */ slt $at,$t8,$t5 /* f196d80: 54200034 */ bnezl $at,.L0f196e54 /* f196d84: a460003c */ sh $zero,0x3c($v1) -/* f196d88: 0fc64098 */ jal func0f190260 +/* f196d88: 0fc64098 */ jal bot0f190260 /* f196d8c: afa30054 */ sw $v1,0x54($sp) /* f196d90: 14400030 */ bnez $v0,.L0f196e54 /* f196d94: 8fa30054 */ lw $v1,0x54($sp) @@ -13293,7 +13304,7 @@ glabel var7f1b8fc8 /* f196fd4: 00000000 */ nop /* f196fd8: 0fc0897d */ jal chrUncloakTemporarily /* f196fdc: 02802025 */ or $a0,$s4,$zero -/* f196fe0: 0fc66a14 */ jal aibotCreateSlayerRocket +/* f196fe0: 0fc66a14 */ jal botactCreateSlayerRocket /* f196fe4: 02802025 */ or $a0,$s4,$zero /* f196fe8: 8e4b0024 */ lw $t3,0x24($s2) /* f196fec: 256cffff */ addiu $t4,$t3,-1 @@ -13302,7 +13313,7 @@ glabel var7f1b8fc8 .L0f196ff8: /* f196ff8: 000577c2 */ srl $t6,$a1,0x1f .L0f196ffc: -/* f196ffc: 0fc668a7 */ jal func0f19a29c +/* f196ffc: 0fc668a7 */ jal botactIsWeaponThrowable /* f197000: 01c02825 */ or $a1,$t6,$zero /* f197004: 1040005b */ beqz $v0,.L0f197174 /* f197008: 8fae004c */ lw $t6,0x4c($sp) @@ -13324,7 +13335,7 @@ glabel var7f1b8fc8 /* f197044: 8e450020 */ lw $a1,0x20($s2) /* f197048: 00003825 */ or $a3,$zero,$zero /* f19704c: 00066880 */ sll $t5,$a2,0x2 -/* f197050: 0fc666f9 */ jal aibotGetAmmoQuantityByWeapon +/* f197050: 0fc666f9 */ jal botactGetAmmoQuantityByWeapon /* f197054: 000d37c2 */ srl $a2,$t5,0x1f /* f197058: 5c400008 */ bgtzl $v0,.L0f19707c /* f19705c: 868b017e */ lh $t3,0x17e($s4) @@ -13353,7 +13364,7 @@ glabel var7f1b8fc8 /* f1970b0: 01d8082a */ slt $at,$t6,$t8 /* f1970b4: 1420000b */ bnez $at,.L0f1970e4 /* f1970b8: 00000000 */ nop -/* f1970bc: 0fc64098 */ jal func0f190260 +/* f1970bc: 0fc64098 */ jal bot0f190260 /* f1970c0: 02802025 */ or $a0,$s4,$zero /* f1970c4: 14400006 */ bnez $v0,.L0f1970e0 /* f1970c8: 02802025 */ or $a0,$s4,$zero @@ -13374,9 +13385,9 @@ glabel var7f1b8fc8 /* f1970fc: 8e450020 */ lw $a1,0x20($s2) /* f197100: 00066880 */ sll $t5,$a2,0x2 /* f197104: 000d37c2 */ srl $a2,$t5,0x1f -/* f197108: 0fc6675c */ jal aibotTryRemoveAmmoFromReserve +/* f197108: 0fc6675c */ jal botactTryRemoveAmmoFromReserve /* f19710c: 02e03825 */ or $a3,$s7,$zero -/* f197110: 0fc668df */ jal func0f19a37c +/* f197110: 0fc668df */ jal botact0f19a37c /* f197114: 02802025 */ or $a0,$s4,$zero /* f197118: 8e45004c */ lw $a1,0x4c($s2) /* f19711c: 8e440020 */ lw $a0,0x20($s2) @@ -13390,15 +13401,15 @@ glabel var7f1b8fc8 /* f19713c: 000fcb40 */ sll $t9,$t7,0xd /* f197140: 07230008 */ bgezl $t9,.L0f197164 /* f197144: 8e8902d4 */ lw $t1,0x2d4($s4) -/* f197148: 0fc65f65 */ jal aibotRemoveInvItem +/* f197148: 0fc65f65 */ jal botinvRemoveItem /* f19714c: 8e450020 */ lw $a1,0x20($s2) /* f197150: 02802025 */ or $a0,$s4,$zero /* f197154: 02e02825 */ or $a1,$s7,$zero -/* f197158: 0fc6652c */ jal aibotSwitchToWeapon +/* f197158: 0fc6652c */ jal botinvSwitchToWeapon /* f19715c: 00003025 */ or $a2,$zero,$zero /* f197160: 8e8902d4 */ lw $t1,0x2d4($s4) .L0f197164: -/* f197164: 0fc668b7 */ jal aibotGetProjectileThrowInterval +/* f197164: 0fc668b7 */ jal botactGetProjectileThrowInterval /* f197168: 8d240020 */ lw $a0,0x20($t1) /* f19716c: 100000d7 */ b .L0f1974cc /* f197170: ae420034 */ sw $v0,0x34($s2) @@ -13499,7 +13510,7 @@ glabel var7f1b8fc8 /* f1972d0: 0159082a */ slt $at,$t2,$t9 /* f1972d4: 1420002a */ bnez $at,.L0f197380 /* f1972d8: 00000000 */ nop -/* f1972dc: 0fc64098 */ jal func0f190260 +/* f1972dc: 0fc64098 */ jal bot0f190260 /* f1972e0: 02802025 */ or $a0,$s4,$zero /* f1972e4: 14400006 */ bnez $v0,.L0f197300 /* f1972e8: 02802025 */ or $a0,$s4,$zero @@ -13571,7 +13582,7 @@ glabel var7f1b8fc8 /* f1973dc: 8e45004c */ lw $a1,0x4c($s2) /* f1973e0: 8e440020 */ lw $a0,0x20($s2) /* f1973e4: 00057880 */ sll $t7,$a1,0x2 -/* f1973e8: 0fc66983 */ jal func0f19a60c +/* f1973e8: 0fc66983 */ jal botact0f19a60c /* f1973ec: 000f2fc2 */ srl $a1,$t7,0x1f /* f1973f0: ae22005c */ sw $v0,0x5c($s1) /* f1973f4: 8e45004c */ lw $a1,0x4c($s2) @@ -13668,9 +13679,9 @@ glabel var7f1b8fc8 ); #endif -void func0f197544(struct chrdata *chr) +void botCheckFetch(struct chrdata *chr) { - bool pass = false; + bool alreadyfetching = false; struct aibot *aibot = chr->aibot; if (chr->myaction == MA_AIBOTGETITEM) { @@ -13694,10 +13705,10 @@ void func0f197544(struct chrdata *chr) } aibot->unk0d8 = 1; - pass = true; + alreadyfetching = true; } - if (!pass) { + if (!alreadyfetching) { chrGoToPos(chr, &chr->act_gopos.endpos, chr->act_gopos.endrooms, chr->act_gopos.flags); } } diff --git a/src/game/game_1999b0.c b/src/game/botact.c similarity index 76% rename from src/game/game_1999b0.c rename to src/game/botact.c index cd1952dbd..550c25c17 100644 --- a/src/game/game_1999b0.c +++ b/src/game/botact.c @@ -7,7 +7,7 @@ #include "game/bondgun.h" #include "game/game_0b0fd0.h" #include "game/game_127910.h" -#include "game/game_1999b0.h" +#include "game/botact.h" #include "game/pad.h" #include "game/padhalllv.h" #include "game/propobj.h" @@ -19,7 +19,7 @@ #include "data.h" #include "types.h" -s32 weaponGetAmmoTypeByFunction(s32 weaponnum, u32 funcnum) +s32 botactGetAmmoTypeByFunction(s32 weaponnum, u32 funcnum) { if (weaponnum >= WEAPON_FALCON2 && weaponnum <= WEAPON_SUICIDEPILL) { struct inventory_ammo *ammo = weaponGetAmmoByFunction(weaponnum, funcnum); @@ -32,7 +32,7 @@ s32 weaponGetAmmoTypeByFunction(s32 weaponnum, u32 funcnum) return 0; } -s32 weaponGetClipCapacityByFunction(s32 weaponnum, u32 funcnum) +s32 botactGetClipCapacityByFunction(s32 weaponnum, u32 funcnum) { if (weaponnum >= WEAPON_FALCON2 && weaponnum <= WEAPON_SUICIDEPILL) { struct inventory_ammo *ammo = weaponGetAmmoByFunction(weaponnum, funcnum); @@ -45,30 +45,27 @@ s32 weaponGetClipCapacityByFunction(s32 weaponnum, u32 funcnum) return 0; } -void aibotReloadWeapon(struct chrdata *chr, s32 handnum, bool withsound) +void botactReload(struct chrdata *chr, s32 handnum, bool withsound) { struct aibot *aibot = chr->aibot; aibot->unk02c[handnum] = 0; aibot->maulercharge[handnum] = 0; - if (chr->weapons_held[handnum] - && func0f19a29c(aibot->weaponnum, aibot->gunfunc) == 0) { - s32 capacity = weaponGetClipCapacityByFunction(aibot->weaponnum, aibot->gunfunc); + if (chr->weapons_held[handnum] && !botactIsWeaponThrowable(aibot->weaponnum, aibot->gunfunc)) { + s32 capacity = botactGetClipCapacityByFunction(aibot->weaponnum, aibot->gunfunc); if (capacity > 0) { s32 tryamount = capacity - aibot->loadedammo[handnum]; - s32 actualamount = aibotTryRemoveAmmoFromReserve(aibot, aibot->weaponnum, aibot->gunfunc, tryamount); + s32 actualamount = botactTryRemoveAmmoFromReserve(aibot, aibot->weaponnum, aibot->gunfunc, tryamount); if (actualamount > 0) { aibot->loadedammo[handnum] += actualamount; if (withsound) { if (aibot->weaponnum == WEAPON_FARSIGHT) { - // FarSight reload sound func0f0939f8(NULL, chr->prop, SFX_RELOAD_FARSIGHT, -1, -1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1); } else { - // Normal reload sound func0f0939f8(NULL, chr->prop, SFX_RELOAD_DEFAULT, -1, -1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1); } @@ -78,7 +75,7 @@ void aibotReloadWeapon(struct chrdata *chr, s32 handnum, bool withsound) } } -s32 aibotGetAmmoQuantityByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum, bool include_equipped) +s32 botactGetAmmoQuantityByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum, bool include_equipped) { s32 qty = 0; s32 ammotype; @@ -86,16 +83,16 @@ s32 aibotGetAmmoQuantityByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum if (aibot) { if (aibot->unk064 & 1) { - ammotype = weaponGetAmmoTypeByFunction(weaponnum, funcnum); + ammotype = botactGetAmmoTypeByFunction(weaponnum, funcnum); qty = bgunGetCapacityByAmmotype(ammotype); } else { - ammotype = weaponGetAmmoTypeByFunction(weaponnum, funcnum); + ammotype = botactGetAmmoTypeByFunction(weaponnum, funcnum); qty = aibot->ammoheld[ammotype]; } if (include_equipped) { - ammotype = weaponGetAmmoTypeByFunction(weaponnum, funcnum); - equippedammotype = weaponGetAmmoTypeByFunction(aibot->weaponnum, aibot->gunfunc); + ammotype = botactGetAmmoTypeByFunction(weaponnum, funcnum); + equippedammotype = botactGetAmmoTypeByFunction(aibot->weaponnum, aibot->gunfunc); if (equippedammotype == ammotype) { qty += aibot->loadedammo[HAND_LEFT] + aibot->loadedammo[HAND_RIGHT]; @@ -106,7 +103,7 @@ s32 aibotGetAmmoQuantityByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum return qty; } -s32 aibotGetAmmoQuantityByType(struct aibot *aibot, s32 ammotype, bool include_equipped) +s32 botactGetAmmoQuantityByType(struct aibot *aibot, s32 ammotype, bool include_equipped) { s32 qty = 0; @@ -118,7 +115,7 @@ s32 aibotGetAmmoQuantityByType(struct aibot *aibot, s32 ammotype, bool include_e } if (include_equipped - && weaponGetAmmoTypeByFunction(aibot->weaponnum, aibot->gunfunc) == ammotype) { + && botactGetAmmoTypeByFunction(aibot->weaponnum, aibot->gunfunc) == ammotype) { qty += aibot->loadedammo[HAND_LEFT] + aibot->loadedammo[HAND_RIGHT]; } } @@ -133,10 +130,10 @@ s32 aibotGetAmmoQuantityByType(struct aibot *aibot, s32 ammotype, bool include_e * The amount removed will be less than the attempted amount if the aibot * doesn't have enough ammo in reserve. */ -s32 aibotTryRemoveAmmoFromReserve(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 tryqty) +s32 botactTryRemoveAmmoFromReserve(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 tryqty) { - s32 result; - s32 *ammoheld = &aibot->ammoheld[weaponGetAmmoTypeByFunction(weaponnum, funcnum)]; + s32 amountremoved; + s32 *ammoheld = &aibot->ammoheld[botactGetAmmoTypeByFunction(weaponnum, funcnum)]; if (!aibot || *ammoheld <= 0 || tryqty <= 0) { return 0; @@ -150,24 +147,24 @@ s32 aibotTryRemoveAmmoFromReserve(struct aibot *aibot, s32 weaponnum, s32 funcnu *ammoheld -= tryqty; if (*ammoheld < 0) { - result = tryqty + *ammoheld; + amountremoved = tryqty + *ammoheld; *ammoheld = 0; if (dprint()) { - return result; + return amountremoved; } } else { - result = tryqty; + amountremoved = tryqty; dprint(); } - return result; + return amountremoved; } -void aibotGiveAmmoByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 qty) +void botactGiveAmmoByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 qty) { s32 max; - s32 *heldquantity = &aibot->ammoheld[weaponGetAmmoTypeByFunction(weaponnum, funcnum)]; + s32 *heldquantity = &aibot->ammoheld[botactGetAmmoTypeByFunction(weaponnum, funcnum)]; if (aibot && (aibot->unk064 & 1) == 0 && qty > 0) { dprint(); @@ -175,7 +172,7 @@ void aibotGiveAmmoByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 if (heldquantity); - max = bgunGetCapacityByAmmotype(weaponGetAmmoTypeByFunction(weaponnum, funcnum)); + max = bgunGetCapacityByAmmotype(botactGetAmmoTypeByFunction(weaponnum, funcnum)); if (*heldquantity > max) { *heldquantity = max; @@ -185,7 +182,7 @@ void aibotGiveAmmoByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 } } -void aibotGiveAmmoByType(struct aibot *aibot, u32 ammotype, s32 quantity) +void botactGiveAmmoByType(struct aibot *aibot, u32 ammotype, s32 quantity) { s32 max; s32 *heldquantity = &aibot->ammoheld[ammotype]; @@ -209,7 +206,7 @@ void aibotGiveAmmoByType(struct aibot *aibot, u32 ammotype, s32 quantity) dprint(); } -bool aibotShootFarsightThroughWalls(struct chrdata *chr, s32 arg1, struct coord *vector, struct coord *arg3) +bool botactShootFarsight(struct chrdata *chr, s32 arg1, struct coord *vector, struct coord *arg3) { struct aibot *aibot; struct chrdata *oppchr; @@ -238,9 +235,9 @@ bool aibotShootFarsightThroughWalls(struct chrdata *chr, s32 arg1, struct coord s32 fallback = 30; s32 value = fallback; - for (i = 0; i < g_MpNumPlayers; i++) { - oppchr = g_MpPlayerChrs[i]; - oppprop = g_MpPlayerChrs[i]->prop; + for (i = 0; i < g_MpNumChrs; i++) { + oppchr = g_MpAllChrPtrs[i]; + oppprop = g_MpAllChrPtrs[i]->prop; if (oppprop->type == PROPTYPE_PLAYER) { struct player *player = g_Vars.players[propGetPlayerNum(oppprop)]; @@ -282,12 +279,12 @@ bool aibotShootFarsightThroughWalls(struct chrdata *chr, s32 arg1, struct coord return true; } -s32 func0f19a27c(s32 weapon) +s32 botactGetWeaponModel(s32 weapon) { return weaponGetModel(weapon); } -bool func0f19a29c(u32 weaponnum, bool is_secondary) +bool botactIsWeaponThrowable(u32 weaponnum, bool is_secondary) { switch (weaponnum) { case WEAPON_LAPTOPGUN: @@ -305,7 +302,7 @@ bool func0f19a29c(u32 weaponnum, bool is_secondary) return false; } -u32 aibotGetProjectileThrowInterval(u32 weapon) +u32 botactGetProjectileThrowInterval(u32 weapon) { switch (weapon) { case WEAPON_COMBATKNIFE: @@ -324,7 +321,7 @@ u32 aibotGetProjectileThrowInterval(u32 weapon) } } -u32 ammotypeGetWeapon(u32 ammotype) +u32 botactGetWeaponByAmmoType(u32 ammotype) { switch (ammotype) { case AMMOTYPE_NBOMB: return WEAPON_NBOMB; @@ -338,7 +335,7 @@ u32 ammotypeGetWeapon(u32 ammotype) return 0; } -void func0f19a37c(struct chrdata *chr) +void botact0f19a37c(struct chrdata *chr) { struct coord sp228 = {0, 0, 0}; Mtxf sp164; @@ -405,10 +402,13 @@ void func0f19a37c(struct chrdata *chr) } } -s32 func0f19a60c(s32 weaponnum, s32 funcnum) +/** + * Get the fire rate of the given weapon? + */ +s32 botact0f19a60c(s32 weaponnum, s32 funcnum) { s32 stack[2]; - s32 iVar4 = 1; + s32 result = 1; struct weapon *weapon = weaponFindById(weaponnum); if (weapon) { @@ -417,23 +417,29 @@ s32 func0f19a60c(s32 weaponnum, s32 funcnum) if (func) { if (func->type == INVENTORYFUNCTYPE_SHOOT_SINGLE) { struct weaponfunc_shoot *func2 = (struct weaponfunc_shoot *)func; - iVar4 = func2->unk24 + func2->unk25; + result = func2->unk24 + func2->unk25; } else if (func->type == INVENTORYFUNCTYPE_SHOOT_AUTOMATIC) { struct weaponfunc_shoot *func2 = (struct weaponfunc_shoot *)func; - iVar4 = func2->unk24 + func2->unk25; + result = func2->unk24 + func2->unk25; } else if (func->type == INVENTORYFUNCTYPE_SHOOT_PROJECTILE) { struct weaponfunc_shoot *func2 = (struct weaponfunc_shoot *)func; - iVar4 = func2->unk24 + func2->unk25; + result = func2->unk24 + func2->unk25; } else if (func->type == INVENTORYFUNCTYPE_CLOSE && weaponnum != WEAPON_REAPER) { - iVar4 = 60; + result = 60; } } } - return iVar4; + return result; } -bool func0f19a6d0(struct chrdata *chr, struct coord *frompos, struct coord *topos, s16 *fromrooms, s16 *torooms, struct projectile *projectile) +/** + * Do pathfinding for a bot's Slayer rocket in fly-by-wire mode and populate + * the projectil's waypads. + * + * Return true if a route was found, false if not. + */ +bool botactFindRocketRoute(struct chrdata *chr, struct coord *frompos, struct coord *topos, s16 *fromrooms, s16 *torooms, struct projectile *projectile) { struct waypoint *from = waypointFindClosestToPos(frompos, fromrooms); struct waypoint *to = waypointFindClosestToPos(topos, torooms); @@ -465,7 +471,12 @@ bool func0f19a6d0(struct chrdata *chr, struct coord *frompos, struct coord *topo return false; } -void func0f19a7d0(u16 padnum, struct coord *pos) +/** + * Determine where to spawn a Slayer rocket in fly-by-wire mode. + * + * It's the ground position of the pad plus 1.5 metres. + */ +void botactGetRocketSpawnPos(u16 padnum, struct coord *pos) { struct pad pad; s16 rooms[2]; @@ -480,7 +491,10 @@ void func0f19a7d0(u16 padnum, struct coord *pos) pos->z = pad.pos.z; } -void aibotCreateSlayerRocket(struct chrdata *chr) +/** + * Create a Slayer rocket in fly-by-wire mode (ie. remote controlled). + */ +void botactCreateSlayerRocket(struct chrdata *chr) { struct weaponobj *rocket = func0f08b880(MODEL_CHRSKROCKETMIS, WEAPON_SKROCKET, chr); @@ -520,10 +534,10 @@ void aibotCreateSlayerRocket(struct chrdata *chr) func0f0939f8(NULL, rocket->base.prop, SFX_LAUNCH_ROCKET_8053, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); - if (!func0f19a6d0(chr, &chr->prop->pos, &target->pos, chr->prop->rooms, target->rooms, rocket->base.projectile)) { + if (!botactFindRocketRoute(chr, &chr->prop->pos, &target->pos, chr->prop->rooms, target->rooms, rocket->base.projectile)) { rocket->timer240 = 0; // blow up rocket } else { - func0f19a7d0(rocket->base.projectile->waypads[0], &rocket->base.projectile->pos); + botactGetRocketSpawnPos(rocket->base.projectile->waypads[0], &rocket->base.projectile->pos); chr->aibot->skrocket = rocket->base.prop; } } diff --git a/src/game/game_197600.c b/src/game/botcmd.c similarity index 78% rename from src/game/game_197600.c rename to src/game/botcmd.c index f4b952abd..920843611 100644 --- a/src/game/game_197600.c +++ b/src/game/botcmd.c @@ -7,9 +7,9 @@ #include "game/game_0b0fd0.h" #include "game/game_127910.h" #include "game/mplayer/setup.h" -#include "game/game_190260.h" -#include "game/game_197600.h" -#include "game/game_1999b0.h" +#include "game/bot.h" +#include "game/botcmd.h" +#include "game/botact.h" #include "game/mplayer/mplayer.h" #include "game/propobj.h" #include "bss.h" @@ -17,121 +17,132 @@ #include "data.h" #include "types.h" -f32 var80087e50[][3] = { - { 0, 120, 10000 }, - { 300, 450, 4500 }, - { 300, 600, 4500 }, - { 600, 1200, 4500 }, - { 150, 250, 4500 }, - { 1000, 2000, 3000 }, - { 0, 250, 10000 }, - { 450, 700, 4500 }, +/** + * This table defines the ideal distance ranges for attacking. + * + * The first value is the minimum attack distance. + * The second value is the maximum attack distance. + * The third value doesn't appear to have any purpose. + */ +f32 g_BotDistConfigs[][3] = { + { 0, 120, 10000 }, // BOTDISTCFG_CLOSE + { 300, 450, 4500 }, // BOTDISTCFG_PISTOL + { 300, 600, 4500 }, // BOTDISTCFG_DEFAULT + { 600, 1200, 4500 }, // BOTDISTCFG_SHOOTEXPLOSIVE + { 150, 250, 4500 }, // BOTDISTCFG_KAZE + { 1000, 2000, 3000 }, // BOTDISTCFG_FARSIGHT + { 0, 250, 10000 }, // BOTDISTCFG_FOLLOW + { 450, 700, 4500 }, // BOTDISTCFG_THROWEXPLOSIVE }; #if VERSION >= VERSION_NTSC_1_0 -void func0f197600(struct chrdata *chr) +void botcmdTickDistMode(struct chrdata *chr) { - s32 index; + s32 confignum; f32 *limits; f32 distance; - u8 new074; + u8 newmode; struct aibot *aibot = chr->aibot; - s32 prev074 = aibot->unk074; - struct prop *prop = NULL; + s32 prevmode = aibot->distmode; + struct prop *targetprop = NULL; s32 somevalue = 0; - f32 limit1; - f32 limit2; + f32 minattackdistance; + f32 maxattackdistance; f32 limit3; u32 stack; - if (aibot->simulant->base.simtype == SIMTYPE_KAZE) { - index = 4; + if (aibot->config->type == BOTTYPE_KAZE) { + confignum = BOTDISTCFG_KAZE; } else { - index = func0f198e38(aibot->weaponnum, aibot->gunfunc); + confignum = botinvGetDistConfig(aibot->weaponnum, aibot->gunfunc); } if (chr->myaction == MA_AIBOTFOLLOW && aibot->followingplayernum >= 0) { - limits = var80087e50[6]; - prop = g_MpPlayerChrs[aibot->followingplayernum]->prop; + limits = g_BotDistConfigs[BOTDISTCFG_FOLLOW]; + targetprop = g_MpAllChrPtrs[aibot->followingplayernum]->prop; somevalue = aibot->unk16c[aibot->followingplayernum]; - if (chr->target != -1 && (index == 0 || index == 4)) { + if (chr->target != -1 && (confignum == BOTDISTCFG_CLOSE || confignum == BOTDISTCFG_KAZE)) { struct prop *target = chrGetTargetProp(chr); - f32 xdiff = prop->pos.x - target->pos.x; - f32 ydiff = prop->pos.y - target->pos.y; - f32 zdiff = prop->pos.z - target->pos.z; + f32 xdiff = targetprop->pos.x - target->pos.x; + f32 ydiff = targetprop->pos.y - target->pos.y; + f32 zdiff = targetprop->pos.z - target->pos.z; if (xdiff * xdiff + ydiff * ydiff + zdiff * zdiff < 500 * 500) { - limits = var80087e50[index]; - prop = target; + limits = g_BotDistConfigs[confignum]; + targetprop = target; somevalue = aibot->unk128; } } } else { - limits = var80087e50[index]; + limits = g_BotDistConfigs[confignum]; if (chr->myaction == MA_AIBOTATTACK && aibot->attackingplayernum >= 0) { - prop = g_MpPlayerChrs[aibot->attackingplayernum]->prop; + targetprop = g_MpAllChrPtrs[aibot->attackingplayernum]->prop; somevalue = aibot->unk16c[aibot->attackingplayernum]; } else if (chr->target != -1) { - prop = chrGetTargetProp(chr); + targetprop = chrGetTargetProp(chr); somevalue = aibot->unk128; } } - if (prop == NULL) { + if (targetprop == NULL) { return; } - if (!chrHasGround(prop->chr)) { + if (!botHasGround(targetprop->chr)) { return; } - distance = chrGetDistanceToCoord(chr, &prop->pos); - limit1 = limits[0]; - limit2 = limits[1]; + distance = chrGetDistanceToCoord(chr, &targetprop->pos); + minattackdistance = limits[0]; + maxattackdistance = limits[1]; limit3 = limits[2]; - if (chr->aibot->simulant->difficulty == SIMDIFF_MEAT) { - limit1 *= 0.35f; - } else if (chr->aibot->simulant->difficulty == SIMDIFF_EASY) { - limit1 *= 0.5f; + if (chr->aibot->config->difficulty == BOTDIFF_MEAT) { + minattackdistance *= 0.35f; + } else if (chr->aibot->config->difficulty == BOTDIFF_EASY) { + minattackdistance *= 0.5f; } - if (aibot->unk074 == 1) { - limit1 += 25.0f; - } else if (aibot->unk074 == 3 || aibot->unk074 == 4) { - limit2 -= 25.0f; + if (aibot->distmode == BOTDISTMODE_BACKUP) { + minattackdistance += 25.0f; + } else if (aibot->distmode == BOTDISTMODE_ADVANCE || aibot->distmode == BOTDISTMODE_GOTO) { + maxattackdistance -= 25.0f; } - if (distance < limit1) { - new074 = 1; - } else if (distance >= limit1 && distance < limit2) { - new074 = 2; - } else if (distance >= limit2 && distance < limit3) { - new074 = 3; + if (distance < minattackdistance) { + // Bot is too close to target - move back a bit + newmode = BOTDISTMODE_BACKUP; + } else if (distance >= minattackdistance && distance < maxattackdistance) { + // Bot is a good distance from target for attacking + newmode = BOTDISTMODE_OK; + } else if (distance >= maxattackdistance && distance < limit3) { + // Bot needs to come closer to target + newmode = BOTDISTMODE_ADVANCE; } else { - new074 = 4; + // Bot needs to come a lot closer to target + newmode = BOTDISTMODE_GOTO; } - if (new074 != 1 || somevalue == 0 || aibot->unk050 != prop) { + if (newmode != BOTDISTMODE_BACKUP || somevalue == 0 || aibot->unk050 != targetprop) { aibot->unk050 = NULL; aibot->unk09d = 0; } - if (new074 == 2) { + if (newmode == BOTDISTMODE_OK) { if (somevalue == 0) { - new074 = 3; + newmode = BOTDISTMODE_ADVANCE; } - } else if (new074 == 1) { + } else if (newmode == BOTDISTMODE_BACKUP) { if (somevalue == 0) { - new074 = 3; - aibot->unk050 = prop; + newmode = BOTDISTMODE_ADVANCE; + aibot->unk050 = targetprop; aibot->unk09d = PALDOWN(20) + (random() % PALDOWN(120)); } else if (aibot->unk050) { if (aibot->unk09d > g_Vars.lvupdate240_60) { aibot->unk09d -= g_Vars.lvupdate240_60; - new074 = 2; + newmode = BOTDISTMODE_OK; } else { aibot->unk050 = NULL; aibot->unk09d = 0; @@ -139,34 +150,35 @@ void func0f197600(struct chrdata *chr) } } - aibot->unk074 = new074; + aibot->distmode = newmode; - if (aibot->unk0d0 >= 0) { - aibot->unk0d0 -= g_Vars.lvupdate240_60; + if (aibot->distmodettl60 >= 0) { + aibot->distmodettl60 -= g_Vars.lvupdate240_60; } - if (new074 != prev074 || (new074 != 2 && (chr->actiontype == ACT_STAND || aibot->unk0d0 <= 0))) { - switch (new074) { - case 1: - chrRunFromPos(chr, SPEED_RUN, 10000, &prop->pos); + if (newmode != prevmode + || (newmode != BOTDISTMODE_OK && (chr->actiontype == ACT_STAND || aibot->distmodettl60 <= 0))) { + switch (newmode) { + case BOTDISTMODE_BACKUP: + chrRunFromPos(chr, SPEED_RUN, 10000, &targetprop->pos); break; - case 2: + case BOTDISTMODE_OK: chrTryStop(chr); break; - case 3: - chrGoToProp(chr, prop, SPEED_RUN); + case BOTDISTMODE_ADVANCE: + chrGoToProp(chr, targetprop, SPEED_RUN); break; - case 4: - chrGoToProp(chr, prop, SPEED_RUN); + case BOTDISTMODE_GOTO: + chrGoToProp(chr, targetprop, SPEED_RUN); break; } - aibot->unk0d0 = PALDOWN(60); + aibot->distmodettl60 = PALDOWN(60); } } #else GLOBAL_ASM( -glabel func0f197600 +glabel botcmdTickDistMode .late_rodata glabel var7f1b35b0 .word 0x48742400 @@ -195,7 +207,7 @@ glabel var7f1b35b4 /* f1916c8: 00055080 */ sll $t2,$a1,0x2 /* f1916cc: 000a2fc2 */ srl $a1,$t2,0x1f /* f1916d0: afa80054 */ sw $t0,0x54($sp) -/* f1916d4: 0fc64b86 */ jal func0f198e38 +/* f1916d4: 0fc64b86 */ jal botinvGetDistConfig /* f1916d8: afa7004c */ sw $a3,0x4c($sp) /* f1916dc: 8fa7004c */ lw $a3,0x4c($sp) /* f1916e0: 8fa80054 */ lw $t0,0x54($sp) @@ -306,7 +318,7 @@ glabel var7f1b35b4 /* f191870: afa90048 */ sw $t1,0x48($sp) /* f191874: afa80054 */ sw $t0,0x54($sp) /* f191878: afa7004c */ sw $a3,0x4c($sp) -/* f19187c: 0fc632b2 */ jal chrHasGround +/* f19187c: 0fc632b2 */ jal botHasGround /* f191880: afa60060 */ sw $a2,0x60($sp) /* f191884: 8fa60060 */ lw $a2,0x60($sp) /* f191888: 8fa7004c */ lw $a3,0x4c($sp) @@ -477,7 +489,7 @@ glabel var7f1b35b4 ); #endif -void mpAibotApplyCommand(struct chrdata *chr, u32 command) +void botcmdApply(struct chrdata *chr, u32 command) { f32 value; @@ -486,21 +498,21 @@ void mpAibotApplyCommand(struct chrdata *chr, u32 command) amOpenPickTarget(); break; case AIBOTCMD_FOLLOW: - mpAibotApplyFollow(chr, g_Vars.currentplayer->prop); + botApplyFollow(chr, g_Vars.currentplayer->prop); break; case AIBOTCMD_PROTECT: - mpAibotApplyProtect(chr, g_Vars.currentplayer->prop); + botApplyProtect(chr, g_Vars.currentplayer->prop); break; case AIBOTCMD_DEFEND: value = chrGetInverseTheta(g_Vars.currentplayer->prop->chr); - mpAibotApplyDefend(chr, &g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, value); + botApplyDefend(chr, &g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, value); break; case AIBOTCMD_HOLD: value = chrGetInverseTheta(g_Vars.currentplayer->prop->chr); - mpAibotApplyHold(chr, &g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, value); + botApplyHold(chr, &g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, value); break; default: - mpAibotApplyScenarioCommand(chr, command); + botApplyScenarioCommand(chr, command); break; } } diff --git a/src/game/botinv.c b/src/game/botinv.c new file mode 100644 index 000000000..f305d6dd2 --- /dev/null +++ b/src/game/botinv.c @@ -0,0 +1,1167 @@ +#include +#include "constants.h" +#include "game/chr/chraction.h" +#include "game/debug.h" +#include "game/chr/chr.h" +#include "game/ceil.h" +#include "game/game_0b0fd0.h" +#include "game/game_127910.h" +#include "game/mplayer/setup.h" +#include "game/bot.h" +#include "game/botact.h" +#include "game/botcmd.h" +#include "game/botinv.h" +#include "game/mplayer/mplayer.h" +#include "game/propobj.h" +#include "bss.h" +#include "lib/rng.h" +#include "data.h" +#include "types.h" + +struct aibotweaponpreference g_AibotWeaponPreferences[] = { + /*0x00*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 0, 0 }, // WEAPON_NONE + /*0x01*/ { 13, 13, 13, 13, 1, 1, BOTDISTCFG_CLOSE, BOTDISTCFG_CLOSE, 0, 0, 0, 0, 0, 0 }, // WEAPON_UNARMED + /*0x02*/ { 56, 60, 84, 88, 1, 1, BOTDISTCFG_PISTOL, BOTDISTCFG_CLOSE, 30, 0, 10, 0, 1, 0 }, // WEAPON_FALCON2 + /*0x03*/ { 52, 60, 80, 88, 1, 1, BOTDISTCFG_PISTOL, BOTDISTCFG_CLOSE, 30, 0, 10, 0, 1, 0 }, // WEAPON_FALCON2_SILENCER + /*0x04*/ { 60, 60, 88, 88, 1, 1, BOTDISTCFG_PISTOL, BOTDISTCFG_CLOSE, 30, 0, 10, 0, 1, 0 }, // WEAPON_FALCON2_SCOPE + /*0x05*/ { 76, 88, 104, 120, 1, 1, BOTDISTCFG_PISTOL, BOTDISTCFG_DEFAULT, 30, 30, 10, 10, 1, 0 }, // WEAPON_MAGSEC4 + /*0x06*/ { 64, 88, 92, 120, 1, 1, BOTDISTCFG_PISTOL, BOTDISTCFG_DEFAULT, 30, 30, 10, 10, 1, 0 }, // WEAPON_MAULER + /*0x07*/ { 72, 76, 100, 120, 1, 1, BOTDISTCFG_PISTOL, BOTDISTCFG_DEFAULT, 30, 30, 10, 10, 2, 0 }, // WEAPON_PHOENIX + /*0x08*/ { 68, 76, 96, 120, 1, 1, BOTDISTCFG_PISTOL, BOTDISTCFG_CLOSE, 30, 0, 8, 0, 3, 0 }, // WEAPON_DY357MAGNUM + /*0x09*/ { 180, 188, 184, 188, 1, 1, BOTDISTCFG_PISTOL, BOTDISTCFG_CLOSE, 20, 0, 6, 0, 3, 0 }, // WEAPON_DY357LX + /*0x0a*/ { 116, 128, 136, 152, 1, 1, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 100, 100, 30, 30, 2, 0 }, // WEAPON_CMP150 + /*0x0b*/ { 120, 128, 132, 140, 1, 1, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 150, 150, 50, 50, 2, 0 }, // WEAPON_CYCLONE + /*0x0c*/ { 152, 176, 0, 0, 1, 1, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 100, 70, 25, 15, 2, 0 }, // WEAPON_CALLISTO + /*0x0d*/ { 172, 188, 0, 0, 1, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 300, 0, 40, 0, 2, 0 }, // WEAPON_RCP120 + /*0x0e*/ { 128, 140, 0, 0, 1, 1, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 100, 0, 30, 0, 3, 0 }, // WEAPON_LAPTOPGUN + /*0x0f*/ { 124, 148, 0, 0, 1, 1, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 90, 0, 30, 0, 1, 0 }, // WEAPON_DRAGON + /*0x10*/ { 156, 180, 0, 0, 1, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 150, 0, 40, 0, 2, 0 }, // WEAPON_K7AVENGER + /*0x11*/ { 148, 176, 0, 0, 1, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 120, 0, 40, 0, 2, 0 }, // WEAPON_AR34 + /*0x12*/ { 164, 188, 0, 0, 1, 1, BOTDISTCFG_DEFAULT, BOTDISTCFG_SHOOTEXPLOSIVE, 120, 20, 30, 6, 1, 0 }, // WEAPON_SUPERDRAGON + /*0x13*/ { 140, 156, 0, 0, 1, 1, BOTDISTCFG_PISTOL, BOTDISTCFG_PISTOL, 18, 18, 8, 8, 6, 1 }, // WEAPON_SHOTGUN + /*0x14*/ { 144, 176, 0, 0, 1, 1, BOTDISTCFG_DEFAULT, BOTDISTCFG_CLOSE, 400, 0, 80, 0, 3, 0 }, // WEAPON_REAPER + /*0x15*/ { 28, 40, 0, 0, 1, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 30, 30, 10, 10, 2, 0 }, // WEAPON_SNIPERRIFLE + /*0x16*/ { 188, 188, 0, 0, 1, 0, BOTDISTCFG_SHOOTEXPLOSIVE, BOTDISTCFG_FARSIGHT, 16, 0, 4, 0, 2, 0 }, // WEAPON_FARSIGHT + /*0x17*/ { 176, 188, 0, 0, 1, 1, BOTDISTCFG_SHOOTEXPLOSIVE, BOTDISTCFG_SHOOTEXPLOSIVE, 20, 20, 4, 4, 2, 0 }, // WEAPON_DEVASTATOR + /*0x18*/ { 160, 188, 0, 0, 1, 1, BOTDISTCFG_SHOOTEXPLOSIVE, BOTDISTCFG_SHOOTEXPLOSIVE, 2, 2, 1, 1, 2, 0 }, // WEAPON_ROCKETLAUNCHER + /*0x19*/ { 168, 188, 0, 0, 1, 1, BOTDISTCFG_SHOOTEXPLOSIVE, BOTDISTCFG_SHOOTEXPLOSIVE, 2, 2, 1, 1, 3, 0 }, // WEAPON_SLAYER + /*0x1a*/ { 20, 40, 24, 40, 1, 1, BOTDISTCFG_CLOSE, BOTDISTCFG_DEFAULT, 0, 5, 0, 1, 1, 0 }, // WEAPON_COMBATKNIFE + /*0x1b*/ { 108, 176, 0, 0, 1, 1, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 15, 15, 5, 5, 4, 1 }, // WEAPON_CROSSBOW + /*0x1c*/ { 48, 188, 0, 0, 1, 1, BOTDISTCFG_DEFAULT, BOTDISTCFG_CLOSE, 20, 24, 6, 8, 1, 0 }, // WEAPON_TRANQUILIZER + /*0x1d*/ { 112, 112, 0, 0, 1, 1, BOTDISTCFG_DEFAULT, BOTDISTCFG_CLOSE, 0, 0, 0, 0, 1, 0 }, // WEAPON_LASER + /*0x1e*/ { 36, 172, 0, 0, 1, 1, BOTDISTCFG_THROWEXPLOSIVE, BOTDISTCFG_THROWEXPLOSIVE, 6, 6, 2, 2, 1, 0 }, // WEAPON_GRENADE + /*0x1f*/ { 32, 188, 0, 0, 1, 1, BOTDISTCFG_THROWEXPLOSIVE, BOTDISTCFG_THROWEXPLOSIVE, 3, 3, 1, 1, 1, 0 }, // WEAPON_NBOMB + /*0x20*/ { 12, 12, 0, 0, 0, 0, BOTDISTCFG_THROWEXPLOSIVE, BOTDISTCFG_DEFAULT, 5, 5, 1, 1, 1, 0 }, // WEAPON_TIMEDMINE + /*0x21*/ { 40, 176, 0, 0, 0, 0, BOTDISTCFG_THROWEXPLOSIVE, BOTDISTCFG_DEFAULT, 5, 5, 1, 1, 1, 0 }, // WEAPON_PROXIMITYMINE + /*0x22*/ { 44, 156, 0, 0, 1, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 5, 5, 2, 2, 1, 0 }, // WEAPON_REMOTEMINE + /*0x23*/ { 8, 8, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_COMBATBOOST + /*0x24*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_PP9I + /*0x25*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_CC13 + /*0x26*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_KL01313 + /*0x27*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_KF7SPECIAL + /*0x28*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_ZZT + /*0x29*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_DMC + /*0x2a*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_AR53 + /*0x2b*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_RCP45 + /*0x2c*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_PSYCHOSISGUN + /*0x2d*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_NIGHTVISION + /*0x2e*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_EYESPY + /*0x2f*/ { 4, 4, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_XRAYSCANNER + /*0x30*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_IRSCANNER +#if PAL + /*0x31*/ { 218, 218, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 1000, 0, 0, 0, 1, 0 }, // WEAPON_CLOAKINGDEVICE +#else + /*0x31*/ { 218, 218, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 1200, 0, 0, 0, 1, 0 }, // WEAPON_CLOAKINGDEVICE +#endif + /*0x32*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_HORIZONSCANNER + /*0x33*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_TESTER + /*0x34*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_ROCKETLAUNCHER_34 + /*0x35*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_ECMMINE + /*0x36*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_DATAUPLINK + /*0x37*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_RTRACKER + /*0x38*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_PRESIDENTSCANNER + /*0x39*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_DOORDECODER + /*0x3a*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_AUTOSURGEON + /*0x3b*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_EXPLOSIVES + /*0x3c*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_SKEDARBOMB + /*0x3d*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_COMMSRIDER + /*0x3e*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_TRACERBUG + /*0x3f*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_TARGETAMPLIFIER + /*0x40*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_DISGUISE40 + /*0x41*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_DISGUISE41 + /*0x42*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_FLIGHTPLANS + /*0x43*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_RESEARCHTAPE + /*0x44*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_BACKUPDISK + /*0x45*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD45 + /*0x46*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD46 + /*0x47*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD47 + /*0x48*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD48 + /*0x49*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD49 + /*0x4a*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD4A + /*0x4b*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD4B + /*0x4c*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD4C + /*0x4d*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_SUITCASE + /*0x4e*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_BRIEFCASE +#if VERSION >= VERSION_NTSC_1_0 + /*0x4f*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_SHIELDTECHITEM +#endif + /*0x50*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_NECKLACE + /*0x51*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_HAMMER + /*0x52*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_SCREWDRIVER + /*0x53*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_ROCKET + /*0x54*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_HOMINGROCKET + /*0x55*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_GRENADEROUND + /*0x56*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_BOLT + /*0x57*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_BRIEFCASE2 + /*0x58*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_SKROCKET + /*0x59*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_59 + /*0x5a*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_WATCHLASER + /*0x5b*/ { 220, 220, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_MPSHIELD + /*0x5c*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_DISABLED + /*0x5d*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_SUICIDEPILL +}; + +/** + * Remove all items from the bot's inventory. + */ +void botinvClear(struct chrdata *chr) +{ + if (chr && chr->aibot) { + s32 i = 0; + + for (i = 0; i < chr->aibot->maxitems; i++) { + chr->aibot->items[i].type = -1; + } + + dprint(); + } +} + +/** + * Return a free slot from the bot's inventory. + * + * In theory this should never fail. The inventory has 10 slots. 6 are for + * weapons, and 4 are for scenario-specific items such as briefcases and the + * data uplink. + */ +struct invitem *botinvGetFreeSlot(struct chrdata *chr) +{ + s32 i; + + if (!chr || !chr->aibot) { + return NULL; + } + + for (i = 0; i < chr->aibot->maxitems; i++) { + if (chr->aibot->items[i].type == -1) { + return &chr->aibot->items[i]; + } + } + + dprint(); + + return NULL; +} + +/** + * Retrieve an inventory item from the bot's inventory. + */ +struct invitem *botinvGetItem(struct chrdata *chr, u32 weaponnum) +{ + s32 i; + + if (!chr || !chr->aibot) { + return NULL; + } + + for (i = 0; i < chr->aibot->maxitems; i++) { + struct invitem *item = &chr->aibot->items[i]; + + if (item->type == -1) { + continue; + } + + if (item->type == INVITEMTYPE_WEAP || item->type == INVITEMTYPE_DUAL) { + if (item->type_weap.weapon1 == weaponnum) { + return item; + } + } + } + + return NULL; +} + +/** + * Remove a weapon from the bot's inventory. + */ +void botinvRemoveItem(struct chrdata *chr, s32 weaponnum) +{ + s32 i; + + if (!chr || !chr->aibot) { + return; + } + + for (i = 0; i < chr->aibot->maxitems; i++) { + struct invitem *item = &chr->aibot->items[i]; + + if (item->type == -1) { + continue; + } + + if (item->type == INVITEMTYPE_WEAP || item->type == INVITEMTYPE_DUAL) { + if (item->type_weap.weapon1 == weaponnum) { + chr->aibot->items[i].type = -1; + return; + } + } + } +} + +/** + * Return the item type of the given weapon number. + * + * See the INVITEMTYPE constants. + */ +u32 botinvGetItemType(struct chrdata *chr, u32 weaponnum) +{ + struct invitem *item; + + if (!chr || !chr->aibot) { + return 0; + } + + item = botinvGetItem(chr, weaponnum); + + if (item) { + return item->type; + } + + return 0; +} + +/** + * Give a single weapon to the bot. + * + * There is no pickup pad, so this is likely for dropped items. + */ +bool botinvGiveSingleWeapon(struct chrdata *chr, u32 weaponnum) +{ + if (!chr || !chr->aibot) { + return false; + } + + if (!botinvGetItemType(chr, weaponnum)) { + struct invitem *item = botinvGetFreeSlot(chr); + + if (item) { + item->type = INVITEMTYPE_WEAP; + item->type_weap.weapon1 = weaponnum; + item->type_weap.pickuppad = -1; + } + + return true; + } + + return false; +} + +/** + * Grant a bot dual weapons. They must already have the single weapon in their + * inventory. + * + * This works by converting the single item into a dual item, which makes it + * impossible for the bot to single wield that weapon while they have dual. + * This is different to how the player's inventory works, where there are + * inventory items for both single and dual and the player can choose which one + * they want to use. + */ +void botinvGiveDualWeapon(struct chrdata *chr, u32 weaponnum) +{ + struct invitem *item = botinvGetItem(chr, weaponnum); + + if (item) { + item->type = INVITEMTYPE_DUAL; + } +} + +/** + * Return the pad number that the given weapon was collected from. + * + * Usually when you pick up two of the same weapon you get to dual wield, but + * this does not happen if the second weapon is from the same pad as the first + * (ie. is the first weapon respawned). + */ +s16 botinvGetWeaponPad(struct chrdata *chr, u32 weaponnum) +{ + struct invitem *item = botinvGetItem(chr, weaponnum); + + if (item && item->type == INVITEMTYPE_WEAP) { + return item->type_weap.pickuppad; + } + + return -1; +} + +/** + * Give a weapon to the bot, either by direct weapon or by ammo crate. + * + * This function does not give any ammo to the bot. + */ +bool botinvGiveProp(struct chrdata *chr, struct prop *prop) +{ + bool result = false; + struct defaultobj *obj; + s32 i; + + if (!chr || !chr->aibot) { + return false; + } + + obj = prop->obj; + + if (prop->type == PROPTYPE_WEAPON) { + if (obj->type == OBJTYPE_WEAPON) { + struct weaponobj *weapon = prop->weapon; + s32 weaponnum = weapon->weaponnum; + result = botinvGiveSingleWeapon(chr, weaponnum); + + if (result) { + struct invitem *item = botinvGetItem(chr, weaponnum); + item->type_weap.pickuppad = obj->pad; + } + } + } else if (obj->type == OBJTYPE_MULTIAMMOCRATE) { + struct multiammocrateobj *multi = (struct multiammocrateobj *)prop->obj; + + for (i = 0; i < 19; i++) { + if (multi->slots[i].quantity > 0) { + s32 weaponnum = botactGetWeaponByAmmoType(i + 1); + + if (weaponnum > 0) { + botinvGiveSingleWeapon(chr, weaponnum); + } + } + } + } + + return result; +} + +void botinv0f198060(u32 arg0) +{ + // empty +} + +/** + * Score all weapons in the match's weaponset by themselves and write them to + * the 3 array pointers, ordered by score1 descending. + */ +void botinvScoreAllWeapons(struct chrdata *chr, s32 *weaponnums, s32 *scores1, s32 *scores2) +{ + s32 i; + s32 pri1; + s32 pri2; + s32 sec1; + s32 sec2; + + // Gather scores for each weapon in the setup, + // taking the higher score out of both gun functions + for (i = 0; i < ARRAYCOUNT(g_MpSetup.weapons); i++) { + s32 weaponnum = g_MpWeapons[g_MpSetup.weapons[i]].weaponnum; + weaponnums[i] = weaponnum; + + botinvScoreWeaponByItself(chr, weaponnum, FUNC_PRIMARY, -1, false, &pri1, &pri2); + botinvScoreWeaponByItself(chr, weaponnum, FUNC_SECONDARY, -1, false, &sec1, &sec2); + + scores1[i] = pri1 >= sec1 ? pri1 : sec1; + scores2[i] = pri2 >= sec2 ? pri2 : sec2; + } + + // Sort all three arrays by score1 descending + for (i = 0; i < ARRAYCOUNT(g_MpSetup.weapons); i++) { + s32 swapindex = i; + s32 tmp; + s32 j; + + for (j = i + 1; j < ARRAYCOUNT(g_MpSetup.weapons); j++) { + if (scores1[j] > scores1[swapindex]) { + swapindex = j; + } + } + + if (swapindex != i) { + tmp = scores1[swapindex]; + scores1[swapindex] = scores1[i]; + scores1[i] = tmp; + + tmp = scores2[swapindex]; + scores2[swapindex] = scores2[i]; + scores2[i] = tmp; + + tmp = weaponnums[swapindex]; + weaponnums[swapindex] = weaponnums[i]; + weaponnums[i] = tmp; + } + } +} + +/** + * Return true if the match's weaponset contains a shield. + */ +bool mpHasShield(void) +{ + s32 i; + + for (i = 0; i < ARRAYCOUNT(g_MpSetup.weapons); i++) { + s32 weaponnum = g_MpWeapons[g_MpSetup.weapons[i]].weaponnum; + + if (weaponnum == WEAPON_MPSHIELD) { + return true; + } + } + + return false; +} + +/** + * Get the weapon slot (0 to 5) by weapon number. + */ +s32 mpGetWeaponSlotByWeaponNum(s32 weaponnum) +{ + s32 result = -1; + s32 i; + + for (i = 0; i < ARRAYCOUNT(g_MpSetup.weapons); i++) { + if (g_MpWeapons[g_MpSetup.weapons[i]].weaponnum == weaponnum && i < ARRAYCOUNT(g_MpSetup.weapons)) { + result = i; + break; + } + } + + return result; +} + +/** + * Calculate scores for the given weapon and function and write them to the + * dst1 and dst2 pointers. + * + * Weapon scoring is used to determine if a weapon is better than another, + * which affects whether the bot engages in combat or seeks a better weapon. + */ +void botinvScoreWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3, bool arg4, s32 *dst1, s32 *dst2, bool comparewithtarget, bool arg8) +{ + s32 score1 = 0; + s32 score2 = 0; + s32 extra = 0; + + // @dangerous: Array overflow can occur if more weapons are added to the + // game without extending the preferences table + if (arg3 < 0 + || (!funcnum && arg3 == g_AibotWeaponPreferences[weaponnum].unk04_00) + || (funcnum && arg3 == g_AibotWeaponPreferences[weaponnum].unk04_01)) { + if (arg4) { + score1 = g_AibotWeaponPreferences[weaponnum].unk02; + score2 = g_AibotWeaponPreferences[weaponnum].unk03; + } else { + score1 = g_AibotWeaponPreferences[weaponnum].unk00; + score2 = g_AibotWeaponPreferences[weaponnum].unk01; + } + + if (chr && chr->aibot) { + // Add weighting for explosive weapons for rocket sims + // and weighting for shields for shield sims, with extra + // weighting if the sim is meat or easy. + if (chr->aibot->config->difficulty == BOTDIFF_MEAT) { + extra = 100; + } else if (chr->aibot->config->difficulty == BOTDIFF_EASY) { + extra = 50; + } + + if (chr->aibot->config->type == BOTTYPE_ROCKET) { + if (weaponnum == WEAPON_ROCKETLAUNCHER) { + score1 = extra + 300; + } else if (weaponnum == WEAPON_SLAYER) { + score1 = extra + 299; + } else if (weaponnum == WEAPON_DEVASTATOR) { + score1 = extra + 280; + } else if (weaponnum == WEAPON_SUPERDRAGON && funcnum != FUNC_PRIMARY) { + score1 = extra + 279; + } else if (weaponnum == WEAPON_PHOENIX && funcnum != FUNC_PRIMARY) { + score1 = extra + 260; + } else if (weaponnum == WEAPON_GRENADE) { + score1 = extra + 240; + } + } else if (chr->aibot->config->type == BOTTYPE_SHIELD) { + if (weaponnum == WEAPON_MPSHIELD) { + score1 = extra + 300; + } + } + } + } + + // Missing from this list: + // Mauler, K7 Avenger, AR34, sniper rifle, Farsight, laser, grenade + switch (weaponnum) { + case WEAPON_UNARMED: + if (comparewithtarget && funcnum != FUNC_PRIMARY) { + if (chr->target != -1 + && botGetTargetsWeaponNum(chr) > WEAPON_UNARMED + && chr->aibot->config->difficulty > BOTDIFF_MEAT) { + score1 = 26; + score2 = 26; + } else { + score1 = 0; + score2 = 0; + } + } + break; + case WEAPON_FALCON2: + if (funcnum != FUNC_PRIMARY) { + score1 = 15; + score2 = 15; + } + break; + case WEAPON_FALCON2_SILENCER: + if (funcnum != FUNC_PRIMARY) { + score1 = 14; + score2 = 14; + } + break; + case WEAPON_FALCON2_SCOPE: + if (funcnum != FUNC_PRIMARY) { + score1 = 16; + score2 = 16; + } + break; + case WEAPON_MAGSEC4: + if (funcnum == FUNC_PRIMARY) { + score1 = arg4 ? 91 : 63; + } + break; + case WEAPON_PHOENIX: + if (chr->aibot->config->type != BOTDIFF_HARD) { + if (funcnum != FUNC_PRIMARY) { + if ((g_MpSetup.options & MPOPTION_ONEHITKILLS) + && chr->aibot->config->difficulty >= BOTDIFF_NORMAL) { + score1 = 110; + score2 = 150; + } + } else { + score1 = arg4 ? 90 : 62; + } + } + break; + case WEAPON_DY357MAGNUM: + if (funcnum != FUNC_PRIMARY) { + score1 = 17; + score2 = 17; + } + break; + case WEAPON_DY357LX: + if (funcnum != FUNC_PRIMARY) { + score1 = 18; + score2 = 18; + } + break; + case WEAPON_CYCLONE: + if (funcnum == (chr->aibot->rand % 2)) { + score1--; + } + break; + case WEAPON_CALLISTO: + if (funcnum == (chr->aibot->rand % 2)) { + score1--; + } + break; + case WEAPON_RCP120: + if (chr->aibot->cloakdeviceenabled == false + && botactGetAmmoQuantityByWeapon(chr->aibot, WEAPON_RCP120, FUNC_PRIMARY, true) > 500 + && chr->aibot->config->difficulty > BOTDIFF_MEAT) { + score1 += chr->aibot->rand % 10; + score2 += chr->aibot->rand % 10; + } + break; + case WEAPON_LAPTOPGUN: + if (funcnum != FUNC_PRIMARY) { + score1 = 0; + score2 = 0; + } + break; + case WEAPON_DRAGON: + if (funcnum != FUNC_PRIMARY) { + score1 = 0; + score2 = 0; + } + break; + case WEAPON_SUPERDRAGON: + if (chr->aibot->config->type != BOTDIFF_HARD + && (chr->aibot->rand % 2) == funcnum) { + score1 -= 15; + } + break; + case WEAPON_SHOTGUN: + if (funcnum == (chr->aibot->rand % 2)) { + score1--; + } + break; + case WEAPON_REAPER: + if (funcnum != FUNC_PRIMARY) { + score1 = 19; + score2 = 80; + } + break; + case WEAPON_DEVASTATOR: + if (funcnum != FUNC_PRIMARY) { + score1 = 0; + score2 = 0; + } + break; + case WEAPON_ROCKETLAUNCHER: + if (funcnum == (chr->aibot->rand % 2)) { + score1--; + } + break; + case WEAPON_SLAYER: + if (chr->aibot->config->type == BOTDIFF_HARD) { + if (funcnum != FUNC_PRIMARY) { + if (chr->aibot->config->difficulty > BOTDIFF_MEAT) { + if (comparewithtarget) { + if (chr->target != -1 + && chr->aibot->unk16c[mpPlayerGetIndex(chrGetTargetProp(chr)->chr)] == 0 + && (chr->aibot->rand % 2) == 0) { + score1 += 10; + } else { + score1 -= 10; + } + } + } else { + score1 = 0; + score2 = 0; + } + } + } else { + if (funcnum != FUNC_PRIMARY) { + if (chr->aibot->config->difficulty >= BOTDIFF_NORMAL) { + if (comparewithtarget) { + if (chr->target != -1 + && chr->aibot->unk16c[mpPlayerGetIndex(chrGetTargetProp(chr)->chr)] == 0 + && (chr->aibot->rand % 2) == 0) { + score1 = 178; + score2 = 188; + } else { + score1 -= 15; + score2 -= 15; + } + } + } else { + score1 = 0; + score2 = 0; + } + } + } + break; + case WEAPON_COMBATKNIFE: + if (funcnum != FUNC_PRIMARY) { + score1 = 0; + score2 = 0; + } + break; + case WEAPON_CROSSBOW: + if (funcnum != FUNC_PRIMARY) { + if (chr->aibot->config->difficulty > BOTDIFF_MEAT) { + score1 = 158; + score2 = 176; + } else { + score1 = 0; + score2 = 0; + } + } else { + if (comparewithtarget && chr->target != -1 && chrGetTargetProp(chr)->chr->blurdrugamount > PALDOWN(3500)) { + score1 = 0; + score2 = 0; + } else { + score1 = 49; + score2 = 188; + } + } + break; + case WEAPON_TRANQUILIZER: + if (comparewithtarget) { + s32 bluramount = 0; + + if (chr->target != -1) { + bluramount = chrGetTargetProp(chr)->chr->blurdrugamount; + } + + if (funcnum != FUNC_PRIMARY) { + if (chr->aibot->config->difficulty <= BOTDIFF_MEAT) { + score1 = 0; + score2 = 0; + } else if (bluramount > PALDOWN(3500) && (chr->aibot->rand % 2) == 0) { + score1 = chr->aibot->rand % 140 + 48; + score2 = 188; + } else if (chr->aibot->rand % 10 == 0) { + score1 = chr->aibot->rand % 140 + 48; + score2 = 188; + } else { + score1 = 0; + score2 = 0; + } + } else { + if (bluramount >= PALDOWN(5000)) { + score2 = 48; + + if (chr->aibot->rand % 2) { + score1 = 0; + score2 = 0; + } + } else if (bluramount > PALDOWN(3500)) { + u32 value = (-bluramount * 16 + (PAL ? 66656 : 80000)) / PALDOWN(1500); + + if (value > 15) { + value = 15; + } + + value *= value; + value *= value; + value *= value; + + if (value < chr->aibot->rand) { + score2 = 48; + + if (chr->aibot->rand % 2) { + score1 = 0; + score2 = 0; + } + } + } + } + } + break; + case WEAPON_NBOMB: + if (comparewithtarget && chr->target != -1) { + botGetTargetsWeaponNum(chr); + } + break; + } + + if (arg8) { + s32 weaponindex; + s32 extra = 0; + f32 float1; + f32 killrate = 1; + f32 float2; + + if (g_Vars.lvframe60 > 0) { + killrate = g_Vars.totalkills * PALDOWN(3600.0f) / (f32)(g_Vars.lvframe60 * g_MpNumChrs); + + if (killrate < 1) { + killrate = 1; + } + } + + weaponindex = mpGetWeaponSlotByWeaponNum(weaponnum); + + if (weaponindex >= 0) { + float2 = ceilf(chr->aibot->equipdurations60[weaponindex][funcnum] * (1.0f / PALDOWN(3600.0f))); + + if (float2 > 0) { + float1 = chr->aibot->killsbygunfunc[weaponindex][funcnum]; + + if (chr->aibot->config->difficulty >= BOTDIFF_NORMAL) { + float1 -= 3.0f * chr->aibot->suicidesbygunfunc[weaponindex][funcnum]; + } + + float1 = float1 / float2; + + extra = float1 * 10.0f / killrate; + } + + if (extra > 30) { + extra = 30; + } + + extra += chr->aibot->unk2a8[weaponindex]; + + score1 += extra; + score2 += extra; + + if (score1 < 0) { + score1 = 0; + } + + if (score2 < 0) { + score2 = 0; + } + } + } + + *dst1 = score1; + *dst2 = score2; +} + +void botinvScoreWeaponAgainstTarget(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3, bool arg4, s32 *dst1, s32 *dst2) +{ + botinvScoreWeapon(chr, weaponnum, funcnum, arg3, arg4, dst1, dst2, true, true); +} + +void botinvScoreWeaponByItself(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3, bool arg4, s32 *dst1, s32 *dst2) +{ + botinvScoreWeapon(chr, weaponnum, funcnum, arg3, arg4, dst1, dst2, false, true); +} + +/** + * Return the aibot's distance configuration index for the given weapon and + * function. + */ +s32 botinvGetDistConfig(s32 weaponnum, s32 funcnum) +{ + if (funcnum != FUNC_PRIMARY) { + return g_AibotWeaponPreferences[weaponnum].secdistconfig; + } + + return g_AibotWeaponPreferences[weaponnum].pridistconfig; +} + +/** + * Check if the bot's personality permits it to use the given weapon and + * function. + */ +bool botinvAllowsWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum) +{ + bool allow = true; + + if (chr->aibot->config->type == BOTTYPE_FIST) { + if (funcnum != FUNC_PRIMARY) { + if (g_AibotWeaponPreferences[weaponnum].secdistconfig != BOTDISTCFG_CLOSE) { + allow = false; + } + } else { + if (g_AibotWeaponPreferences[weaponnum].pridistconfig != BOTDISTCFG_CLOSE) { + allow = false; + } + } + } + + return allow; +} + +/** + * Tick the bot's inventory. + * + * The logic for deciding when to switch weapons is here. + */ +void botinvTick(struct chrdata *chr) +{ + s32 newweaponnum = WEAPON_UNARMED; + s32 newfuncnum = FUNC_PRIMARY; + s32 weaponindex; + struct aibot *aibot; + bool keepcurrentweapon = false; + s32 i; + + if (!chr || !chr->aibot) { + return; + } + + aibot = chr->aibot; + weaponindex = mpGetWeaponSlotByWeaponNum(aibot->weaponnum); + + if (weaponindex >= 0) { + aibot->equipdurations60[weaponindex][aibot->gunfunc] += g_Vars.lvupdate240_60; + } + + // Every 60-61 seconds, decrease suicide values. These values are used when + // determining which gun to use. The more suicides with a particular gun and + // function, the less likely the aibot is to use it. This value cools off. + aibot->dampensuicidesttl60 -= g_Vars.lvupdate240_60; + + if (aibot->dampensuicidesttl60 < 0) { + aibot->dampensuicidesttl60 = PALDOWN(3600) + random() % PALDOWN(60); + + for (i = 0; i < 6; i++) { + aibot->suicidesbygunfunc[i][0] *= 0.9f; + aibot->suicidesbygunfunc[i][1] *= 0.9f; + } + } + + // Every 10-60 seconds, generate new unk2a8 values + aibot->unk2a4 -= g_Vars.lvupdate240_60; + + if (aibot->unk2a4 < 0) { + aibot->unk2a4 = PALDOWN(600) + random() % PALDOWN(3000); + + for (i = 0; i < 6; i++) { + if (aibot->config->difficulty == BOTDIFF_MEAT) { + aibot->unk2a8[i] = random() % 200 - 100; // -100 to +100 + } else if (aibot->config->difficulty == BOTDIFF_EASY) { + aibot->unk2a8[i] = random() % 100 - 50; // -50 to +50 + } else { + aibot->unk2a8[i] = random() % 30 - 15; // -15 to +15 + } + } + } + + // Every 2-12 seconds, generate a new random value which is used as a factor + // in various aibot logic. + aibot->randttl60 -= g_Vars.lvupdate240_60; + + if (aibot->randttl60 < 0) { + aibot->randttl60 = PALDOWN(120) + random() % PALDOWN(600); + aibot->rand = random(); + } + + if (aibot->unk0c4[1] == 0 + && aibot->unk0c4[0] == 0 + && aibot->unk04d[1] <= 0 + && aibot->unk04d[0] <= 0 + && aibot->unk0e0[1] <= 0 + && aibot->unk0e0[0] <= 0 + && aibot->skrocket == NULL) { + if (chr->myaction == MA_AIBOTDOWNLOAD) { + keepcurrentweapon = true; + } + + if (!keepcurrentweapon && aibot->config->type == BOTTYPE_PEACE) { + newfuncnum = FUNC_SECONDARY; + keepcurrentweapon = true; + } + + if (!keepcurrentweapon) { + s32 bestscore = 0; + s32 score1; + s32 score2; + s32 canuse; + s32 j; + + for (i = -1; i < aibot->maxitems; i++) { + s32 weaponnum = -1; + struct invitem *item = NULL; + + if (i < 0) { + weaponnum = WEAPON_UNARMED; + } else { + item = &aibot->items[i]; + + if (item->type == INVITEMTYPE_WEAP || item->type == INVITEMTYPE_DUAL) { + weaponnum = item->type_weap.weapon1; + } + } + + if (weaponnum >= 0) { + for (j = 1; j >= 0; j--) { + if (j != FUNC_PRIMARY) { + canuse = g_AibotWeaponPreferences[weaponnum].unk04_01; + } else { + canuse = g_AibotWeaponPreferences[weaponnum].unk04_00; + } + + if (canuse && botinvAllowsWeapon(chr, weaponnum, j)) { + botinvScoreWeaponAgainstTarget(chr, weaponnum, j, 1, item && item->type == INVITEMTYPE_DUAL, &score1, &score2); + + if (score1 >= bestscore) { + if (!botactGetAmmoTypeByFunction(weaponnum, j) + || botactGetAmmoQuantityByWeapon(aibot, weaponnum, j, true) > 0) { + bestscore = score1; + newweaponnum = weaponnum; + newfuncnum = j; + } + } + } + } + } + } + } + + // Consider setting knives to secondary function (throw) + if (newweaponnum == WEAPON_COMBATKNIFE + && botactGetAmmoQuantityByWeapon(aibot, WEAPON_COMBATKNIFE, FUNC_SECONDARY, true) >= 2 + && chr->target != -1 + && chr->aibot->playerdistances[mpPlayerGetIndex(chrGetTargetProp(chr)->chr)] > 200 + && chr->aibot->playerdistances[mpPlayerGetIndex(chrGetTargetProp(chr)->chr)] < 1500) { + newfuncnum = FUNC_SECONDARY; + } + + // Consider setting Phoenix and SuperDragon to their explosive functions + if (aibot->config->type == BOTTYPE_ROCKET) { + if (newweaponnum == WEAPON_PHOENIX && botactGetAmmoQuantityByWeapon(aibot, WEAPON_PHOENIX, FUNC_SECONDARY, true) > 0) { + newfuncnum = FUNC_SECONDARY; + } else if (newweaponnum == WEAPON_SUPERDRAGON && botactGetAmmoQuantityByWeapon(aibot, WEAPON_SUPERDRAGON, FUNC_SECONDARY, true) > 0) { + newfuncnum = FUNC_SECONDARY; + } + } + + botinvSwitchToWeapon(chr, newweaponnum, newfuncnum); + } +} + +/** + * Equip the given weapon and switch to the given function. + * + * The weapon must already exist in the bot's inventory, + * otherwise unarmed will be equipped instead. + */ +bool botinvSwitchToWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum) +{ + struct invitem *item; + struct weaponfunc *func; + struct aibot *aibot; + s32 i; + s32 modelnum; + bool changinggun; + bool changingfunc; + + if (!chr || !chr->aibot) { + return false; + } + + aibot = chr->aibot; + + if (weaponnum == WEAPON_BRIEFCASE2) { + return true; + } + + // If changing to anything other than unarmed, make sure the aibot has the + // weapon in their inventory. Otherwise make them switch to unarmed. + if (weaponnum != WEAPON_UNARMED) { + item = botinvGetItem(chr, weaponnum); + + if (!item) { + weaponnum = WEAPON_UNARMED; + funcnum = FUNC_PRIMARY; + } + } + + changinggun = weaponnum != aibot->weaponnum; + changingfunc = funcnum != aibot->gunfunc; + + if (changinggun) { + aibot->unk0cc = PALDOWN(60); + + for (i = 0; i < 2; i++) { + aibot->unk0c4[i] = 0; + aibot->unk04d[i] = 0; + aibot->unk0e0[i] = 0; + + if (chr->weapons_held[i]) { + chr->weapons_held[i]->obj->hidden |= OBJHFLAG_REAPABLE; + chr->weapons_held[i] = NULL; + } + } + } + + // Return any loaded ammo to reserve + if (changingfunc || changinggun) { + for (i = 0; i < 2; i++) { + if (aibot->loadedammo[i] > 0) { + botactGiveAmmoByWeapon(aibot, aibot->weaponnum, aibot->gunfunc, aibot->loadedammo[i]); + aibot->loadedammo[i] = 0; + } + } + } + + // Assign new weapon and function + aibot->gunfunc = funcnum; + aibot->weaponnum = weaponnum; + + // Load ammo from reserve into new weapon + if (changingfunc && !changinggun) { + for (i = 0; i < 2; i++) { + if (chr->weapons_held[i]) { + botactReload(chr, i, false); + } + } + } + + if (!changinggun) { + modelnum = weaponGetModel(weaponnum); + + // @dangerous: item is uninitialised if weaponnum is WEAPON_UNARMED. + // This function assumes weaponGetModel returns a negative value for + // WEAPON_UNARMED which is a dangerous assumption to make, but correct. + if (modelnum >= 0 && item && item->type == INVITEMTYPE_DUAL && chr->weapons_held[HAND_LEFT] == NULL) { + chrGiveWeapon(chr, modelnum, weaponnum, OBJFLAG_WEAPON_LEFTHANDED); + botactReload(chr, HAND_LEFT, false); + } + } + + func = weaponGetFunctionById(weaponnum, funcnum); + + aibot->iscloserangeweapon = func && func->type == INVENTORYFUNCTYPE_CLOSE; + + for (i = 0; i < 2; i++) { + if (chr->weapons_held[i]) { + chr->weapons_held[i]->weapon->gunfunc = chr->aibot->gunfunc; + } + } + + return true; +} + +/** + * Drop one or all items. The item does not need to be the equipped item but it + * must exist in the bot's inventory. + * + * dropall is used when the bot is killed. + */ +void botinvDrop(struct chrdata *chr, s32 weaponnum, u8 dropall) +{ + s32 i; + + if (!chr || !chr->aibot) { + return; + } + + for (i = 0; i < chr->aibot->maxitems; i++) { + struct invitem *item = &chr->aibot->items[i]; + + if (item->type == -1) { + continue; + } + + if ((item->type == INVITEMTYPE_WEAP || item->type == INVITEMTYPE_DUAL) + && (dropall || weaponnum == item->type_weap.weapon1)) { + if (weaponHasFlag(item->type_weap.weapon1, WEAPONFLAG_08000000) == 0 + || (g_Vars.normmplayerisrunning + && g_MpSetup.scenario == MPSCENARIO_HACKERCENTRAL + && item->type_weap.weapon1 == WEAPON_DATAUPLINK)) { + s32 modelnum = weaponGetModel(item->type_weap.weapon1); + + if (modelnum > 0) { + struct prop *prop = weaponCreateForChr(chr, modelnum, item->type_weap.weapon1, OBJFLAG_WEAPON_AICANNOTUSE, NULL, NULL); + + if (prop) { + objSetDropped(prop, DROPTYPE_DEFAULT); + objDrop(prop, true); + + if (item->type_weap.weapon1 == WEAPON_BRIEFCASE2) { + func0f187288(chr, prop); + } + } + } + } + } + } + + if ((dropall && weaponnum >= WEAPON_FALCON2) + || (!dropall && weaponnum == chr->aibot->weaponnum)) { + botinvSwitchToWeapon(chr, WEAPON_UNARMED, FUNC_PRIMARY); + } + + chr->hidden |= CHRHFLAG_00000001; + + if (!dropall) { + botinvRemoveItem(chr, weaponnum); + } +} + +void botinvDropAll(struct chrdata *chr, u32 weaponnum) +{ + botinvDrop(chr, weaponnum, true); +} + +void botinvDropOne(struct chrdata *chr, u32 weaponnum) +{ + botinvDrop(chr, weaponnum, false); +} diff --git a/src/game/game_014e90.c b/src/game/botinvinit.c similarity index 51% rename from src/game/game_014e90.c rename to src/game/botinvinit.c index 742aca8f2..7fcef9787 100644 --- a/src/game/game_014e90.c +++ b/src/game/botinvinit.c @@ -1,20 +1,12 @@ #include -#include "constants.h" -#include "game/game_0147d0.h" -#include "game/chr/chr.h" -#include "game/game_02cde0.h" -#include "game/prop.h" -#include "game/game_197600.h" -#include "game/mplayer/mplayer.h" #include "bss.h" -#include "lib/memp.h" -#include "lib/model.h" -#include "lib/rng.h" -#include "lib/mtx.h" +#include "constants.h" #include "data.h" +#include "game/botinv.h" +#include "lib/memp.h" #include "types.h" -void aibotAllocateInventory(struct chrdata *chr, s32 maxitems) +void botinvInit(struct chrdata *chr, s32 maxitems) { if (chr && chr->aibot && maxitems > 0) { if (maxitems > 255) { @@ -24,6 +16,6 @@ void aibotAllocateInventory(struct chrdata *chr, s32 maxitems) chr->aibot->maxitems = maxitems; chr->aibot->items = mempAlloc(ALIGN16(maxitems * sizeof(struct invitem)), MEMPOOL_STAGE); - aibotClearInventory(chr); + botinvClear(chr); } } diff --git a/src/game/botmgr.c b/src/game/botmgr.c new file mode 100644 index 000000000..ed7b4f75c --- /dev/null +++ b/src/game/botmgr.c @@ -0,0 +1,278 @@ +#include +#include "constants.h" +#include "game/game_0147d0.h" +#include "game/chr/chr.h" +#include "game/game_02cde0.h" +#include "game/prop.h" +#include "game/botcmd.h" +#include "game/mplayer/mplayer.h" +#include "bss.h" +#include "lib/memp.h" +#include "lib/model.h" +#include "lib/rng.h" +#include "lib/ailist.h" +#include "data.h" +#include "types.h" + +void botmgrRemoveAll(void) +{ + s32 i; + + for (i = 0; i < 8; i++) { + g_MpBotChrPtrs[i] = NULL; + } + + g_BotCount = 0; +} + +void botmgrAllocateBot(s32 chrnum, s32 aibotnum) +{ + s16 rooms[1]; + struct prop *prop; + struct chrdata *chr; + struct aibot *aibot; + struct model *model; + s32 i; + s32 bodynum; + s32 headnum; + + rooms[0] = -1; + + headnum = mpGetHeadId(g_BotConfigsArray[aibotnum].base.mpheadnum); + bodynum = mpGetBodyId(g_BotConfigsArray[aibotnum].base.mpbodynum); + + if (IS4MB()) { + headnum = HEAD_DDSHOCK; + bodynum = BODY_DDSHOCK; + } + + model = modelAllocateChr(bodynum, headnum, 0); + + if (model != NULL) { + struct coord pos = {0.0f, 0.0f, 0.0f}; + u32 stack; + + prop = chrAllocate(model, &pos, rooms, 0.0f, ailistFindById(GAILIST_AIBOT_INIT)); + + if (prop != NULL) { + propActivate(prop); + propEnable(prop); + + chr = prop->chr; + + chrSetChrnum(chr, chrnum); + + chr->chrnum = chrnum; + chr->padpreset1 = -1; + chr->chrpreset1 = -1; + chr->hearingscale = 1; + chr->visionrange = 80; + chr->headnum = headnum; + chr->bodynum = bodynum; + chr->race = bodyGetRace(chr->bodynum); + chr->flags = CHRFLAG0_CAN_EXAMINE_BODY; // reused flag? + chr->flags2 = 0; + chr->team = 1 << g_BotConfigsArray[aibotnum].base.team; + chr->squadron = 0; + + if (g_BotCount < 8) { + g_MpBotChrPtrs[g_BotCount] = chr; + g_BotCount++; + + aibot = mempAlloc(sizeof(struct aibot), MEMPOOL_STAGE); + chr->aibot = aibot; + + if (aibot != NULL) { + chr->tude = 0; + chr->voicebox = random() % 3; + + if (g_HeadsAndBodies[chr->bodynum].ismale == false) { + chr->voicebox = VOICEBOX_FEMALE; + } + + chr->target = -1; + chr->naturalanim = 0; + chr->myspecial = -1; + chr->yvisang = 0; + chr->teamscandist = 0; + chr->convtalk = 0; + chr->myaction = MA_AIBOTMAINLOOP; + + g_MpAllChrPtrs[g_MpNumChrs] = chr; + g_MpAllChrConfigPtrs[g_MpNumChrs] = &g_BotConfigsArray[aibotnum].base; + g_MpNumChrs++; + + aibot->ammoheld = mempAlloc(36 * sizeof(s32), MEMPOOL_STAGE); + + for (i = 0; i < 33; i++) { + aibot->ammoheld[i] = 0; + } + + aibot->config = &g_BotConfigsArray[aibotnum]; + + switch (g_BotConfigsArray[aibotnum].difficulty) { + case BOTDIFF_MEAT: + aibot->unk000 = 0; + break; + case BOTDIFF_EASY: + aibot->unk000 = 10; + break; + default: + case BOTDIFF_NORMAL: + aibot->unk000 = 20; + break; + case BOTDIFF_HARD: + aibot->unk000 = 40; + break; + case BOTDIFF_PERFECT: + aibot->unk000 = 60; + break; + case BOTDIFF_DARK: + aibot->unk000 = 0; + break; + } + + aibot->aibotnum = aibotnum; + aibot->unk064 = 0; + aibot->fetchprop = NULL; + aibot->unk02c[0] = 0; + aibot->unk02c[1] = 0; + aibot->unk034 = 0; + aibot->unk040 = 0.0f; + aibot->loadedammo[0] = 0; + aibot->loadedammo[1] = 0; + aibot->unk058 = 0; + aibot->unk059 = 0; + aibot->unk05c = 0; + aibot->unk060 = 0; +#if !PAL + aibot->unk030 = 301; +#endif + aibot->unk038 = 0; + aibot->unk03e = -1; + aibot->unk03c = 0; + aibot->attackingplayernum = -1; + aibot->followingplayernum = -1; + aibot->dangerouspropnum = -1; + aibot->unk068 = 0; + aibot->unk06c = 0.0f; + aibot->unk070 = 0.0f; + aibot->distmode = -1; + aibot->lastkilledbyplayernum = -1; + aibot->unk114 = -1; + aibot->command = AIBOTCMD_NORMAL; + aibot->unk098 = 0.0f; + + aibot->defendholdpos.x = pos.x; + aibot->defendholdpos.y = pos.y; + aibot->defendholdpos.z = pos.z; + + aibot->weaponnum = WEAPON_UNARMED; + + aibot->unk04d[0] = 0; + aibot->unk04d[1] = 0; + aibot->skrocket = NULL; + aibot->unk0a0 = 0; + + aibot->gunfunc = 0; + aibot->iscloserangeweapon = true; + aibot->teamisonlyai = 0; + aibot->unk09c_00 = 0; + aibot->unk09c_01 = 0; + aibot->cloakdeviceenabled = false; + aibot->rcp120cloakenabled = false; + aibot->unk04c_04 = 0; + aibot->unk04c_03 = 0; + aibot->unk04c_05 = 0; + aibot->unk04c_00 = 0; + + aibot->unk048 = -1; + aibot->unk04a = -1; + + aibot->unk0bc = -1; + aibot->unk0c4[HAND_LEFT] = 0; + aibot->unk0c4[HAND_RIGHT] = 0; + aibot->unk0cc = 0; + aibot->distmodettl60 = 0; + aibot->unk0d8 = 0; + aibot->unk0dc = 0; + aibot->unk0e0[HAND_LEFT] = 0; + aibot->unk0e0[HAND_RIGHT] = 0; + aibot->maulercharge[HAND_LEFT] = 0.0f; + aibot->maulercharge[HAND_RIGHT] = 0.0f; + aibot->unk0a4 = model0001ae44(chr->model); + aibot->angleoffset = 0.0f; + aibot->speedtheta = 0.0f; + aibot->unk0b0 = model0001ae44(chr->model); + + aibot->unk0b4 = 0.0f; + aibot->unk0b8 = 0.0f; + aibot->shotspeed.x = 0.0f; + aibot->shotspeed.y = 0.0f; + aibot->shotspeed.z = 0.0f; + aibot->unk118 = 0; + aibot->unk11c = 0; + aibot->unk120 = -1; + aibot->unk124 = -1; + aibot->unk128 = 0; + aibot->unk12c = 0; + + for (i = 0; i < 12; i++) { + aibot->unk130[i] = -1; + aibot->playerdistances[i] = U32_MAX; + aibot->unk16c[i] = 0; + aibot->unk178[i] = -1; + aibot->unk1a8[i] = -1; + } + + aibot->unk1c0 = 0.0f; + aibot->unk1c4 = 0.0f; + aibot->unk1c8 = 0.0f; + aibot->unk1cc = -1; + aibot->unk1d0 = 0; + aibot->unk1d4 = 0.0f; + aibot->unk1e4 = -1; + aibot->unk1e8 = 0; + aibot->unk208 = 0; + aibot->rand = random(); + aibot->randttl60 = 0; + + for (i = 0; i < 6; i++) { + aibot->killsbygunfunc[i][0] = 0.0f; + aibot->killsbygunfunc[i][1] = 0.0f; + + aibot->suicidesbygunfunc[i][0] = 0.0f; + aibot->suicidesbygunfunc[i][1] = 0.0f; + + aibot->equipdurations60[i][0] = 0; + aibot->equipdurations60[i][1] = 0; + + aibot->unk2a8[i] = 0; + } + + aibot->unk2a4 = 0; + aibot->dampensuicidesttl60 = 0; + aibot->unk2c4 = 0.0f; + aibot->unk2c8 = 0; + + aibot->unk09c_03 = 0; + + aibot->unk2cc = 0; + aibot->unk2d0 = random(); + aibot->unk2d4 = random() * (1.0f / U32_MAX); + aibot->cheap = false; +#if VERSION >= VERSION_NTSC_1_0 + aibot->unk078 = 0; + aibot->unk050 = 0; + aibot->unk09d = 0; +#endif + } else { + g_MpBotChrPtrs[--g_BotCount] = NULL; + return; + } + + botinvInit(chr, 10); + } + } + } +} diff --git a/src/game/chr/chr.c b/src/game/chr/chr.c index 101ed366b..fb27de925 100644 --- a/src/game/chr/chr.c +++ b/src/game/chr/chr.c @@ -29,8 +29,8 @@ #include "game/game_165670.h" #include "game/file.h" #include "game/mplayer/setup.h" -#include "game/game_190260.h" -#include "game/game_1999b0.h" +#include "game/bot.h" +#include "game/botact.h" #include "game/mplayer/mplayer.h" #include "game/pad.h" #include "game/propobj.h" @@ -791,7 +791,7 @@ glabel var7f1a992cpf .PF0f01f6f0: /* f01f6f0: 8fa700dc */ lw $a3,0xdc($sp) .PF0f01f6f4: -/* f01f6f4: 0fc64cac */ jal func0f1921f8 +/* f01f6f4: 0fc64cac */ jal bot0f1921f8 /* f01f6f8: e7ac00e0 */ swc1 $f12,0xe0($sp) /* f01f6fc: 3c08800a */ lui $t0,0x800a /* f01f700: 44808000 */ mtc1 $zero,$f16 @@ -2059,7 +2059,7 @@ glabel var7f1a8720 .L0f01f5c0: /* f01f5c0: 8fa700dc */ lw $a3,0xdc($sp) .L0f01f5c4: -/* f01f5c4: 0fc6487e */ jal func0f1921f8 +/* f01f5c4: 0fc6487e */ jal bot0f1921f8 /* f01f5c8: e7ac00e0 */ swc1 $f12,0xe0($sp) /* f01f5cc: 3c08800a */ lui $t0,%hi(g_Vars) /* f01f5d0: 44809000 */ mtc1 $zero,$f18 @@ -3286,7 +3286,7 @@ glabel var7f1a8720 /* f01f2e4: 8d2b0004 */ lw $t3,0x4($t1) /* f01f2e8: 1b200005 */ blez $t9,.NB0f01f300 /* f01f2ec: acab0004 */ sw $t3,0x4($a1) -/* f01f2f0: 0fc630b7 */ jal func0f1921f8 +/* f01f2f0: 0fc630b7 */ jal bot0f1921f8 /* f01f2f4: 02002025 */ or $a0,$s0,$zero /* f01f2f8: 44809000 */ mtc1 $zero,$f18 /* f01f2fc: 00000000 */ sll $zero,$zero,0x0 @@ -6716,8 +6716,8 @@ void chrUncloak(struct chrdata *chr, bool value) #if PIRACYCHECKS { u32 checksum = 0; - u32 *i = (u32 *)&propobjHandlePickupByAibot; - u32 *end = (u32 *)&func0f190be4; + u32 *i = (u32 *)&botPickupProp; + u32 *end = (u32 *)&botTestPropForPickup; while (i < end) { checksum += ~*i; @@ -6776,7 +6776,7 @@ void chrUpdateCloak(struct chrdata *chr) } else if (chr->aibot->rcp120cloakenabled) { if (chr->aibot->weaponnum == WEAPON_RCP120 && !chrIsDead(chr) - && aibotGetAmmoQuantityByWeapon(chr->aibot, WEAPON_RCP120, 0, 1) > 0) { + && botactGetAmmoQuantityByWeapon(chr->aibot, WEAPON_RCP120, 0, 1) > 0) { if (chr->hidden & CHRHFLAG_CLOAKED) { chr->aibot->unk2c4 += (PAL ? g_Vars.lvupdate240freal : g_Vars.lvupdate240f) * 0.4f; @@ -6791,7 +6791,7 @@ void chrUpdateCloak(struct chrdata *chr) chr->aibot->loadedammo[0] = 0; } } else { - ammotype = weaponGetAmmoTypeByFunction(WEAPON_RCP120, 0); + ammotype = botactGetAmmoTypeByFunction(WEAPON_RCP120, 0); if (chr->aibot->ammoheld[ammotype] > 0) { chr->aibot->ammoheld[ammotype] -= qty; diff --git a/src/game/chr/chraction.c b/src/game/chr/chraction.c index aa0fcea1b..0abc593e9 100644 --- a/src/game/chr/chraction.c +++ b/src/game/chr/chraction.c @@ -30,9 +30,10 @@ #include "game/game_165670.h" #include "game/game_1657c0.h" #include "game/lv.h" -#include "game/game_190260.h" -#include "game/game_197600.h" -#include "game/game_1999b0.h" +#include "game/bot.h" +#include "game/botact.h" +#include "game/botcmd.h" +#include "game/botinv.h" #include "game/mplayer/mplayer.h" #include "game/pad.h" #include "game/padhalllv.h" @@ -4526,7 +4527,7 @@ void chrDamage(struct chrdata *chr, f32 damage, struct coord *vector, struct gse if (damageshield) { shield = chrGetShield(chr); - if (chr->aibot && chr->aibot->simulant->base.simtype == SIMTYPE_TURTLE) { + if (chr->aibot && chr->aibot->config->type == BOTTYPE_TURTLE) { armourscale = 4; } @@ -4534,9 +4535,9 @@ void chrDamage(struct chrdata *chr, f32 damage, struct coord *vector, struct gse if (g_Vars.normmplayerisrunning) { #if VERSION >= VERSION_PAL_FINAL // Fixing a @bug? - damage = damage * mpHandicapToDamageScale(g_MpPlayers[g_Vars.currentplayerstats->mpindex].handicap); + damage = damage * mpHandicapToDamageScale(g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].handicap); #else - damage /= mpHandicapToDamageScale(g_MpPlayers[g_Vars.currentplayerstats->mpindex].handicap); + damage /= mpHandicapToDamageScale(g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].handicap); #endif } @@ -4741,7 +4742,7 @@ void chrDamage(struct chrdata *chr, f32 damage, struct coord *vector, struct gse setCurrentPlayerNum(propGetPlayerNum(vprop)); if (g_Vars.normmplayerisrunning) { - damage /= mpHandicapToDamageScale(g_MpPlayers[g_Vars.currentplayerstats->mpindex].handicap); + damage /= mpHandicapToDamageScale(g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].handicap); } if (g_Vars.currentplayer->isdead == false && !g_PlayerInvincible) { @@ -4854,7 +4855,7 @@ void chrDamage(struct chrdata *chr, f32 damage, struct coord *vector, struct gse if (gsetHasFunctionFlags(gset, FUNCFLAG_DROPWEAPON) && ((chr->flags & CHRFLAG0_CANLOSEGUN) || chr->aibot)) { if (chr->aibot) { - aibotLoseGun(chr, aprop); + botLoseGun(chr, aprop); } else { weapon = chrGetHeldProp(chr, HAND_RIGHT); @@ -5102,7 +5103,7 @@ void chrDie(struct chrdata *chr, s32 aplayernum) chr->aioffset = 0; mpstatsRecordDeath(aplayernum, mpPlayerGetIndex(chr)); - func0f199964(chr, chr->aibot->weaponnum); + botinvDropAll(chr, chr->aibot->weaponnum); #if VERSION >= VERSION_NTSC_1_0 chr->aibot->unk09c_00 = 0; @@ -5417,7 +5418,7 @@ f32 func0f0370a8(struct chrdata *chr) f32 result; if (chr->aibot) { - result = aibotCalculateMaxSpeed(chr); + result = botCalculateMaxSpeed(chr); } else { s16 animnum = modelGetAnimNum(chr->model); result = func0f02dff0(animnum) * (chr->model->scale * 9.999999f); @@ -5485,7 +5486,7 @@ void chrGoPosConsiderRestart(struct chrdata *chr) chr->act_gopos.restartttl = value; } else if (chr->act_gopos.restartttl <= (u16)g_Vars.lvupdate240_60) { if (chr->aibot) { - func0f197544(chr); + botCheckFetch(chr); } else { chrGoToPos(chr, &chr->act_gopos.endpos, chr->act_gopos.endrooms, chr->act_gopos.flags); } @@ -6728,7 +6729,7 @@ bool chrCanSeeChr(struct chrdata *chr, struct chrdata *target, s16 *room) u32 stack; s16 sp88[] = {-1, 0, 0, 0, 0, 0, 0, 0}; - if (func0f19294c(chr, target) == 0) { + if (bot0f19294c(chr, target) == 0) { struct prop *prop = chr->prop; struct coord pos; s16 rooms[8]; @@ -8433,7 +8434,7 @@ void chrTickDead(struct chrdata *chr) chr->fadealpha = 0; if (aibot) { - mpInitSimulant(chr, true); + botSpawn(chr, true); } else { chr->hidden |= CHRHFLAG_REAPED; } @@ -11230,7 +11231,7 @@ glabel var7f1a9184 /* f040b38: 46060282 */ mul.s $f10,$f0,$f6 /* f040b3c: 11800019 */ beqz $t4,.PF0f040ba4 /* f040b40: e7aa01e8 */ swc1 $f10,0x1e8($sp) -/* f040b44: 0fc6492c */ jal chrGuessCrouchPos +/* f040b44: 0fc6492c */ jal botGuessCrouchPos /* f040b48: 8fa40278 */ lw $a0,0x278($sp) /* f040b4c: 8fb90278 */ lw $t9,0x278($sp) /* f040b50: 00404825 */ move $t1,$v0 @@ -11272,7 +11273,7 @@ glabel var7f1a9184 /* f040bd4: 00002825 */ move $a1,$zero /* f040bd8: afae0250 */ sw $t6,0x250($sp) /* f040bdc: 27a601e0 */ addiu $a2,$sp,0x1e0 -/* f040be0: 0fc66c21 */ jal aibotShootFarsightThroughWalls +/* f040be0: 0fc66c21 */ jal botactShootFarsight /* f040be4: 27a70244 */ addiu $a3,$sp,0x244 /* f040be8: 24010002 */ li $at,0x2 /* f040bec: 5441000a */ bnel $v0,$at,.PF0f040c18 @@ -12828,7 +12829,7 @@ glabel var7f1a9184 /* f0409b4: 46060282 */ mul.s $f10,$f0,$f6 /* f0409b8: 11800019 */ beqz $t4,.L0f040a20 /* f0409bc: e7aa01e8 */ swc1 $f10,0x1e8($sp) -/* f0409c0: 0fc644fe */ jal chrGuessCrouchPos +/* f0409c0: 0fc644fe */ jal botGuessCrouchPos /* f0409c4: 8fa40278 */ lw $a0,0x278($sp) /* f0409c8: 8fb90278 */ lw $t9,0x278($sp) /* f0409cc: 00404825 */ or $t1,$v0,$zero @@ -12870,7 +12871,7 @@ glabel var7f1a9184 /* f040a50: 00002825 */ or $a1,$zero,$zero /* f040a54: afae0250 */ sw $t6,0x250($sp) /* f040a58: 27a601e0 */ addiu $a2,$sp,0x1e0 -/* f040a5c: 0fc667e1 */ jal aibotShootFarsightThroughWalls +/* f040a5c: 0fc667e1 */ jal botactShootFarsight /* f040a60: 27a70244 */ addiu $a3,$sp,0x244 /* f040a64: 24010002 */ addiu $at,$zero,0x2 /* f040a68: 5441000a */ bnel $v0,$at,.L0f040a94 @@ -14418,7 +14419,7 @@ glabel var7f1a9184 /* f040194: 46060282 */ mul.s $f10,$f0,$f6 /* f040198: 11800019 */ beqz $t4,.NB0f040200 /* f04019c: e7aa01e8 */ swc1 $f10,0x1e8($sp) -/* f0401a0: 0fc62d37 */ jal chrGuessCrouchPos +/* f0401a0: 0fc62d37 */ jal botGuessCrouchPos /* f0401a4: 8fa40278 */ lw $a0,0x278($sp) /* f0401a8: 8fb90278 */ lw $t9,0x278($sp) /* f0401ac: 00404825 */ or $t1,$v0,$zero @@ -14460,7 +14461,7 @@ glabel var7f1a9184 /* f040230: 00002825 */ or $a1,$zero,$zero /* f040234: afae0250 */ sw $t6,0x250($sp) /* f040238: 27a601e0 */ addiu $a2,$sp,0x1e0 -/* f04023c: 0fc64fd9 */ jal aibotShootFarsightThroughWalls +/* f04023c: 0fc64fd9 */ jal botactShootFarsight /* f040240: 27a70244 */ addiu $a3,$sp,0x244 /* f040244: 24010002 */ addiu $at,$zero,0x2 /* f040248: 5441000a */ bnel $v0,$at,.NB0f040274 @@ -15575,7 +15576,7 @@ glabel var7f1a9184 * takes care of the gun's fire rate. */ // Mismatches: -// - near aibotShootFarsightThroughWalls, chr needs to be loaded into t3 which +// - near botactShootFarsight, chr needs to be loaded into t3 which // should solve instruction ordering. // - Float calculations near 65536 have diffent codegen // - Calculation of sp168 and spcc have reordered instructions @@ -15730,7 +15731,7 @@ glabel var7f1a9184 // vector.f[2] = cosf(sp200) * cosf(aimangle); // // if (isaibot) { -// bgun0f0a0fac(&vector, chr->aibot->weaponnum, chr->aibot->gunfunc, chr->aibot->unk04d[handnum], chrGuessCrouchPos(chr), chr->weapons_held[0] && chr->weapons_held[1]); +// bgun0f0a0fac(&vector, chr->aibot->weaponnum, chr->aibot->gunfunc, chr->aibot->unk04d[handnum], botGuessCrouchPos(chr), chr->weapons_held[0] && chr->weapons_held[1]); // } // } // @@ -15740,7 +15741,7 @@ glabel var7f1a9184 // makebeam = true; // // // This function can never return 2 though... -// if (aibotShootFarsightThroughWalls(chr, 0, &vector, &gunpos) == 2) { +// if (botactShootFarsight(chr, 0, &vector, &gunpos) == 2) { // normalshoot = random() % 255 > 200; // } // } @@ -25246,7 +25247,7 @@ Gfx *chrsRenderChrStats(Gfx *gdl, s16 *rooms) if (chr->aibot) { if (g_MpSetup.options & MPOPTION_TEAMSENABLED) { aibot = 1; - sprintf(aibotbuffer, "\nTEAM %d: Cmd: %s", chr->team, mpGetBotCommandName(chr->aibot->command)); + sprintf(aibotbuffer, "\nTEAM %d: Cmd: %s", chr->team, botGetCommandName(chr->aibot->command)); } } diff --git a/src/game/filemgr.c b/src/game/filemgr.c index 5cac2e77c..24dbe0cec 100644 --- a/src/game/filemgr.c +++ b/src/game/filemgr.c @@ -1143,8 +1143,8 @@ void filemgrDeleteCurrentFile(void) } else { // If deleting a loaded MP player, reset them to default for (i = 0; i < 4; i++) { - if (g_FilemgrFileToDelete.fileid == g_MpPlayers[i].fileguid.fileid - && g_FilemgrFileToDelete.deviceserial == g_MpPlayers[i].fileguid.deviceserial) { + if (g_FilemgrFileToDelete.fileid == g_PlayerConfigsArray[i].fileguid.fileid + && g_FilemgrFileToDelete.deviceserial == g_PlayerConfigsArray[i].fileguid.deviceserial) { mpPlayerSetDefaults(i, true); } } @@ -1331,9 +1331,9 @@ void filemgrGetRenameName(char *buffer) i = 0; j = 0; - while (g_MpPlayers[g_MpPlayerNum].base.name[i] != '\0') { - if (g_MpPlayers[g_MpPlayerNum].base.name[i] != '\n') { - buffer[j] = g_MpPlayers[g_MpPlayerNum].base.name[i]; + while (g_PlayerConfigsArray[g_MpPlayerNum].base.name[i] != '\0') { + if (g_PlayerConfigsArray[g_MpPlayerNum].base.name[i] != '\n') { + buffer[j] = g_PlayerConfigsArray[g_MpPlayerNum].base.name[i]; j++; } @@ -1371,7 +1371,7 @@ void filemgrSetRenameName(char *name) break; case 6: case 12: - sprintf(g_MpPlayers[g_MpPlayerNum].base.name, "%s\n", name); + sprintf(g_PlayerConfigsArray[g_MpPlayerNum].base.name, "%s\n", name); break; case 7: case 13: @@ -2060,8 +2060,8 @@ bool filemgrIsFileInUse(struct filelistfile *file) for (i = 0; i < 4; i++) { if ((g_MpSetup.chrslots & (1 << i)) - && g_MpPlayers[i].fileguid.fileid == file->fileid - && g_MpPlayers[i].fileguid.deviceserial == file->deviceserial) { + && g_PlayerConfigsArray[i].fileguid.fileid == file->fileid + && g_PlayerConfigsArray[i].fileguid.deviceserial == file->deviceserial) { return true; } } @@ -2885,8 +2885,8 @@ s32 filemgrMainMenuDialog(s32 operation, struct menudialog *dialog, union handle // Set MP player names to "Player 1" through 4 if blank for (i = 0; i < 4; i++) { - if (g_MpPlayers[i].base.name[0] == '\0') { - sprintf(g_MpPlayers[i].base.name, "%s %d\n", langGet(L_MISC_437), i + 1); + if (g_PlayerConfigsArray[i].base.name[0] == '\0') { + sprintf(g_PlayerConfigsArray[i].base.name, "%s %d\n", langGet(L_MISC_437), i + 1); } } break; diff --git a/src/game/game_00c490.c b/src/game/game_00c490.c index 9e4462641..91c2e0df8 100644 --- a/src/game/game_00c490.c +++ b/src/game/game_00c490.c @@ -2935,7 +2935,7 @@ void setupParseObjects(s32 stagenum) } } - mpRemoveAllSimulants(); + botmgrRemoveAll(); index = 0; obj = (struct defaultobj *)g_StageSetup.props; @@ -3471,7 +3471,7 @@ void setupParseObjects(s32 stagenum) if ((g_MpSetup.chrslots & (1 << (slotnum + 4))) && mpIsSimSlotEnabled(slotnum)) { - aibotAllocate(chrnum, slotnum); + botmgrAllocateBot(chrnum, slotnum); chrnum++; } diff --git a/src/game/game_011110.c b/src/game/game_011110.c index 8419b71ce..75c62835d 100644 --- a/src/game/game_011110.c +++ b/src/game/game_011110.c @@ -1829,7 +1829,7 @@ glabel var7f1a827c /* f01204c: 8e2f0284 */ lw $t7,0x284($s1) /* f012050: 8e2e0288 */ lw $t6,0x288($s1) /* f012054: 8e2d0284 */ lw $t5,0x284($s1) -/* f012058: 3c09800b */ lui $t1,%hi(g_MpPlayers+0x11) +/* f012058: 3c09800b */ lui $t1,%hi(g_PlayerConfigsArray+0x11) /* f01205c: 8dcf0070 */ lw $t7,0x70($t6) /* f012060: 8dac00bc */ lw $t4,0xbc($t5) /* f012064: 240b0001 */ addiu $t3,$zero,0x1 @@ -1837,7 +1837,7 @@ glabel var7f1a827c /* f01206c: 014f5021 */ addu $t2,$t2,$t7 /* f012070: 000a5140 */ sll $t2,$t2,0x5 /* f012074: 012a4821 */ addu $t1,$t1,$t2 -/* f012078: 9129c7c9 */ lbu $t1,%lo(g_MpPlayers+0x11)($t1) +/* f012078: 9129c7c9 */ lbu $t1,%lo(g_PlayerConfigsArray+0x11)($t1) /* f01207c: 8d990004 */ lw $t9,0x4($t4) /* f012080: 012bc004 */ sllv $t8,$t3,$t1 /* f012084: 10000006 */ b .L0f0120a0 @@ -3178,7 +3178,7 @@ glabel var7f1a827c // } // } else { // if (g_Vars.mplayerisrunning) { -// g_Vars.currentplayer->prop->chr->team = 1 << g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.team; +// g_Vars.currentplayer->prop->chr->team = 1 << g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].base.team; // } else { // g_Vars.currentplayer->prop->chr->team = TEAM_ALLY; // } diff --git a/src/game/game_0147d0.c b/src/game/game_0147d0.c index 198aedd1b..634ff0a8d 100644 --- a/src/game/game_0147d0.c +++ b/src/game/game_0147d0.c @@ -4,7 +4,7 @@ #include "game/chr/chr.h" #include "game/game_02cde0.h" #include "game/prop.h" -#include "game/game_197600.h" +#include "game/botcmd.h" #include "game/mplayer/mplayer.h" #include "bss.h" #include "lib/memp.h" @@ -31,266 +31,3 @@ void lasersightsReset(void) g_LaserSights[i].id = -1; } } - -void mpRemoveAllSimulants(void) -{ - s32 i; - - for (i = 0; i < 8; i++) { - g_MpSimulantChrs[i] = NULL; - } - - g_NumMpSimulantChrs = 0; -} - -void aibotAllocate(s32 chrnum, s32 aibotnum) -{ - s16 rooms[1]; - struct prop *prop; - struct chrdata *chr; - struct aibot *aibot; - struct model *model; - s32 i; - s32 bodynum; - s32 headnum; - - rooms[0] = -1; - - headnum = mpGetHeadId(g_MpSimulants[aibotnum].base.mpheadnum); - bodynum = mpGetBodyId(g_MpSimulants[aibotnum].base.mpbodynum); - - if (IS4MB()) { - headnum = HEAD_DDSHOCK; - bodynum = BODY_DDSHOCK; - } - - model = modelAllocateChr(bodynum, headnum, 0); - - if (model != NULL) { - struct coord pos = {0.0f, 0.0f, 0.0f}; - u32 stack; - - prop = chrAllocate(model, &pos, rooms, 0.0f, ailistFindById(GAILIST_AIBOT_INIT)); - - if (prop != NULL) { - propActivate(prop); - propEnable(prop); - - chr = prop->chr; - - chrSetChrnum(chr, chrnum); - - chr->chrnum = chrnum; - chr->padpreset1 = -1; - chr->chrpreset1 = -1; - chr->hearingscale = 1; - chr->visionrange = 80; - chr->headnum = headnum; - chr->bodynum = bodynum; - chr->race = bodyGetRace(chr->bodynum); - chr->flags = CHRFLAG0_CAN_EXAMINE_BODY; // reused flag? - chr->flags2 = 0; - chr->team = 1 << g_MpSimulants[aibotnum].base.team; - chr->squadron = 0; - - if (g_NumMpSimulantChrs < 8) { - g_MpSimulantChrs[g_NumMpSimulantChrs] = chr; - g_NumMpSimulantChrs++; - - aibot = mempAlloc(sizeof(struct aibot), MEMPOOL_STAGE); - chr->aibot = aibot; - - if (aibot != NULL) { - chr->tude = 0; - chr->voicebox = random() % 3; - - if (g_HeadsAndBodies[chr->bodynum].ismale == false) { - chr->voicebox = VOICEBOX_FEMALE; - } - - chr->target = -1; - chr->naturalanim = 0; - chr->myspecial = -1; - chr->yvisang = 0; - chr->teamscandist = 0; - chr->convtalk = 0; - chr->myaction = MA_AIBOTMAINLOOP; - - g_MpPlayerChrs[g_MpNumPlayers] = chr; - var800ac500[g_MpNumPlayers] = &g_MpSimulants[aibotnum].base; - g_MpNumPlayers++; - - aibot->ammoheld = mempAlloc(36 * sizeof(s32), MEMPOOL_STAGE); - - for (i = 0; i < 33; i++) { - aibot->ammoheld[i] = 0; - } - - aibot->simulant = &g_MpSimulants[aibotnum]; - - switch (g_MpSimulants[aibotnum].difficulty) { - case SIMDIFF_MEAT: - aibot->unk000 = 0; - break; - case SIMDIFF_EASY: - aibot->unk000 = 10; - break; - default: - case SIMDIFF_NORMAL: - aibot->unk000 = 20; - break; - case SIMDIFF_HARD: - aibot->unk000 = 40; - break; - case SIMDIFF_PERFECT: - aibot->unk000 = 60; - break; - case SIMDIFF_DARK: - aibot->unk000 = 0; - break; - } - - aibot->aibotnum = aibotnum; - aibot->unk064 = 0; - aibot->fetchprop = NULL; - aibot->unk02c[0] = 0; - aibot->unk02c[1] = 0; - aibot->unk034 = 0; - aibot->unk040 = 0.0f; - aibot->loadedammo[0] = 0; - aibot->loadedammo[1] = 0; - aibot->unk058 = 0; - aibot->unk059 = 0; - aibot->unk05c = 0; - aibot->unk060 = 0; -#if !PAL - aibot->unk030 = 301; -#endif - aibot->unk038 = 0; - aibot->unk03e = -1; - aibot->unk03c = 0; - aibot->attackingplayernum = -1; - aibot->followingplayernum = -1; - aibot->dangerouspropnum = -1; - aibot->unk068 = 0; - aibot->unk06c = 0.0f; - aibot->unk070 = 0.0f; - aibot->unk074 = -1; - aibot->lastkilledbyplayernum = -1; - aibot->unk114 = -1; - aibot->command = AIBOTCMD_NORMAL; - aibot->unk098 = 0.0f; - - aibot->defendholdpos.x = pos.x; - aibot->defendholdpos.y = pos.y; - aibot->defendholdpos.z = pos.z; - - aibot->weaponnum = WEAPON_UNARMED; - - aibot->unk04d[0] = 0; - aibot->unk04d[1] = 0; - aibot->skrocket = NULL; - aibot->unk0a0 = 0; - - aibot->gunfunc = 0; - aibot->iscloserangeweapon = true; - aibot->teamisonlyai = 0; - aibot->unk09c_00 = 0; - aibot->unk09c_01 = 0; - aibot->cloakdeviceenabled = false; - aibot->rcp120cloakenabled = false; - aibot->unk04c_04 = 0; - aibot->unk04c_03 = 0; - aibot->unk04c_05 = 0; - aibot->unk04c_00 = 0; - - aibot->unk048 = -1; - aibot->unk04a = -1; - - aibot->unk0bc = -1; - aibot->unk0c4[HAND_LEFT] = 0; - aibot->unk0c4[HAND_RIGHT] = 0; - aibot->unk0cc = 0; - aibot->unk0d0 = 0; - aibot->unk0d8 = 0; - aibot->unk0dc = 0; - aibot->unk0e0[HAND_LEFT] = 0; - aibot->unk0e0[HAND_RIGHT] = 0; - aibot->maulercharge[HAND_LEFT] = 0.0f; - aibot->maulercharge[HAND_RIGHT] = 0.0f; - aibot->unk0a4 = model0001ae44(chr->model); - aibot->angleoffset = 0.0f; - aibot->speedtheta = 0.0f; - aibot->unk0b0 = model0001ae44(chr->model); - - aibot->unk0b4 = 0.0f; - aibot->unk0b8 = 0.0f; - aibot->shotspeed.x = 0.0f; - aibot->shotspeed.y = 0.0f; - aibot->shotspeed.z = 0.0f; - aibot->unk118 = 0; - aibot->unk11c = 0; - aibot->unk120 = -1; - aibot->unk124 = -1; - aibot->unk128 = 0; - aibot->unk12c = 0; - - for (i = 0; i < 12; i++) { - aibot->unk130[i] = -1; - aibot->playerdistances[i] = U32_MAX; - aibot->unk16c[i] = 0; - aibot->unk178[i] = -1; - aibot->unk1a8[i] = -1; - } - - aibot->unk1c0 = 0.0f; - aibot->unk1c4 = 0.0f; - aibot->unk1c8 = 0.0f; - aibot->unk1cc = -1; - aibot->unk1d0 = 0; - aibot->unk1d4 = 0.0f; - aibot->unk1e4 = -1; - aibot->unk1e8 = 0; - aibot->unk208 = 0; - aibot->rand = random(); - aibot->randttl60 = 0; - - for (i = 0; i < 6; i++) { - aibot->killsbygunfunc[i][0] = 0.0f; - aibot->killsbygunfunc[i][1] = 0.0f; - - aibot->suicidesbygunfunc[i][0] = 0.0f; - aibot->suicidesbygunfunc[i][1] = 0.0f; - - aibot->equipdurations60[i][0] = 0; - aibot->equipdurations60[i][1] = 0; - - aibot->unk2a8[i] = 0; - } - - aibot->unk2a4 = 0; - aibot->dampensuicidesttl60 = 0; - aibot->unk2c4 = 0.0f; - aibot->unk2c8 = 0; - - aibot->unk09c_03 = 0; - - aibot->unk2cc = 0; - aibot->unk2d0 = random(); - aibot->unk2d4 = random() * (1.0f / U32_MAX); - aibot->cheap = false; -#if VERSION >= VERSION_NTSC_1_0 - aibot->unk078 = 0; - aibot->unk050 = 0; - aibot->unk09d = 0; -#endif - } else { - g_MpSimulantChrs[--g_NumMpSimulantChrs] = NULL; - return; - } - - aibotAllocateInventory(chr, 10); - } - } - } -} diff --git a/src/game/game_01bea0.c b/src/game/game_01bea0.c index f729c56eb..97bc00ac9 100644 --- a/src/game/game_01bea0.c +++ b/src/game/game_01bea0.c @@ -2463,9 +2463,9 @@ glabel var7f1a863c /* f01c778: 15c10005 */ bne $t6,$at,.L0f01c790 /* f01c77c: 0311c021 */ addu $t8,$t8,$s1 /* f01c780: 0018c140 */ sll $t8,$t8,0x5 -/* f01c784: 3c01800b */ lui $at,%hi(g_MpPlayers+0x11) +/* f01c784: 3c01800b */ lui $at,%hi(g_PlayerConfigsArray+0x11) /* f01c788: 00380821 */ addu $at,$at,$t8 -/* f01c78c: a020c7c9 */ sb $zero,%lo(g_MpPlayers+0x11)($at) +/* f01c78c: a020c7c9 */ sb $zero,%lo(g_PlayerConfigsArray+0x11)($at) .L0f01c790: /* f01c790: 1080003b */ beqz $a0,.L0f01c880 /* f01c794: 30591000 */ andi $t9,$v0,0x1000 @@ -2474,9 +2474,9 @@ glabel var7f1a863c /* f01c7a0: 00117880 */ sll $t7,$s1,0x2 /* f01c7a4: 01f17821 */ addu $t7,$t7,$s1 /* f01c7a8: 000f7940 */ sll $t7,$t7,0x5 -/* f01c7ac: 3c01800b */ lui $at,%hi(g_MpPlayers+0x9d) +/* f01c7ac: 3c01800b */ lui $at,%hi(g_PlayerConfigsArray+0x9d) /* f01c7b0: 002f0821 */ addu $at,$at,$t7 -/* f01c7b4: a02dc855 */ sb $t5,%lo(g_MpPlayers+0x9d)($at) +/* f01c7b4: a02dc855 */ sb $t5,%lo(g_PlayerConfigsArray+0x9d)($at) /* f01c7b8: 8e630490 */ lw $v1,0x490($s3) /* f01c7bc: 24010002 */ addiu $at,$zero,0x2 /* f01c7c0: 02714021 */ addu $t0,$s3,$s1 @@ -2594,9 +2594,9 @@ glabel var7f1a863c /* f01c950: 00116880 */ sll $t5,$s1,0x2 /* f01c954: 01b16821 */ addu $t5,$t5,$s1 /* f01c958: 000d6940 */ sll $t5,$t5,0x5 -/* f01c95c: 3c04800b */ lui $a0,%hi(g_MpPlayers+0x45) +/* f01c95c: 3c04800b */ lui $a0,%hi(g_PlayerConfigsArray+0x45) /* f01c960: 008d2021 */ addu $a0,$a0,$t5 -/* f01c964: 8084c7fd */ lb $a0,%lo(g_MpPlayers+0x45)($a0) +/* f01c964: 8084c7fd */ lb $a0,%lo(g_PlayerConfigsArray+0x45)($a0) /* f01c968: 0c005408 */ jal joyGetButtonsPressedThisFrame /* f01c96c: 3405ffff */ dli $a1,0xffff /* f01c970: 304f4000 */ andi $t7,$v0,0x4000 @@ -2948,8 +2948,8 @@ glabel var7f1a863c .L0f01ce44: /* f01ce44: 00116880 */ sll $t5,$s1,0x2 /* f01ce48: 01b16821 */ addu $t5,$t5,$s1 -/* f01ce4c: 3c19800b */ lui $t9,%hi(g_MpPlayers) -/* f01ce50: 2739c7b8 */ addiu $t9,$t9,%lo(g_MpPlayers) +/* f01ce4c: 3c19800b */ lui $t9,%hi(g_PlayerConfigsArray) +/* f01ce50: 2739c7b8 */ addiu $t9,$t9,%lo(g_PlayerConfigsArray) /* f01ce54: 000d6940 */ sll $t5,$t5,0x5 /* f01ce58: 01b91021 */ addu $v0,$t5,$t9 /* f01ce5c: afa20058 */ sw $v0,0x58($sp) @@ -3120,19 +3120,19 @@ glabel var7f1a863c /* f01d0a8: 8e630298 */ lw $v1,0x298($s3) .L0f01d0ac: /* f01d0ac: 8e630298 */ lw $v1,0x298($s3) -/* f01d0b0: 3c04800b */ lui $a0,%hi(g_MpPlayers+0x280) -/* f01d0b4: 2484ca38 */ addiu $a0,$a0,%lo(g_MpPlayers+0x280) +/* f01d0b0: 3c04800b */ lui $a0,%hi(g_PlayerConfigsArray+0x280) +/* f01d0b4: 2484ca38 */ addiu $a0,$a0,%lo(g_PlayerConfigsArray+0x280) /* f01d0b8: 04610003 */ bgez $v1,.L0f01d0c8 /* f01d0bc: 27a20070 */ addiu $v0,$sp,0x70 /* f01d0c0: 8e78029c */ lw $t8,0x29c($s3) /* f01d0c4: 0700005a */ bltz $t8,.L0f01d230 .L0f01d0c8: -/* f01d0c8: 3c05800b */ lui $a1,%hi(g_MpPlayers+0x320) -/* f01d0cc: 3c06800b */ lui $a2,%hi(g_MpPlayers+0xa0) -/* f01d0d0: 3c07800b */ lui $a3,%hi(g_MpPlayers) -/* f01d0d4: 24e7c7b8 */ addiu $a3,$a3,%lo(g_MpPlayers) -/* f01d0d8: 24c6c858 */ addiu $a2,$a2,%lo(g_MpPlayers+0xa0) -/* f01d0dc: 24a5cad8 */ addiu $a1,$a1,%lo(g_MpPlayers+0x320) +/* f01d0c8: 3c05800b */ lui $a1,%hi(g_PlayerConfigsArray+0x320) +/* f01d0cc: 3c06800b */ lui $a2,%hi(g_PlayerConfigsArray+0xa0) +/* f01d0d0: 3c07800b */ lui $a3,%hi(g_PlayerConfigsArray) +/* f01d0d4: 24e7c7b8 */ addiu $a3,$a3,%lo(g_PlayerConfigsArray) +/* f01d0d8: 24c6c858 */ addiu $a2,$a2,%lo(g_PlayerConfigsArray+0xa0) +/* f01d0dc: 24a5cad8 */ addiu $a1,$a1,%lo(g_PlayerConfigsArray+0x320) /* f01d0e0: 00807825 */ or $t7,$a0,$zero /* f01d0e4: 00407025 */ or $t6,$v0,$zero /* f01d0e8: 2499009c */ addiu $t9,$a0,0x9c @@ -5700,12 +5700,12 @@ glabel var7f1a863c // // // c76c // if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE) { -// g_MpPlayers[i].base.team = 0; +// g_PlayerConfigsArray[i].base.team = 0; // } // // // c790 // if (pass2 && (buttons & START_BUTTON)) { -// g_MpPlayers[i].handicap = 128; +// g_PlayerConfigsArray[i].handicap = 128; // // if (g_Vars.unk000490 == 2) { // if (g_Vars.unk000494[i] == 0) { @@ -5758,7 +5758,7 @@ glabel var7f1a863c // } // // if (g_MenuData.root == MENUROOT_MPENDSCREEN) { -// u16 buttons2 = joyGetButtonsPressedThisFrame(g_MpPlayers[i].base.unk45, 0xffff); +// u16 buttons2 = joyGetButtonsPressedThisFrame(g_PlayerConfigsArray[i].base.unk45, 0xffff); // // if (buttons2 & B_BUTTON) { // s32 playernum = -1; @@ -5902,7 +5902,7 @@ glabel var7f1a863c // mpPushEndscreenDialog(sp288, i); // sp344 = true; // -// if (g_MpPlayers[i].unk4c.unk00 && g_MpPlayers[i].unk4c.unk04) { +// if (g_PlayerConfigsArray[i].unk4c.unk00 && g_PlayerConfigsArray[i].unk4c.unk04) { // func0f0fd548(i); // } // } @@ -5969,15 +5969,15 @@ glabel var7f1a863c // } else { // // d0ac // if (g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0) { -// struct mpplayer tmp; +// struct mpplayerconfig tmp; // -// tmp = g_MpPlayers[4]; -// g_MpPlayers[4] = g_MpPlayers[0]; -// g_MpPlayers[0] = tmp; +// tmp = g_PlayerConfigsArray[4]; +// g_PlayerConfigsArray[4] = g_PlayerConfigsArray[0]; +// g_PlayerConfigsArray[0] = tmp; // -// tmp = g_MpPlayers[5]; -// g_MpPlayers[5] = g_MpPlayers[1]; -// g_MpPlayers[1] = tmp; +// tmp = g_PlayerConfigsArray[5]; +// g_PlayerConfigsArray[5] = g_PlayerConfigsArray[1]; +// g_PlayerConfigsArray[1] = tmp; // } // } // diff --git a/src/game/game_0b0fd0.c b/src/game/game_0b0fd0.c index ee1b1b9be..37924173f 100644 --- a/src/game/game_0b0fd0.c +++ b/src/game/game_0b0fd0.c @@ -8,7 +8,7 @@ #include "game/hudmsg.h" #include "game/game_127910.h" #include "game/mplayer/setup.h" -#include "game/game_197600.h" +#include "game/botcmd.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" #include "game/options.h" diff --git a/src/game/game_0b69d0.c b/src/game/game_0b69d0.c index 929faeb1c..248848280 100644 --- a/src/game/game_0b69d0.c +++ b/src/game/game_0b69d0.c @@ -313,13 +313,13 @@ f32 playerChooseSpawnLocation(f32 chrwidth, struct coord *dstpos, s16 *dstrooms, roomGetNeighbours(pad.room, neighbours, 20); - for (i = 0; i < g_NumMpSimulantChrs; i++) { - if (g_MpSimulantChrs[i]->prop - && g_MpSimulantChrs[i]->prop != prop - && (!prop || chrCompareTeams(prop->chr, g_MpSimulantChrs[i], COMPARE_ENEMIES))) { - xdiff = g_MpSimulantChrs[i]->prop->pos.x - pad.pos.x; - ydiff = g_MpSimulantChrs[i]->prop->pos.y - pad.pos.y; - zdiff = g_MpSimulantChrs[i]->prop->pos.z - pad.pos.z; + for (i = 0; i < g_BotCount; i++) { + if (g_MpBotChrPtrs[i]->prop + && g_MpBotChrPtrs[i]->prop != prop + && (!prop || chrCompareTeams(prop->chr, g_MpBotChrPtrs[i], COMPARE_ENEMIES))) { + xdiff = g_MpBotChrPtrs[i]->prop->pos.x - pad.pos.x; + ydiff = g_MpBotChrPtrs[i]->prop->pos.y - pad.pos.y; + zdiff = g_MpBotChrPtrs[i]->prop->pos.z - pad.pos.z; sqdist = xdiff * xdiff + ydiff * ydiff + zdiff * zdiff; @@ -327,11 +327,11 @@ f32 playerChooseSpawnLocation(f32 chrwidth, struct coord *dstpos, s16 *dstrooms, bestsqdist = sqdist; } - if (arrayIntersects(tmppadrooms, g_MpSimulantChrs[i]->prop->rooms)) { + if (arrayIntersects(tmppadrooms, g_MpBotChrPtrs[i]->prop->rooms)) { verybadpads[p] = true; } - if (verybadpads[p] || arrayIntersects(neighbours, g_MpSimulantChrs[i]->prop->rooms)) { + if (verybadpads[p] || arrayIntersects(neighbours, g_MpBotChrPtrs[i]->prop->rooms)) { badpads[p] = true; } } @@ -1867,7 +1867,7 @@ void currentPlayerSpawn(void) #if VERSION >= VERSION_NTSC_1_0 if (g_Vars.currentplayer->model00d4 == NULL - && (IS8MB() || g_Vars.fourmeg2player || g_MpPlayerChrs[g_Vars.currentplayernum] == NULL)) { + && (IS8MB() || g_Vars.fourmeg2player || g_MpAllChrPtrs[g_Vars.currentplayernum] == NULL)) { func0f0b8ba0(); } #else @@ -1930,17 +1930,17 @@ void currentPlayerChooseBodyAndHead(s32 *bodynum, s32 *headnum, s32 *arg2) } if (g_Vars.normmplayerisrunning) { - if (g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.mpheadnum < mpGetNumHeads2()) { - *headnum = mpGetHeadId(g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.mpheadnum); + if (g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].base.mpheadnum < mpGetNumHeads2()) { + *headnum = mpGetHeadId(g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].base.mpheadnum); } else { - *headnum = g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.mpheadnum - mpGetNumHeads2(); + *headnum = g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].base.mpheadnum - mpGetNumHeads2(); if (arg2) { *arg2 = true; } } - *bodynum = mpGetBodyId(g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.mpbodynum); + *bodynum = mpGetBodyId(g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].base.mpbodynum); return; } @@ -2484,21 +2484,21 @@ glabel var7f1ad5b4 /* f0b9230: 11600011 */ beqz $t3,.L0f0b9278 /* f0b9234: 8da60004 */ lw $a2,0x4($t5) /* f0b9238: 8e02028c */ lw $v0,0x28c($s0) -/* f0b923c: 3c01800b */ lui $at,%hi(g_MpPlayerChrs) -/* f0b9240: 3c0f800b */ lui $t7,%hi(g_MpPlayers) +/* f0b923c: 3c01800b */ lui $at,%hi(g_MpAllChrPtrs) +/* f0b9240: 3c0f800b */ lui $t7,%hi(g_PlayerConfigsArray) /* f0b9244: 00027080 */ sll $t6,$v0,0x2 /* f0b9248: 002e0821 */ addu $at,$at,$t6 -/* f0b924c: ac26c4d0 */ sw $a2,%lo(g_MpPlayerChrs)($at) +/* f0b924c: ac26c4d0 */ sw $a2,%lo(g_MpAllChrPtrs)($at) /* f0b9250: 8e080288 */ lw $t0,0x288($s0) -/* f0b9254: 3c01800b */ lui $at,%hi(var800ac500) -/* f0b9258: 25efc7b8 */ addiu $t7,$t7,%lo(g_MpPlayers) +/* f0b9254: 3c01800b */ lui $at,%hi(g_MpAllChrConfigPtrs) +/* f0b9258: 25efc7b8 */ addiu $t7,$t7,%lo(g_PlayerConfigsArray) /* f0b925c: 8d180070 */ lw $t8,0x70($t0) /* f0b9260: 002e0821 */ addu $at,$at,$t6 /* f0b9264: 0018c880 */ sll $t9,$t8,0x2 /* f0b9268: 0338c821 */ addu $t9,$t9,$t8 /* f0b926c: 0019c940 */ sll $t9,$t9,0x5 /* f0b9270: 032f4821 */ addu $t1,$t9,$t7 -/* f0b9274: ac29c500 */ sw $t1,%lo(var800ac500)($at) +/* f0b9274: ac29c500 */ sw $t1,%lo(g_MpAllChrConfigPtrs)($at) .L0f0b9278: /* f0b9278: 8cca0018 */ lw $t2,0x18($a2) /* f0b927c: 354c0001 */ ori $t4,$t2,0x1 diff --git a/src/game/game_0f09f0.c b/src/game/game_0f09f0.c index 5aca99241..cfef38ede 100644 --- a/src/game/game_0f09f0.c +++ b/src/game/game_0f09f0.c @@ -5812,8 +5812,8 @@ glabel func0f0f3220 /* f0f3344: 01c37021 */ addu $t6,$t6,$v1 /* f0f3348: 8ced0000 */ lw $t5,0x0($a3) /* f0f334c: 000e7140 */ sll $t6,$t6,0x5 -/* f0f3350: 3c18800b */ lui $t8,%hi(g_MpPlayers) -/* f0f3354: 2718c7b8 */ addiu $t8,$t8,%lo(g_MpPlayers) +/* f0f3350: 3c18800b */ lui $t8,%hi(g_PlayerConfigsArray) +/* f0f3354: 2718c7b8 */ addiu $t8,$t8,%lo(g_PlayerConfigsArray) /* f0f3358: 25cf004c */ addiu $t7,$t6,0x4c /* f0f335c: ace30000 */ sw $v1,0x0($a3) /* f0f3360: 01f82021 */ addu $a0,$t7,$t8 @@ -10996,11 +10996,11 @@ glabel func0f0f5004 /* f0f5004: 27bdffa0 */ addiu $sp,$sp,-96 /* f0f5008: 3c0e7f1b */ lui $t6,%hi(var7f1b25f8) /* f0f500c: 27a20000 */ addiu $v0,$sp,0x0 -/* f0f5010: 3c03800b */ lui $v1,%hi(g_MpPlayers) +/* f0f5010: 3c03800b */ lui $v1,%hi(g_PlayerConfigsArray) /* f0f5014: 3c078007 */ lui $a3,%hi(g_MpPlayerNum) /* f0f5018: 25ce25f8 */ addiu $t6,$t6,%lo(var7f1b25f8) /* f0f501c: 24e71448 */ addiu $a3,$a3,%lo(g_MpPlayerNum) -/* f0f5020: 2463c7b8 */ addiu $v1,$v1,%lo(g_MpPlayers) +/* f0f5020: 2463c7b8 */ addiu $v1,$v1,%lo(g_PlayerConfigsArray) /* f0f5024: 240800a0 */ addiu $t0,$zero,0xa0 /* f0f5028: 2409000c */ addiu $t1,$zero,0xc /* f0f502c: 25d90060 */ addiu $t9,$t6,0x60 diff --git a/src/game/game_127910.c b/src/game/game_127910.c index 9164cdb64..9a54ab27e 100644 --- a/src/game/game_127910.c +++ b/src/game/game_127910.c @@ -650,8 +650,8 @@ void currentPlayerCalculateAiBuddyNums(void) s32 playernum = g_Vars.currentplayernum; s32 playercount = PLAYERCOUNT(); - for (i = playercount; i < g_MpNumPlayers; i++) { - if (var800ac500[i]->team == var800ac500[playernum]->team) { + for (i = playercount; i < g_MpNumChrs; i++) { + if (g_MpAllChrConfigPtrs[i]->team == g_MpAllChrConfigPtrs[playernum]->team) { g_Vars.players[playernum]->aibuddynums[g_Vars.players[playernum]->numaibuddies] = i; g_Vars.players[playernum]->numaibuddies++; } diff --git a/src/game/game_197c00.c b/src/game/game_197c00.c deleted file mode 100644 index fa4c27d0e..000000000 --- a/src/game/game_197c00.c +++ /dev/null @@ -1,1076 +0,0 @@ -#include -#include "constants.h" -#include "game/chr/chraction.h" -#include "game/debug.h" -#include "game/chr/chr.h" -#include "game/ceil.h" -#include "game/game_0b0fd0.h" -#include "game/game_127910.h" -#include "game/mplayer/setup.h" -#include "game/game_190260.h" -#include "game/game_197600.h" -#include "game/game_1999b0.h" -#include "game/mplayer/mplayer.h" -#include "game/propobj.h" -#include "bss.h" -#include "lib/rng.h" -#include "data.h" -#include "types.h" - -struct aibotweaponpreference g_AibotWeaponPreferences[] = { - /*0x00*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0 }, // WEAPON_NONE - /*0x01*/ { 13, 13, 13, 13, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, // WEAPON_UNARMED - /*0x02*/ { 56, 60, 84, 88, 1, 1, 1, 0, 30, 0, 10, 0, 1, 0 }, // WEAPON_FALCON2 - /*0x03*/ { 52, 60, 80, 88, 1, 1, 1, 0, 30, 0, 10, 0, 1, 0 }, // WEAPON_FALCON2_SILENCER - /*0x04*/ { 60, 60, 88, 88, 1, 1, 1, 0, 30, 0, 10, 0, 1, 0 }, // WEAPON_FALCON2_SCOPE - /*0x05*/ { 76, 88, 104, 120, 1, 1, 1, 2, 30, 30, 10, 10, 1, 0 }, // WEAPON_MAGSEC4 - /*0x06*/ { 64, 88, 92, 120, 1, 1, 1, 2, 30, 30, 10, 10, 1, 0 }, // WEAPON_MAULER - /*0x07*/ { 72, 76, 100, 120, 1, 1, 1, 2, 30, 30, 10, 10, 2, 0 }, // WEAPON_PHOENIX - /*0x08*/ { 68, 76, 96, 120, 1, 1, 1, 0, 30, 0, 8, 0, 3, 0 }, // WEAPON_DY357MAGNUM - /*0x09*/ { 180, 188, 184, 188, 1, 1, 1, 0, 20, 0, 6, 0, 3, 0 }, // WEAPON_DY357LX - /*0x0a*/ { 116, 128, 136, 152, 1, 1, 2, 2, 100, 100, 30, 30, 2, 0 }, // WEAPON_CMP150 - /*0x0b*/ { 120, 128, 132, 140, 1, 1, 2, 2, 150, 150, 50, 50, 2, 0 }, // WEAPON_CYCLONE - /*0x0c*/ { 152, 176, 0, 0, 1, 1, 2, 2, 100, 70, 25, 15, 2, 0 }, // WEAPON_CALLISTO - /*0x0d*/ { 172, 188, 0, 0, 1, 0, 2, 2, 300, 0, 40, 0, 2, 0 }, // WEAPON_RCP120 - /*0x0e*/ { 128, 140, 0, 0, 1, 1, 2, 2, 100, 0, 30, 0, 3, 0 }, // WEAPON_LAPTOPGUN - /*0x0f*/ { 124, 148, 0, 0, 1, 1, 2, 2, 90, 0, 30, 0, 1, 0 }, // WEAPON_DRAGON - /*0x10*/ { 156, 180, 0, 0, 1, 0, 2, 2, 150, 0, 40, 0, 2, 0 }, // WEAPON_K7AVENGER - /*0x11*/ { 148, 176, 0, 0, 1, 0, 2, 2, 120, 0, 40, 0, 2, 0 }, // WEAPON_AR34 - /*0x12*/ { 164, 188, 0, 0, 1, 1, 2, 3, 120, 20, 30, 6, 1, 0 }, // WEAPON_SUPERDRAGON - /*0x13*/ { 140, 156, 0, 0, 1, 1, 1, 1, 18, 18, 8, 8, 6, 1 }, // WEAPON_SHOTGUN - /*0x14*/ { 144, 176, 0, 0, 1, 1, 2, 0, 400, 0, 80, 0, 3, 0 }, // WEAPON_REAPER - /*0x15*/ { 28, 40, 0, 0, 1, 0, 2, 2, 30, 30, 10, 10, 2, 0 }, // WEAPON_SNIPERRIFLE - /*0x16*/ { 188, 188, 0, 0, 1, 0, 3, 5, 16, 0, 4, 0, 2, 0 }, // WEAPON_FARSIGHT - /*0x17*/ { 176, 188, 0, 0, 1, 1, 3, 3, 20, 20, 4, 4, 2, 0 }, // WEAPON_DEVASTATOR - /*0x18*/ { 160, 188, 0, 0, 1, 1, 3, 3, 2, 2, 1, 1, 2, 0 }, // WEAPON_ROCKETLAUNCHER - /*0x19*/ { 168, 188, 0, 0, 1, 1, 3, 3, 2, 2, 1, 1, 3, 0 }, // WEAPON_SLAYER - /*0x1a*/ { 20, 40, 24, 40, 1, 1, 0, 2, 0, 5, 0, 1, 1, 0 }, // WEAPON_COMBATKNIFE - /*0x1b*/ { 108, 176, 0, 0, 1, 1, 2, 2, 15, 15, 5, 5, 4, 1 }, // WEAPON_CROSSBOW - /*0x1c*/ { 48, 188, 0, 0, 1, 1, 2, 0, 20, 24, 6, 8, 1, 0 }, // WEAPON_TRANQUILIZER - /*0x1d*/ { 112, 112, 0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 1, 0 }, // WEAPON_LASER - /*0x1e*/ { 36, 172, 0, 0, 1, 1, 7, 7, 6, 6, 2, 2, 1, 0 }, // WEAPON_GRENADE - /*0x1f*/ { 32, 188, 0, 0, 1, 1, 7, 7, 3, 3, 1, 1, 1, 0 }, // WEAPON_NBOMB - /*0x20*/ { 12, 12, 0, 0, 0, 0, 7, 2, 5, 5, 1, 1, 1, 0 }, // WEAPON_TIMEDMINE - /*0x21*/ { 40, 176, 0, 0, 0, 0, 7, 2, 5, 5, 1, 1, 1, 0 }, // WEAPON_PROXIMITYMINE - /*0x22*/ { 44, 156, 0, 0, 1, 0, 2, 2, 5, 5, 2, 2, 1, 0 }, // WEAPON_REMOTEMINE - /*0x23*/ { 8, 8, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_COMBATBOOST - /*0x24*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_PP9I - /*0x25*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_CC13 - /*0x26*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KL01313 - /*0x27*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KF7SPECIAL - /*0x28*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_ZZT - /*0x29*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_DMC - /*0x2a*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_AR53 - /*0x2b*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_RCP45 - /*0x2c*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_PSYCHOSISGUN - /*0x2d*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_NIGHTVISION - /*0x2e*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_EYESPY - /*0x2f*/ { 4, 4, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_XRAYSCANNER - /*0x30*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_IRSCANNER -#if PAL - /*0x31*/ { 218, 218, 0, 0, 0, 0, 2, 2, 1000, 0, 0, 0, 1, 0 }, // WEAPON_CLOAKINGDEVICE -#else - /*0x31*/ { 218, 218, 0, 0, 0, 0, 2, 2, 1200, 0, 0, 0, 1, 0 }, // WEAPON_CLOAKINGDEVICE -#endif - /*0x32*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_HORIZONSCANNER - /*0x33*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_TESTER - /*0x34*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_ROCKETLAUNCHER_34 - /*0x35*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_ECMMINE - /*0x36*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_DATAUPLINK - /*0x37*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_RTRACKER - /*0x38*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_PRESIDENTSCANNER - /*0x39*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_DOORDECODER - /*0x3a*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_AUTOSURGEON - /*0x3b*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_EXPLOSIVES - /*0x3c*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_SKEDARBOMB - /*0x3d*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_COMMSRIDER - /*0x3e*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_TRACERBUG - /*0x3f*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_TARGETAMPLIFIER - /*0x40*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_DISGUISE40 - /*0x41*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_DISGUISE41 - /*0x42*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_FLIGHTPLANS - /*0x43*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_RESEARCHTAPE - /*0x44*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_BACKUPDISK - /*0x45*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD45 - /*0x46*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD46 - /*0x47*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD47 - /*0x48*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD48 - /*0x49*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD49 - /*0x4a*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD4A - /*0x4b*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD4B - /*0x4c*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD4C - /*0x4d*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_SUITCASE - /*0x4e*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_BRIEFCASE -#if VERSION >= VERSION_NTSC_1_0 - /*0x4f*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_SHIELDTECHITEM -#endif - /*0x50*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_NECKLACE - /*0x51*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_HAMMER - /*0x52*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_SCREWDRIVER - /*0x53*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_ROCKET - /*0x54*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_HOMINGROCKET - /*0x55*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_GRENADEROUND - /*0x56*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_BOLT - /*0x57*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_BRIEFCASE2 - /*0x58*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_SKROCKET - /*0x59*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_59 - /*0x5a*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_WATCHLASER - /*0x5b*/ { 220, 220, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_MPSHIELD - /*0x5c*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_DISABLED - /*0x5d*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_SUICIDEPILL -}; - -void aibotClearInventory(struct chrdata *chr) -{ - if (chr && chr->aibot) { - s32 i = 0; - - for (i = 0; i < chr->aibot->maxitems; i++) { - chr->aibot->items[i].type = -1; - } - - dprint(); - } -} - -struct invitem *aibotGetFreeInvSlot(struct chrdata *chr) -{ - s32 i; - - if (!chr || !chr->aibot) { - return NULL; - } - - for (i = 0; i < chr->aibot->maxitems; i++) { - if (chr->aibot->items[i].type == -1) { - return &chr->aibot->items[i]; - } - } - - dprint(); - - return NULL; -} - -struct invitem *aibotGetInvItem(struct chrdata *chr, u32 weaponnum) -{ - s32 i; - - if (!chr || !chr->aibot) { - return NULL; - } - - for (i = 0; i < chr->aibot->maxitems; i++) { - struct invitem *item = &chr->aibot->items[i]; - - if (item->type == -1) { - continue; - } - - if (item->type == INVITEMTYPE_WEAP || item->type == INVITEMTYPE_DUAL) { - if (item->type_weap.weapon1 == weaponnum) { - return item; - } - } - } - - return NULL; -} - -void aibotRemoveInvItem(struct chrdata *chr, s32 weaponnum) -{ - s32 i; - - if (!chr || !chr->aibot) { - return; - } - - for (i = 0; i < chr->aibot->maxitems; i++) { - struct invitem *item = &chr->aibot->items[i]; - - if (item->type == -1) { - continue; - } - - if (item->type == INVITEMTYPE_WEAP || item->type == INVITEMTYPE_DUAL) { - if (item->type_weap.weapon1 == weaponnum) { - chr->aibot->items[i].type = -1; - return; - } - } - } -} - -u32 aibotGetInvItemType(struct chrdata *chr, u32 weaponnum) -{ - struct invitem *item; - - if (!chr || !chr->aibot) { - return 0; - } - - item = aibotGetInvItem(chr, weaponnum); - - if (item) { - return item->type; - } - - return 0; -} - -bool aibotGiveSingleWeapon(struct chrdata *chr, u32 weaponnum) -{ - if (!chr || !chr->aibot) { - return false; - } - - if (!aibotGetInvItemType(chr, weaponnum)) { - struct invitem *item = aibotGetFreeInvSlot(chr); - - if (item) { - item->type = INVITEMTYPE_WEAP; - item->type_weap.weapon1 = weaponnum; - item->type_weap.pickuppad = -1; - } - - return true; - } - - return false; -} - -void aibotGiveDualWeapon(struct chrdata *chr, u32 weaponnum) -{ - struct invitem *item = aibotGetInvItem(chr, weaponnum); - - if (item) { - item->type = INVITEMTYPE_DUAL; - } -} - -s16 aibotGetWeaponPad(struct chrdata *chr, u32 weaponnum) -{ - struct invitem *item = aibotGetInvItem(chr, weaponnum); - - if (item && item->type == INVITEMTYPE_WEAP) { - return item->type_weap.pickuppad; - } - - return -1; -} - -bool aibotGiveProp(struct chrdata *chr, struct prop *prop) -{ - bool result = false; - struct defaultobj *obj; - s32 i; - - if (!chr || !chr->aibot) { - return false; - } - - obj = prop->obj; - - if (prop->type == PROPTYPE_WEAPON) { - if (obj->type == OBJTYPE_WEAPON) { - struct weaponobj *weapon = prop->weapon; - s32 weaponnum = weapon->weaponnum; - result = aibotGiveSingleWeapon(chr, weaponnum); - - if (result) { - struct invitem *item = aibotGetInvItem(chr, weaponnum); - item->type_weap.pickuppad = obj->pad; - } - } - } else if (obj->type == OBJTYPE_MULTIAMMOCRATE) { - struct multiammocrateobj *multi = (struct multiammocrateobj *)prop->obj; - - for (i = 0; i < 0x13; i++) { - if (multi->slots[i].quantity > 0) { - s32 weaponnum = ammotypeGetWeapon(i + 1); - - if (weaponnum > 0) { - aibotGiveSingleWeapon(chr, weaponnum); - } - } - } - } - - return result; -} - -void func0f198060(u32 arg0) -{ - // empty -} - -void func0f198068(struct chrdata *chr, s32 *weaponnums, s32 *scores1, s32 *scores2) -{ - s32 i; - s32 pri1; - s32 pri2; - s32 sec1; - s32 sec2; - - // Gather scores for each weapon in the setup, - // taking the higher score out of both gun functions - for (i = 0; i < ARRAYCOUNT(g_MpSetup.weapons); i++) { - s32 weaponnum = g_MpWeapons[g_MpSetup.weapons[i]].weaponnum; - weaponnums[i] = weaponnum; - - func0f198df8(chr, weaponnum, FUNC_PRIMARY, -1, false, &pri1, &pri2); - func0f198df8(chr, weaponnum, FUNC_SECONDARY, -1, false, &sec1, &sec2); - - scores1[i] = pri1 >= sec1 ? pri1 : sec1; - scores2[i] = pri2 >= sec2 ? pri2 : sec2; - } - - // Sort all three arrays by score1 descending - for (i = 0; i < ARRAYCOUNT(g_MpSetup.weapons); i++) { - s32 swapindex = i; - s32 tmp; - s32 j; - - for (j = i + 1; j < ARRAYCOUNT(g_MpSetup.weapons); j++) { - if (scores1[j] > scores1[swapindex]) { - swapindex = j; - } - } - - if (swapindex != i) { - tmp = scores1[swapindex]; - scores1[swapindex] = scores1[i]; - scores1[i] = tmp; - - tmp = scores2[swapindex]; - scores2[swapindex] = scores2[i]; - scores2[i] = tmp; - - tmp = weaponnums[swapindex]; - weaponnums[swapindex] = weaponnums[i]; - weaponnums[i] = tmp; - } - } -} - -bool mpHasShield(void) -{ - s32 i; - - for (i = 0; i < ARRAYCOUNT(g_MpSetup.weapons); i++) { - s32 weaponnum = g_MpWeapons[g_MpSetup.weapons[i]].weaponnum; - - if (weaponnum == WEAPON_MPSHIELD) { - return true; - } - } - - return false; -} - -s32 mpGetWeaponIndexByWeaponNum(s32 weaponnum) -{ - s32 result = -1; - s32 i; - - for (i = 0; i < ARRAYCOUNT(g_MpSetup.weapons); i++) { - if (g_MpWeapons[g_MpSetup.weapons[i]].weaponnum == weaponnum && i < 6) { - result = i; - break; - } - } - - return result; -} - -void aibotScoreWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3, bool arg4, s32 *dst1, s32 *dst2, bool arg7, bool arg8) -{ - s32 score1 = 0; - s32 score2 = 0; - s32 extra = 0; - - // @dangerous: Array overflow can occur if more weapons are added to the - // game without extending the preferences table - if (arg3 < 0 - || (!funcnum && arg3 == g_AibotWeaponPreferences[weaponnum].unk04_00) - || (funcnum && arg3 == g_AibotWeaponPreferences[weaponnum].unk04_01)) { - if (arg4) { - score1 = g_AibotWeaponPreferences[weaponnum].unk02; - score2 = g_AibotWeaponPreferences[weaponnum].unk03; - } else { - score1 = g_AibotWeaponPreferences[weaponnum].unk00; - score2 = g_AibotWeaponPreferences[weaponnum].unk01; - } - - if (chr && chr->aibot) { - // Add weighting for explosive weapons for rocket sims - // and weighting for shields for shield sims, with extra - // weighting if the sim is meat or easy. - if (chr->aibot->simulant->difficulty == SIMDIFF_MEAT) { - extra = 100; - } else if (chr->aibot->simulant->difficulty == SIMDIFF_EASY) { - extra = 50; - } - - if (chr->aibot->simulant->base.simtype == SIMTYPE_ROCKET) { - if (weaponnum == WEAPON_ROCKETLAUNCHER) { - score1 = extra + 300; - } else if (weaponnum == WEAPON_SLAYER) { - score1 = extra + 299; - } else if (weaponnum == WEAPON_DEVASTATOR) { - score1 = extra + 280; - } else if (weaponnum == WEAPON_SUPERDRAGON && funcnum != FUNC_PRIMARY) { - score1 = extra + 279; - } else if (weaponnum == WEAPON_PHOENIX && funcnum != FUNC_PRIMARY) { - score1 = extra + 260; - } else if (weaponnum == WEAPON_GRENADE) { - score1 = extra + 240; - } - } else if (chr->aibot->simulant->base.simtype == SIMTYPE_SHIELD) { - if (weaponnum == WEAPON_MPSHIELD) { - score1 = extra + 300; - } - } - } - } - - // Missing from this list: - // Mauler, K7 Avenger, AR34, sniper rifle, Farsight, laser, grenade - switch (weaponnum) { - case WEAPON_UNARMED: - if (arg7 && funcnum != FUNC_PRIMARY) { - if (chr->target != -1 - && mpchrGetTargetsWeaponNum(chr) > WEAPON_UNARMED - && chr->aibot->simulant->difficulty > SIMDIFF_MEAT) { - score1 = 26; - score2 = 26; - } else { - score1 = 0; - score2 = 0; - } - } - break; - case WEAPON_FALCON2: - if (funcnum != FUNC_PRIMARY) { - score1 = 15; - score2 = 15; - } - break; - case WEAPON_FALCON2_SILENCER: - if (funcnum != FUNC_PRIMARY) { - score1 = 14; - score2 = 14; - } - break; - case WEAPON_FALCON2_SCOPE: - if (funcnum != FUNC_PRIMARY) { - score1 = 16; - score2 = 16; - } - break; - case WEAPON_MAGSEC4: - if (funcnum == FUNC_PRIMARY) { - score1 = arg4 ? 91 : 63; - } - break; - case WEAPON_PHOENIX: - if (chr->aibot->simulant->base.simtype != SIMDIFF_HARD) { - if (funcnum != FUNC_PRIMARY) { - if ((g_MpSetup.options & MPOPTION_ONEHITKILLS) - && chr->aibot->simulant->difficulty >= SIMDIFF_NORMAL) { - score1 = 110; - score2 = 150; - } - } else { - score1 = arg4 ? 90 : 62; - } - } - break; - case WEAPON_DY357MAGNUM: - if (funcnum != FUNC_PRIMARY) { - score1 = 17; - score2 = 17; - } - break; - case WEAPON_DY357LX: - if (funcnum != FUNC_PRIMARY) { - score1 = 18; - score2 = 18; - } - break; - case WEAPON_CYCLONE: - if (funcnum == (chr->aibot->rand % 2)) { - score1--; - } - break; - case WEAPON_CALLISTO: - if (funcnum == (chr->aibot->rand % 2)) { - score1--; - } - break; - case WEAPON_RCP120: - if (chr->aibot->cloakdeviceenabled == false - && aibotGetAmmoQuantityByWeapon(chr->aibot, WEAPON_RCP120, FUNC_PRIMARY, true) > 500 - && chr->aibot->simulant->difficulty > SIMDIFF_MEAT) { - score1 += chr->aibot->rand % 10; - score2 += chr->aibot->rand % 10; - } - break; - case WEAPON_LAPTOPGUN: - if (funcnum != FUNC_PRIMARY) { - score1 = 0; - score2 = 0; - } - break; - case WEAPON_DRAGON: - if (funcnum != FUNC_PRIMARY) { - score1 = 0; - score2 = 0; - } - break; - case WEAPON_SUPERDRAGON: - if (chr->aibot->simulant->base.simtype != SIMDIFF_HARD - && (chr->aibot->rand % 2) == funcnum) { - score1 -= 15; - } - break; - case WEAPON_SHOTGUN: - if (funcnum == (chr->aibot->rand % 2)) { - score1--; - } - break; - case WEAPON_REAPER: - if (funcnum != FUNC_PRIMARY) { - score1 = 19; - score2 = 80; - } - break; - case WEAPON_DEVASTATOR: - if (funcnum != FUNC_PRIMARY) { - score1 = 0; - score2 = 0; - } - break; - case WEAPON_ROCKETLAUNCHER: - if (funcnum == (chr->aibot->rand % 2)) { - score1--; - } - break; - case WEAPON_SLAYER: - if (chr->aibot->simulant->base.simtype == SIMDIFF_HARD) { - if (funcnum != FUNC_PRIMARY) { - if (chr->aibot->simulant->difficulty > SIMDIFF_MEAT) { - if (arg7) { - if (chr->target != -1 - && chr->aibot->unk16c[mpPlayerGetIndex(chrGetTargetProp(chr)->chr)] == 0 - && (chr->aibot->rand % 2) == 0) { - score1 += 10; - } else { - score1 -= 10; - } - } - } else { - score1 = 0; - score2 = 0; - } - } - } else { - if (funcnum != FUNC_PRIMARY) { - if (chr->aibot->simulant->difficulty >= SIMDIFF_NORMAL) { - if (arg7) { - if (chr->target != -1 - && chr->aibot->unk16c[mpPlayerGetIndex(chrGetTargetProp(chr)->chr)] == 0 - && (chr->aibot->rand % 2) == 0) { - score1 = 178; - score2 = 188; - } else { - score1 -= 15; - score2 -= 15; - } - } - } else { - score1 = 0; - score2 = 0; - } - } - } - break; - case WEAPON_COMBATKNIFE: - if (funcnum != FUNC_PRIMARY) { - score1 = 0; - score2 = 0; - } - break; - case WEAPON_CROSSBOW: - if (funcnum != FUNC_PRIMARY) { - if (chr->aibot->simulant->difficulty > SIMDIFF_MEAT) { - score1 = 158; - score2 = 176; - } else { - score1 = 0; - score2 = 0; - } - } else { - if (arg7 && chr->target != -1 && chrGetTargetProp(chr)->chr->blurdrugamount > PALDOWN(3500)) { - score1 = 0; - score2 = 0; - } else { - score1 = 49; - score2 = 188; - } - } - break; - case WEAPON_TRANQUILIZER: - if (arg7) { - s32 bluramount = 0; - - if (chr->target != -1) { - bluramount = chrGetTargetProp(chr)->chr->blurdrugamount; - } - - if (funcnum != FUNC_PRIMARY) { - if (chr->aibot->simulant->difficulty <= SIMDIFF_MEAT) { - score1 = 0; - score2 = 0; - } else if (bluramount > PALDOWN(3500) && (chr->aibot->rand % 2) == 0) { - score1 = chr->aibot->rand % 140 + 48; - score2 = 188; - } else if (chr->aibot->rand % 10 == 0) { - score1 = chr->aibot->rand % 140 + 48; - score2 = 188; - } else { - score1 = 0; - score2 = 0; - } - } else { - if (bluramount >= PALDOWN(5000)) { - score2 = 48; - - if (chr->aibot->rand % 2) { - score1 = 0; - score2 = 0; - } - } else if (bluramount > PALDOWN(3500)) { - u32 value = (-bluramount * 16 + (PAL ? 66656 : 80000)) / PALDOWN(1500); - - if (value > 15) { - value = 15; - } - - value *= value; - value *= value; - value *= value; - - if (value < chr->aibot->rand) { - score2 = 48; - - if (chr->aibot->rand % 2) { - score1 = 0; - score2 = 0; - } - } - } - } - } - break; - case WEAPON_NBOMB: - if (arg7 && chr->target != -1) { - mpchrGetTargetsWeaponNum(chr); - } - break; - } - - if (arg8) { - s32 weaponindex; - s32 extra = 0; - f32 float1; - f32 killrate = 1; - f32 float2; - - if (g_Vars.lvframe60 > 0) { - killrate = g_Vars.totalkills * PALDOWN(3600.0f) / (f32)(g_Vars.lvframe60 * g_MpNumPlayers); - - if (killrate < 1) { - killrate = 1; - } - } - - weaponindex = mpGetWeaponIndexByWeaponNum(weaponnum); - - if (weaponindex >= 0) { - float2 = ceilf(chr->aibot->equipdurations60[weaponindex][funcnum] * (1.0f / PALDOWN(3600.0f))); - - if (float2 > 0) { - float1 = chr->aibot->killsbygunfunc[weaponindex][funcnum]; - - if (chr->aibot->simulant->difficulty >= SIMDIFF_NORMAL) { - float1 -= 3.0f * chr->aibot->suicidesbygunfunc[weaponindex][funcnum]; - } - - float1 = float1 / float2; - - extra = float1 * 10.0f / killrate; - } - - if (extra > 30) { - extra = 30; - } - - extra += chr->aibot->unk2a8[weaponindex]; - - score1 += extra; - score2 += extra; - - if (score1 < 0) { - score1 = 0; - } - - if (score2 < 0) { - score2 = 0; - } - } - } - - *dst1 = score1; - *dst2 = score2; -} - -void func0f198db4(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3, bool arg4, s32 *dst1, s32 *dst2) -{ - aibotScoreWeapon(chr, weaponnum, funcnum, arg3, arg4, dst1, dst2, true, true); -} - -void func0f198df8(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3, bool arg4, s32 *dst1, s32 *dst2) -{ - aibotScoreWeapon(chr, weaponnum, funcnum, arg3, arg4, dst1, dst2, false, true); -} - -s32 func0f198e38(s32 weaponnum, s32 funcnum) -{ - if (funcnum != FUNC_PRIMARY) { - return g_AibotWeaponPreferences[weaponnum].unk04_06; - } - - return g_AibotWeaponPreferences[weaponnum].unk04_02; -} - -bool func0f198e78(struct chrdata *chr, s32 weaponnum, s32 funcnum) -{ - bool result = true; - - if (chr->aibot->simulant->base.simtype == SIMTYPE_FIST) { - if (funcnum != FUNC_PRIMARY) { - if (g_AibotWeaponPreferences[weaponnum].unk04_06) { - result = false; - } - } else { - if (g_AibotWeaponPreferences[weaponnum].unk04_02) { - result = false; - } - } - } - - return result; -} - -void aibotTickInventory(struct chrdata *chr) -{ - s32 newweaponnum = WEAPON_UNARMED; - s32 newfuncnum = FUNC_PRIMARY; - s32 weaponindex; - struct aibot *aibot; - bool keepcurrentweapon = false; - s32 i; - - if (!chr || !chr->aibot) { - return; - } - - aibot = chr->aibot; - weaponindex = mpGetWeaponIndexByWeaponNum(aibot->weaponnum); - - if (weaponindex >= 0) { - aibot->equipdurations60[weaponindex][aibot->gunfunc] += g_Vars.lvupdate240_60; - } - - // Every 60-61 seconds, decrease suicide values. These values are used when - // determining which gun to use. The more suicides with a particular gun and - // function, the less likely the aibot is to use it. This value cools off. - aibot->dampensuicidesttl60 -= g_Vars.lvupdate240_60; - - if (aibot->dampensuicidesttl60 < 0) { - aibot->dampensuicidesttl60 = PALDOWN(3600) + random() % PALDOWN(60); - - for (i = 0; i < 6; i++) { - aibot->suicidesbygunfunc[i][0] *= 0.9f; - aibot->suicidesbygunfunc[i][1] *= 0.9f; - } - } - - // Every 10-60 seconds, generate new unk2a8 values - aibot->unk2a4 -= g_Vars.lvupdate240_60; - - if (aibot->unk2a4 < 0) { - aibot->unk2a4 = PALDOWN(600) + random() % PALDOWN(3000); - - for (i = 0; i < 6; i++) { - if (aibot->simulant->difficulty == SIMDIFF_MEAT) { - aibot->unk2a8[i] = random() % 200 - 100; // -100 to +100 - } else if (aibot->simulant->difficulty == SIMDIFF_EASY) { - aibot->unk2a8[i] = random() % 100 - 50; // -50 to +50 - } else { - aibot->unk2a8[i] = random() % 30 - 15; // -15 to +15 - } - } - } - - // Every 2-12 seconds, generate a new random value which is used as a factor - // in various aibot logic. - aibot->randttl60 -= g_Vars.lvupdate240_60; - - if (aibot->randttl60 < 0) { - aibot->randttl60 = PALDOWN(120) + random() % PALDOWN(600); - aibot->rand = random(); - } - - if (aibot->unk0c4[1] == 0 - && aibot->unk0c4[0] == 0 - && aibot->unk04d[1] <= 0 - && aibot->unk04d[0] <= 0 - && aibot->unk0e0[1] <= 0 - && aibot->unk0e0[0] <= 0 - && aibot->skrocket == NULL) { - if (chr->myaction == MA_AIBOTDOWNLOAD) { - keepcurrentweapon = true; - } - - if (!keepcurrentweapon && aibot->simulant->base.simtype == SIMTYPE_PEACE) { - newfuncnum = FUNC_SECONDARY; - keepcurrentweapon = true; - } - - if (!keepcurrentweapon) { - s32 bestscore = 0; - s32 score1; - s32 score2; - s32 uVar10; - s32 j; - - for (i = -1; i < aibot->maxitems; i++) { - s32 weaponnum = -1; - struct invitem *item = NULL; - - if (i < 0) { - weaponnum = WEAPON_UNARMED; - } else { - item = &aibot->items[i]; - - if (item->type == INVITEMTYPE_WEAP || item->type == INVITEMTYPE_DUAL) { - weaponnum = item->type_weap.weapon1; - } - } - - if (weaponnum >= 0) { - for (j = 1; j >= 0; j--) { - if (j != FUNC_PRIMARY) { - uVar10 = g_AibotWeaponPreferences[weaponnum].unk04_01; - } else { - uVar10 = g_AibotWeaponPreferences[weaponnum].unk04_00; - } - - if (uVar10 != 0 && func0f198e78(chr, weaponnum, j)) { - func0f198db4(chr, weaponnum, j, 1, item && item->type == INVITEMTYPE_DUAL, &score1, &score2); - - if (score1 >= bestscore) { - if (!weaponGetAmmoTypeByFunction(weaponnum, j) - || aibotGetAmmoQuantityByWeapon(aibot, weaponnum, j, true) > 0) { - bestscore = score1; - newweaponnum = weaponnum; - newfuncnum = j; - } - } - } - } - } - } - } - - // Consider setting knives to secondary function (throw) - if (newweaponnum == WEAPON_COMBATKNIFE - && aibotGetAmmoQuantityByWeapon(aibot, WEAPON_COMBATKNIFE, FUNC_SECONDARY, true) >= 2 - && chr->target != -1 - && chr->aibot->playerdistances[mpPlayerGetIndex(chrGetTargetProp(chr)->chr)] > 200 - && chr->aibot->playerdistances[mpPlayerGetIndex(chrGetTargetProp(chr)->chr)] < 1500) { - newfuncnum = FUNC_SECONDARY; - } - - // Consider setting Phoenix and SuperDragon to their explosive functions - if (aibot->simulant->base.simtype == SIMTYPE_ROCKET) { - if (newweaponnum == WEAPON_PHOENIX && aibotGetAmmoQuantityByWeapon(aibot, WEAPON_PHOENIX, FUNC_SECONDARY, true) > 0) { - newfuncnum = FUNC_SECONDARY; - } else if (newweaponnum == WEAPON_SUPERDRAGON && aibotGetAmmoQuantityByWeapon(aibot, WEAPON_SUPERDRAGON, FUNC_SECONDARY, true) > 0) { - newfuncnum = FUNC_SECONDARY; - } - } - - aibotSwitchToWeapon(chr, newweaponnum, newfuncnum); - } -} - -bool aibotSwitchToWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum) -{ - struct invitem *item; - struct weaponfunc *func; - struct aibot *aibot; - s32 i; - s32 modelnum; - bool changinggun; - bool changingfunc; - - if (!chr || !chr->aibot) { - return false; - } - - aibot = chr->aibot; - - if (weaponnum == WEAPON_BRIEFCASE2) { - return true; - } - - // If changing to anything other than unarmed, make sure the aibot has the - // weapon in their inventory. Otherwise make them switch to unarmed. - if (weaponnum != WEAPON_UNARMED) { - item = aibotGetInvItem(chr, weaponnum); - - if (!item) { - weaponnum = WEAPON_UNARMED; - funcnum = FUNC_PRIMARY; - } - } - - changinggun = weaponnum != aibot->weaponnum; - changingfunc = funcnum != aibot->gunfunc; - - if (changinggun) { - aibot->unk0cc = PALDOWN(60); - - for (i = 0; i < 2; i++) { - aibot->unk0c4[i] = 0; - aibot->unk04d[i] = 0; - aibot->unk0e0[i] = 0; - - if (chr->weapons_held[i]) { - chr->weapons_held[i]->obj->hidden |= OBJHFLAG_REAPABLE; - chr->weapons_held[i] = NULL; - } - } - } - - // Return any loaded ammo to reserve - if (changingfunc || changinggun) { - for (i = 0; i < 2; i++) { - if (aibot->loadedammo[i] > 0) { - aibotGiveAmmoByWeapon(aibot, aibot->weaponnum, aibot->gunfunc, aibot->loadedammo[i]); - aibot->loadedammo[i] = 0; - } - } - } - - // Assign new weapon and function - aibot->gunfunc = funcnum; - aibot->weaponnum = weaponnum; - - // Load ammo from reserve into new weapon - if (changingfunc && !changinggun) { - for (i = 0; i < 2; i++) { - if (chr->weapons_held[i]) { - aibotReloadWeapon(chr, i, false); - } - } - } - - if (!changinggun) { - modelnum = weaponGetModel(weaponnum); - - // @dangerous: item is uninitialised if weaponnum is WEAPON_UNARMED. - // This function assumes weaponGetModel returns a negative value for - // WEAPON_UNARMED which is a dangerous assumption to make, but correct. - if (modelnum >= 0 && item && item->type == INVITEMTYPE_DUAL && chr->weapons_held[1] == NULL) { - chrGiveWeapon(chr, modelnum, weaponnum, OBJFLAG_WEAPON_LEFTHANDED); - aibotReloadWeapon(chr, HAND_LEFT, false); - } - } - - func = weaponGetFunctionById(weaponnum, funcnum); - - aibot->iscloserangeweapon = func && func->type == INVENTORYFUNCTYPE_CLOSE; - - for (i = 0; i < 2; i++) { - if (chr->weapons_held[i]) { - chr->weapons_held[i]->weapon->gunfunc = chr->aibot->gunfunc; - } - } - - return true; -} - -void func0f19978c(struct chrdata *chr, s32 weaponnum, u8 arg2) -{ - s32 i; - - if (!chr || !chr->aibot) { - return; - } - - for (i = 0; i < chr->aibot->maxitems; i++) { - struct invitem *item = &chr->aibot->items[i]; - - if (item->type == -1) { - continue; - } - - if ((item->type == INVITEMTYPE_WEAP || item->type == INVITEMTYPE_DUAL) - && (arg2 || weaponnum == item->type_weap.weapon1)) { - if (weaponHasFlag(item->type_weap.weapon1, WEAPONFLAG_08000000) == 0 - || (g_Vars.normmplayerisrunning - && g_MpSetup.scenario == MPSCENARIO_HACKERCENTRAL - && item->type_weap.weapon1 == WEAPON_DATAUPLINK)) { - s32 modelnum = weaponGetModel(item->type_weap.weapon1); - - if (modelnum > 0) { - struct prop *prop = weaponCreateForChr(chr, modelnum, item->type_weap.weapon1, OBJFLAG_WEAPON_AICANNOTUSE, NULL, NULL); - - if (prop) { - objSetDropped(prop, DROPTYPE_DEFAULT); - objDrop(prop, true); - - if (item->type_weap.weapon1 == WEAPON_BRIEFCASE2) { - func0f187288(chr, prop); - } - } - } - } - } - } - - if ((arg2 && weaponnum >= WEAPON_FALCON2) - || (!arg2 && weaponnum == chr->aibot->weaponnum)) { - aibotSwitchToWeapon(chr, WEAPON_UNARMED, FUNC_PRIMARY); - } - - chr->hidden |= CHRHFLAG_00000001; - - if (!arg2) { - aibotRemoveInvItem(chr, weaponnum); - } -} - -void func0f199964(struct chrdata *chr, u32 weaponnum) -{ - func0f19978c(chr, weaponnum, true); -} - -void func0f199984(struct chrdata *chr, u32 weaponnum) -{ - func0f19978c(chr, weaponnum, false); -} diff --git a/src/game/game_19aa80.c b/src/game/game_19aa80.c index 10247b9dc..82e2aba14 100644 --- a/src/game/game_19aa80.c +++ b/src/game/game_19aa80.c @@ -6,7 +6,7 @@ #include "game/atan2f.h" #include "game/game_127910.h" #include "game/mplayer/setup.h" -#include "game/game_190260.h" +#include "game/bot.h" #include "game/game_19aa80.h" #include "game/training/training.h" #include "game/lang.h" @@ -895,7 +895,7 @@ void mpPerformSanityChecks(void) // Reset player handicaps for (i = 0; i < 4; i++) { if (g_MpSetup.chrslots & (1 << i)) { - g_MpPlayers[i].handicap = 0x80; + g_PlayerConfigsArray[i].handicap = 0x80; numplayers++; } } @@ -905,9 +905,9 @@ void mpPerformSanityChecks(void) g_MpSetup.chrslots &= 0x000f; for (i = 0; i != MAX_SIMULANTS; i++) { - g_MpSimulants[i].difficulty = g_MpSimulantDifficultiesPerNumPlayers[i * 4 + numplayers - 1]; + g_BotConfigsArray[i].difficulty = g_MpSimulantDifficultiesPerNumPlayers[i * 4 + numplayers - 1]; - if (g_MpSimulants[i].difficulty != SIMDIFF_DISABLED) { + if (g_BotConfigsArray[i].difficulty != BOTDIFF_DISABLED) { g_MpSetup.chrslots |= 1 << (i + 4); } } @@ -1285,10 +1285,10 @@ void mpForceUnlockConfigFeatures(struct mpconfig *config, u8 *array, s32 len, s3 s32 i; for (i = 0; i < 8; i++) { - s32 simtype = mpGetSimTypeIndex(config->simulants[i].type, SIMDIFF_NORMAL); + s32 simtype = mpGetSimTypeIndex(config->simulants[i].type, BOTDIFF_NORMAL); if (simtype >= 0) { - featurenum = g_MpSimulantTypes[simtype].requirefeature; + featurenum = g_BotProfiles[simtype].requirefeature; if (featurenum) { index = mpForceUnlockFeature(featurenum, array, index, len); @@ -1299,7 +1299,7 @@ void mpForceUnlockConfigFeatures(struct mpconfig *config, u8 *array, s32 len, s3 simtype = mpGetSimTypeIndex(0, config->simulants[i].difficulties[numplayers]); if (simtype >= 0) { - featurenum = g_MpSimulantTypes[simtype].requirefeature; + featurenum = g_BotProfiles[simtype].requirefeature; if (featurenum) { index = mpForceUnlockFeature(featurenum, array, index, len); @@ -1326,7 +1326,7 @@ void mpForceUnlockConfigFeatures(struct mpconfig *config, u8 *array, s32 len, s3 #if VERSION >= VERSION_NTSC_1_0 if (challengeindex >= 25) { - index = mpForceUnlockFeature(MPFEATURE_SIMDIFF_DARK, array, index, len); + index = mpForceUnlockFeature(MPFEATURE_BOTDIFF_DARK, array, index, len); } else if (challengeindex >= 20) { index = mpForceUnlockFeature(MPFEATURE_STAGE_CARPARK, array, index, len); } else if (challengeindex >= 15) { @@ -1364,10 +1364,10 @@ void mpForceUnlockSimulantFeatures(void) for (i = 0; i < 8; i++) { // Force unlock the simulant type - s32 simtypeindex = mpGetSimTypeIndex(g_MpSimulants[i].base.simtype, SIMDIFF_NORMAL); + s32 simtypeindex = mpGetSimTypeIndex(g_BotConfigsArray[i].type, BOTDIFF_NORMAL); if (simtypeindex >= 0) { - s32 featurenum = g_MpSimulantTypes[simtypeindex].requirefeature; + s32 featurenum = g_BotProfiles[simtypeindex].requirefeature; if (featurenum) { index = mpForceUnlockFeature(featurenum, g_MpFeaturesForceUnlocked, index, ARRAYCOUNT(g_MpFeaturesForceUnlocked)); @@ -1375,10 +1375,10 @@ void mpForceUnlockSimulantFeatures(void) } // Force unlock the simulant difficulty - simtypeindex = mpGetSimTypeIndex(SIMTYPE_GENERAL, g_MpSimulants[i].difficulty); + simtypeindex = mpGetSimTypeIndex(BOTTYPE_GENERAL, g_BotConfigsArray[i].difficulty); if (simtypeindex >= 0) { - s32 featurenum = g_MpSimulantTypes[simtypeindex].requirefeature; + s32 featurenum = g_BotProfiles[simtypeindex].requirefeature; if (featurenum) { index = mpForceUnlockFeature(featurenum, g_MpFeaturesForceUnlocked, index, ARRAYCOUNT(g_MpFeaturesForceUnlocked)); @@ -1390,8 +1390,8 @@ void mpForceUnlockSimulantFeatures(void) } // Force unlock the simulant's body - if (g_MpSimulants[i].base.mpbodynum < ARRAYCOUNT(g_MpBodies)) { - s32 featurenum = g_MpBodies[g_MpSimulants[i].base.mpbodynum].requirefeature; + if (g_BotConfigsArray[i].base.mpbodynum < ARRAYCOUNT(g_MpBodies)) { + s32 featurenum = g_MpBodies[g_BotConfigsArray[i].base.mpbodynum].requirefeature; if (featurenum) { index = mpForceUnlockFeature(featurenum, g_MpFeaturesForceUnlocked, index, ARRAYCOUNT(g_MpFeaturesForceUnlocked)); @@ -1399,8 +1399,8 @@ void mpForceUnlockSimulantFeatures(void) } // Force unlock the simulant's head - if (g_MpSimulants[i].base.mpheadnum < ARRAYCOUNT(g_MpHeads)) { - s32 featurenum = g_MpHeads[g_MpSimulants[i].base.mpheadnum].requirefeature; + if (g_BotConfigsArray[i].base.mpheadnum < ARRAYCOUNT(g_MpHeads)) { + s32 featurenum = g_MpHeads[g_BotConfigsArray[i].base.mpheadnum].requirefeature; if (featurenum) { index = mpForceUnlockFeature(featurenum, g_MpFeaturesForceUnlocked, index, ARRAYCOUNT(g_MpFeaturesForceUnlocked)); @@ -1441,7 +1441,7 @@ void func0f19c1cc(void) mpSetLock(MPLOCKTYPE_CHALLENGE, 5); for (i = 0; i < 4; i++) { - g_MpPlayers[i].base.team = 0; + g_PlayerConfigsArray[i].base.team = 0; } } diff --git a/src/game/lv.c b/src/game/lv.c index bc007086e..e553cbdbc 100644 --- a/src/game/lv.c +++ b/src/game/lv.c @@ -396,8 +396,8 @@ void lvInit(s32 stagenum) if (g_Vars.mplayerisrunning == false) { g_Vars.playerstats[0].mpindex = 4; - g_MpPlayers[4].base.contpad1 = 0; - g_MpPlayers[4].base.contpad2 = 1; + g_PlayerConfigsArray[4].contpad1 = 0; + g_PlayerConfigsArray[4].contpad2 = 1; } for (i = 0; i != ARRAYCOUNT(g_Vars.playerstats); i++) { @@ -8211,8 +8211,8 @@ void lvTick(void) } } - for (i = 0; i < g_MpNumPlayers; i++) { - if (g_MpPlayerChrs[i]->actiontype == ACT_DIE) { + for (i = 0; i < g_MpNumChrs; i++) { + if (g_MpAllChrPtrs[i]->actiontype == ACT_DIE) { numdying++; } } diff --git a/src/game/menu/items.c b/src/game/menu/items.c index d69d28b45..fe76fa45a 100644 --- a/src/game/menu/items.c +++ b/src/game/menu/items.c @@ -10868,7 +10868,7 @@ Gfx *menuRenderItemPlayerStats(Gfx *gdl, struct menurendercontext *context) s32 y; u32 maincolour; s32 playernum = g_MpSelectedPlayersForStats[g_MpPlayerNum]; - struct mpchr *mpchr; + struct mpchrconfig *mpchr; u32 selectioncolour; s32 textheight; s32 textwidth; @@ -10880,9 +10880,9 @@ Gfx *menuRenderItemPlayerStats(Gfx *gdl, struct menurendercontext *context) s32 ypos = 0; if (playernum < 4) { - mpchr = &g_MpPlayers[playernum].base; + mpchr = &g_PlayerConfigsArray[playernum].base; } else { - mpchr = &g_MpSimulants[playernum - 4].base; + mpchr = &g_BotConfigsArray[playernum - 4].base; } gdl = func0f153628(gdl); @@ -11035,12 +11035,12 @@ Gfx *menuRenderItemPlayerStats(Gfx *gdl, struct menurendercontext *context) for (i = 0; i < 12; i++) { if (g_MpSetup.chrslots & (1 << i)) { - struct mpchr *loopmpchr; + struct mpchrconfig *loopmpchr; if (i < 4) { - loopmpchr = &g_MpPlayers[i].base; + loopmpchr = &g_PlayerConfigsArray[i].base; } else { - loopmpchr = &g_MpSimulants[i - 4].base; + loopmpchr = &g_BotConfigsArray[i - 4].base; } if (i != playernum) { diff --git a/src/game/mplayer/ingame.c b/src/game/mplayer/ingame.c index 8508bfe88..f788c0ec4 100644 --- a/src/game/mplayer/ingame.c +++ b/src/game/mplayer/ingame.c @@ -51,9 +51,9 @@ s32 mpStatsForPlayerDropdownHandler(s32 operation, struct menuitem *item, union for (a1 = 0; a1 < 12; a1++) { if (g_MpSetup.chrslots & (1 << a1)) { if (a1 < 4) { - name = g_MpPlayers[a1].base.name; + name = g_PlayerConfigsArray[a1].base.name; } else { - name = g_MpSimulants[a1 - 4].base.name; + name = g_BotConfigsArray[a1 - 4].base.name; } if (v0 == data->list.value) { @@ -219,9 +219,9 @@ char *mpMenuTitleStatsFor(struct menudialog *dialog) char *name; if (g_MpSelectedPlayersForStats[g_MpPlayerNum] < 4) { - name = g_MpPlayers[g_MpSelectedPlayersForStats[g_MpPlayerNum]].base.name; + name = g_PlayerConfigsArray[g_MpSelectedPlayersForStats[g_MpPlayerNum]].base.name; } else { - name = g_MpSimulants[g_MpSelectedPlayersForStats[g_MpPlayerNum] - 4].base.name; + name = g_BotConfigsArray[g_MpSelectedPlayersForStats[g_MpPlayerNum] - 4].base.name; } // "Stats for %s" @@ -409,13 +409,13 @@ char *mpMenuTextPlacementWithSuffix(struct menuitem *item) L_MPMENU_275, // "12th" }; - return langGet(suffixes[g_MpPlayers[g_MpPlayerNum].base.placement]); + return langGet(suffixes[g_PlayerConfigsArray[g_MpPlayerNum].base.placement]); } s32 mpPlacementMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data) { if (operation == MENUOP_GETCOLOUR) { - if (g_MpPlayers[g_MpPlayerNum].base.placement == 0) { // winner + if (g_PlayerConfigsArray[g_MpPlayerNum].base.placement == 0) { // winner data->label.colour2 = colourBlend(data->label.colour2, 0xffff00ff, func0f006b08(40) * 255); } } @@ -434,7 +434,7 @@ s32 mpAwardsMenuHandler(s32 operation, struct menuitem *item, union handlerdata u32 colour; for (i = 0; i < 4; i++) { - if (g_MpPlayers[g_MpPlayerNum].medals & (1 << i)) { + if (g_PlayerConfigsArray[g_MpPlayerNum].medals & (1 << i)) { switch (i) { case 0: colour = 0xff7f7fff; break; // killmaster - red case 1: colour = 0xbfbf00ff; break; // headshot - yellow @@ -487,7 +487,7 @@ s32 mpAwardsMenuHandler(s32 operation, struct menuitem *item, union handlerdata s32 mpPlayerTitleMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data) { if (operation == MENUOP_GETCOLOUR) { - if (g_MpPlayers[g_MpPlayerNum].title != g_MpPlayers[g_MpPlayerNum].newtitle) { + if (g_PlayerConfigsArray[g_MpPlayerNum].title != g_PlayerConfigsArray[g_MpPlayerNum].newtitle) { data->label.colour2 = colourBlend(data->label.colour2, 0xffff00ff, func0f006b08(40) * 255); } } @@ -497,7 +497,7 @@ s32 mpPlayerTitleMenuHandler(s32 operation, struct menuitem *item, union handler char *mpMenuTextPlayerTitle(s32 arg0) { - return langGet(L_MISC_185 + g_MpPlayers[g_MpPlayerNum].title); + return langGet(L_MISC_185 + g_PlayerConfigsArray[g_MpPlayerNum].title); } #if VERSION >= VERSION_NTSC_1_0 @@ -510,10 +510,10 @@ s32 mpConfirmPlayerNameHandler(s32 operation, struct menuitem *item, union handl case MENUOP_GETTEXT: i = 0; - while (g_MpPlayers[g_MpPlayerNum].base.name[i] != '\n' - && g_MpPlayers[g_MpPlayerNum].base.name[i] != '\0' + while (g_PlayerConfigsArray[g_MpPlayerNum].base.name[i] != '\n' + && g_PlayerConfigsArray[g_MpPlayerNum].base.name[i] != '\0' && i <= 10) { - name[i] = g_MpPlayers[g_MpPlayerNum].base.name[i]; + name[i] = g_PlayerConfigsArray[g_MpPlayerNum].base.name[i]; i++; } @@ -526,15 +526,15 @@ s32 mpConfirmPlayerNameHandler(s32 operation, struct menuitem *item, union handl i = 0; while (i <= 10 && name[i] != '\0') { - g_MpPlayers[g_MpPlayerNum].base.name[i] = name[i]; + g_PlayerConfigsArray[g_MpPlayerNum].base.name[i] = name[i]; i++; } - g_MpPlayers[g_MpPlayerNum].base.name[i] = '\n'; + g_PlayerConfigsArray[g_MpPlayerNum].base.name[i] = '\n'; i++; while (i <= 10) { - g_MpPlayers[g_MpPlayerNum].base.name[i] = '\0'; + g_PlayerConfigsArray[g_MpPlayerNum].base.name[i] = '\0'; i++; } break; @@ -603,10 +603,10 @@ void mpPushEndscreenDialog(u32 arg0, u32 playernum) } #if VERSION >= VERSION_NTSC_1_0 - if ((g_MpPlayers[g_MpPlayerNum].options & OPTION_ASKEDSAVEPLAYER) == 0 - && g_MpPlayers[g_MpPlayerNum].fileguid.fileid == 0 - && g_MpPlayers[g_MpPlayerNum].fileguid.deviceserial == 0) { - g_MpPlayers[g_MpPlayerNum].options |= OPTION_ASKEDSAVEPLAYER; + if ((g_PlayerConfigsArray[g_MpPlayerNum].options & OPTION_ASKEDSAVEPLAYER) == 0 + && g_PlayerConfigsArray[g_MpPlayerNum].fileguid.fileid == 0 + && g_PlayerConfigsArray[g_MpPlayerNum].fileguid.deviceserial == 0) { + g_PlayerConfigsArray[g_MpPlayerNum].options |= OPTION_ASKEDSAVEPLAYER; menuPushDialog(&g_MpEndscreenSavePlayerMenuDialog); } #endif diff --git a/src/game/mplayer/mpaicommands.c b/src/game/mplayer/mpaicommands.c index 3ef1f60e7..f8e88a990 100644 --- a/src/game/mplayer/mpaicommands.c +++ b/src/game/mplayer/mpaicommands.c @@ -1,7 +1,7 @@ #include #include "constants.h" #include "game/chr/chrai.h" -#include "game/game_190260.h" +#include "game/bot.h" #include "bss.h" #include "data.h" #include "types.h" @@ -11,7 +11,7 @@ */ bool aiMpInitSimulants(void) { - mpInitSimulants(); + botSpawnAll(); g_Vars.aioffset += 2; return false; } diff --git a/src/game/mplayer/mplayer.c b/src/game/mplayer/mplayer.c index 2b331b6bd..3b22920c4 100644 --- a/src/game/mplayer/mplayer.c +++ b/src/game/mplayer/mplayer.c @@ -29,13 +29,13 @@ #include "types.h" // bss -struct chrdata *g_MpPlayerChrs[MAX_MPCHRS]; -struct mpchr *var800ac500[MAX_MPCHRS]; -s32 g_MpNumPlayers; +struct chrdata *g_MpAllChrPtrs[MAX_MPCHRS]; +struct mpchrconfig *g_MpAllChrConfigPtrs[MAX_MPCHRS]; +s32 g_MpNumChrs; u32 var800ac534; -struct mpsim g_MpSimulants[MAX_SIMULANTS]; +struct mpbotconfig g_BotConfigsArray[MAX_SIMULANTS]; u8 g_MpSimulantDifficultiesPerNumPlayers[32]; -struct mpplayer g_MpPlayers[6]; +struct mpplayerconfig g_PlayerConfigsArray[6]; u8 g_AmBotCommands[16]; struct mpsetup g_MpSetup; struct bossfile g_BossFile; @@ -120,7 +120,7 @@ f32 mpHandicapToDamageScale(u8 value) return tmp * tmp * 3 - 2; } -void func0f187838(struct mpchr *mpchr) +void func0f187838(struct mpchrconfig *mpchr) { s32 i = 0; @@ -174,7 +174,7 @@ void mpInit(void) s32 i; s32 mpindex = 0; - g_MpNumPlayers = 0; + g_MpNumChrs = 0; g_Vars.mplayerisrunning = true; if (g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0) { @@ -190,74 +190,74 @@ void mpInit(void) } if (g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0) { - struct mpplayer tmp; + struct mpplayerconfig tmp; - tmp = g_MpPlayers[4]; - g_MpPlayers[4] = g_MpPlayers[0]; - g_MpPlayers[0] = tmp; + tmp = g_PlayerConfigsArray[4]; + g_PlayerConfigsArray[4] = g_PlayerConfigsArray[0]; + g_PlayerConfigsArray[0] = tmp; - tmp = g_MpPlayers[5]; - g_MpPlayers[5] = g_MpPlayers[1]; - g_MpPlayers[1] = tmp; + tmp = g_PlayerConfigsArray[5]; + g_PlayerConfigsArray[5] = g_PlayerConfigsArray[1]; + g_PlayerConfigsArray[1] = tmp; // Player index 0 g_Vars.playerstats[0].mpindex = 0; - g_MpPlayers[0].base.contpad1 = 0; - g_MpPlayers[0].base.contpad2 = 2; + g_PlayerConfigsArray[0].contpad1 = 0; + g_PlayerConfigsArray[0].contpad2 = 2; if ((g_Vars.coopplayernum >= 0 && g_Vars.coopradaron) || (g_Vars.antiplayernum >= 0 && g_Vars.antiradaron)) { - g_MpPlayers[0].base.displayoptions |= MPDISPLAYOPTION_RADAR; + g_PlayerConfigsArray[0].base.displayoptions |= MPDISPLAYOPTION_RADAR; } else { - g_MpPlayers[0].base.displayoptions &= ~MPDISPLAYOPTION_RADAR; + g_PlayerConfigsArray[0].base.displayoptions &= ~MPDISPLAYOPTION_RADAR; } // Player index 1 g_Vars.playerstats[1].mpindexu32 = 1; - g_MpPlayers[1].base.contpad1 = 1; - g_MpPlayers[1].base.contpad2 = 3; + g_PlayerConfigsArray[1].contpad1 = 1; + g_PlayerConfigsArray[1].contpad2 = 3; if ((g_Vars.coopplayernum >= 0 && g_Vars.coopradaron) || (g_Vars.antiplayernum >= 0 && g_Vars.antiradaron)) { - g_MpPlayers[1].base.displayoptions |= MPDISPLAYOPTION_RADAR; + g_PlayerConfigsArray[1].base.displayoptions |= MPDISPLAYOPTION_RADAR; } else { - g_MpPlayers[1].base.displayoptions &= ~MPDISPLAYOPTION_RADAR; + g_PlayerConfigsArray[1].base.displayoptions &= ~MPDISPLAYOPTION_RADAR; } - g_MpNumPlayers = 2; + g_MpNumChrs = 2; } else { for (i = 0; i < 4; i++) { if (g_MpSetup.chrslots & (1 << i)) { g_Vars.playerstats[mpindex].mpindex = i; - g_MpPlayers[i].base.contpad1 = i; - g_MpPlayers[i].base.contpad2 = 0; + g_PlayerConfigsArray[i].contpad1 = i; + g_PlayerConfigsArray[i].contpad2 = 0; - mpCalculatePlayerTitle(&g_MpPlayers[i]); + mpCalculatePlayerTitle(&g_PlayerConfigsArray[i]); - g_MpPlayers[i].newtitle = g_MpPlayers[i].title; - g_MpNumPlayers++; + g_PlayerConfigsArray[i].newtitle = g_PlayerConfigsArray[i].title; + g_MpNumChrs++; mpindex++; } } } for (i = 0; i != 12; i++) { - struct mpchr *mpchr; + struct mpchrconfig *mpchr; if (i < 4) { - mpchr = &g_MpPlayers[i].base; + mpchr = &g_PlayerConfigsArray[i].base; } else { - mpchr = &g_MpSimulants[i - 4].base; + mpchr = &g_BotConfigsArray[i - 4].base; } func0f187838(mpchr); #if VERSION >= VERSION_NTSC_1_0 - g_MpPlayerChrs[i] = NULL; + g_MpAllChrPtrs[i] = NULL; #endif } @@ -335,19 +335,19 @@ void mpCalculateTeamIsOnlyAi(void) s32 i; s32 j; - // Iterate simulants, which go after players in the g_MpPlayerChrs array - for (i = playercount; i < g_MpNumPlayers; i++) { - if (!g_MpPlayerChrs[i]) { + // Iterate simulants, which go after players in the g_MpAllChrPtrs array + for (i = playercount; i < g_MpNumChrs; i++) { + if (!g_MpAllChrPtrs[i]) { continue; } - g_MpPlayerChrs[i]->aibot->teamisonlyai = true; + g_MpAllChrPtrs[i]->aibot->teamisonlyai = true; if (g_MpSetup.options & MPOPTION_TEAMSENABLED) { // Iterate human players for (j = 0; j < playercount; j++) { - if (g_MpPlayerChrs[i]->team == g_MpPlayerChrs[j]->team) { - g_MpPlayerChrs[i]->aibot->teamisonlyai = false; + if (g_MpAllChrPtrs[i]->team == g_MpAllChrPtrs[j]->team) { + g_MpAllChrPtrs[i]->aibot->teamisonlyai = false; break; } } @@ -357,9 +357,9 @@ void mpCalculateTeamIsOnlyAi(void) void func0f187fbc(s32 playernum) { - g_MpPlayers[playernum].base.unk18 = 80; - g_MpPlayers[playernum].base.unk1a = 80; - g_MpPlayers[playernum].base.unk1c = 75; + g_PlayerConfigsArray[playernum].base.unk18 = 80; + g_PlayerConfigsArray[playernum].base.unk1a = 80; + g_PlayerConfigsArray[playernum].base.unk1c = 75; } void func0f187fec(void) @@ -376,9 +376,9 @@ void mpPlayerSetDefaults(s32 playernum, bool autonames) func0f187fbc(playernum); - g_MpPlayers[playernum].base.controlmode = CONTROLMODE_11; + g_PlayerConfigsArray[playernum].controlmode = CONTROLMODE_11; - g_MpPlayers[playernum].options = OPTION_LOOKAHEAD + g_PlayerConfigsArray[playernum].options = OPTION_LOOKAHEAD | OPTION_SIGHTONSCREEN | OPTION_AUTOAIM | OPTION_AMMOONSCREEN @@ -388,53 +388,53 @@ void mpPlayerSetDefaults(s32 playernum, bool autonames) | OPTION_ALWAYSSHOWTARGET | OPTION_SHOWZOOMRANGE; - g_MpPlayers[playernum].handicap = 128; + g_PlayerConfigsArray[playernum].handicap = 128; switch (playernum) { case 0: default: - g_MpPlayers[playernum].base.mpbodynum = MPBODY_DARK_COMBAT; + g_PlayerConfigsArray[playernum].base.mpbodynum = MPBODY_DARK_COMBAT; break; case 1: - g_MpPlayers[playernum].base.mpbodynum = MPBODY_CASSANDRA; + g_PlayerConfigsArray[playernum].base.mpbodynum = MPBODY_CASSANDRA; break; case 2: - g_MpPlayers[playernum].base.mpbodynum = MPBODY_CARRINGTON; + g_PlayerConfigsArray[playernum].base.mpbodynum = MPBODY_CARRINGTON; break; case 3: - g_MpPlayers[playernum].base.mpbodynum = MPBODY_CILABTECH; + g_PlayerConfigsArray[playernum].base.mpbodynum = MPBODY_CILABTECH; break; } - g_MpPlayers[playernum].base.mpheadnum = mpGetMpheadnumByMpbodynum(g_MpPlayers[playernum].base.mpbodynum); - g_MpPlayers[playernum].base.displayoptions = MPDISPLAYOPTION_RADAR | MPDISPLAYOPTION_HIGHLIGHTTEAMS; - g_MpPlayers[playernum].fileguid.fileid = 0; - g_MpPlayers[playernum].fileguid.deviceserial = 0; + g_PlayerConfigsArray[playernum].base.mpheadnum = mpGetMpheadnumByMpbodynum(g_PlayerConfigsArray[playernum].base.mpbodynum); + g_PlayerConfigsArray[playernum].base.displayoptions = MPDISPLAYOPTION_RADAR | MPDISPLAYOPTION_HIGHLIGHTTEAMS; + g_PlayerConfigsArray[playernum].fileguid.fileid = 0; + g_PlayerConfigsArray[playernum].fileguid.deviceserial = 0; if (autonames) { // "Player 1" etc - sprintf(g_MpPlayers[playernum].base.name, "%s %d\n", langGet(L_MISC_437), playernum + 1); + sprintf(g_PlayerConfigsArray[playernum].base.name, "%s %d\n", langGet(L_MISC_437), playernum + 1); } else { - g_MpPlayers[playernum].base.name[0] = '\0'; + g_PlayerConfigsArray[playernum].base.name[0] = '\0'; } - g_MpPlayers[playernum].kills = 0; - g_MpPlayers[playernum].deaths = 0; - g_MpPlayers[playernum].gamesplayed = 0; - g_MpPlayers[playernum].gameswon = 0; - g_MpPlayers[playernum].gameslost = 0; - g_MpPlayers[playernum].time = 0; - g_MpPlayers[playernum].distance = 0; - g_MpPlayers[playernum].accuracy = 1000; - g_MpPlayers[playernum].damagedealt = 0; - g_MpPlayers[playernum].painreceived = 0; - g_MpPlayers[playernum].headshots = 0; - g_MpPlayers[playernum].ammoused = 0; - g_MpPlayers[playernum].accuracymedals = 0; - g_MpPlayers[playernum].headshotmedals = 0; - g_MpPlayers[playernum].killmastermedals = 0; - g_MpPlayers[playernum].survivormedals = 0; - g_MpPlayers[playernum].title = MPPLAYERTITLE_BEGINNER; + g_PlayerConfigsArray[playernum].kills = 0; + g_PlayerConfigsArray[playernum].deaths = 0; + g_PlayerConfigsArray[playernum].gamesplayed = 0; + g_PlayerConfigsArray[playernum].gameswon = 0; + g_PlayerConfigsArray[playernum].gameslost = 0; + g_PlayerConfigsArray[playernum].time = 0; + g_PlayerConfigsArray[playernum].distance = 0; + g_PlayerConfigsArray[playernum].accuracy = 1000; + g_PlayerConfigsArray[playernum].damagedealt = 0; + g_PlayerConfigsArray[playernum].painreceived = 0; + g_PlayerConfigsArray[playernum].headshots = 0; + g_PlayerConfigsArray[playernum].ammoused = 0; + g_PlayerConfigsArray[playernum].accuracymedals = 0; + g_PlayerConfigsArray[playernum].headshotmedals = 0; + g_PlayerConfigsArray[playernum].killmastermedals = 0; + g_PlayerConfigsArray[playernum].survivormedals = 0; + g_PlayerConfigsArray[playernum].title = MPPLAYERTITLE_BEGINNER; if (playernum < 4) { for (i = 0; i < 30; i++) { @@ -447,17 +447,17 @@ void mpPlayerSetDefaults(s32 playernum, bool autonames) } for (i = 0; i < 6; i++) { - g_MpPlayers[playernum].gunfuncs[i] = 0; + g_PlayerConfigsArray[playernum].gunfuncs[i] = 0; } } void func0f1881d4(s32 index) { - g_MpSimulants[index].base.name[0] = '\0'; - g_MpSimulants[index].base.mpheadnum = MPHEAD_DARK_COMBAT; - g_MpSimulants[index].base.mpbodynum = MPBODY_DARK_COMBAT; - g_MpSimulants[index].base.simtype = SIMTYPE_GENERAL; - g_MpSimulants[index].difficulty = SIMDIFF_DISABLED; + g_BotConfigsArray[index].base.name[0] = '\0'; + g_BotConfigsArray[index].base.mpheadnum = MPHEAD_DARK_COMBAT; + g_BotConfigsArray[index].base.mpbodynum = MPBODY_DARK_COMBAT; + g_BotConfigsArray[index].type = BOTTYPE_GENERAL; + g_BotConfigsArray[index].difficulty = BOTDIFF_DISABLED; } void mpSetDefaultSetup(void) @@ -516,9 +516,9 @@ void mpSetDefaultSetup(void) mpForceUnlockSimulantFeatures(); - for (i = 0; i < ARRAYCOUNT(g_MpPlayers); i++) { + for (i = 0; i < ARRAYCOUNT(g_PlayerConfigsArray); i++) { for (j = 0; j < 6; j++) { - g_MpPlayers[i].gunfuncs[j] = 0; + g_PlayerConfigsArray[i].gunfuncs[j] = 0; } } @@ -628,8 +628,8 @@ void mpSetDefaultNamesIfEmpty(void) // Player names for (i = 0; i < 4; i++) { - if (g_MpPlayers[i].base.name[0] == '\0') { - sprintf(g_MpPlayers[i].base.name, "%s %d\n", langGet(L_MISC_437), i + 1); // "Player 1" etc + if (g_PlayerConfigsArray[i].base.name[0] == '\0') { + sprintf(g_PlayerConfigsArray[i].base.name, "%s %d\n", langGet(L_MISC_437), i + 1); // "Player 1" etc } } } @@ -725,8 +725,8 @@ glabel mpGetPlayerRankings /* f188654: 00001825 */ or $v1,$zero,$zero /* f188658: 0011c880 */ sll $t9,$s1,0x2 /* f18865c: 0331c821 */ addu $t9,$t9,$s1 -/* f188660: 3c18800b */ lui $t8,%hi(g_MpPlayers) -/* f188664: 2718c7b8 */ addiu $t8,$t8,%lo(g_MpPlayers) +/* f188660: 3c18800b */ lui $t8,%hi(g_PlayerConfigsArray) +/* f188664: 2718c7b8 */ addiu $t8,$t8,%lo(g_PlayerConfigsArray) /* f188668: 0019c940 */ sll $t9,$t9,0x5 /* f18866c: 1000000a */ b .L0f188698 /* f188670: 03389021 */ addu $s2,$t9,$t8 @@ -736,8 +736,8 @@ glabel mpGetPlayerRankings /* f18867c: 000e7080 */ sll $t6,$t6,0x2 /* f188680: 01d17023 */ subu $t6,$t6,$s1 /* f188684: 000e7080 */ sll $t6,$t6,0x2 -/* f188688: 3c19800b */ lui $t9,%hi(g_MpSimulants) -/* f18868c: 2739c538 */ addiu $t9,$t9,%lo(g_MpSimulants) +/* f188688: 3c19800b */ lui $t9,%hi(g_BotConfigsArray) +/* f18868c: 2739c538 */ addiu $t9,$t9,%lo(g_BotConfigsArray) /* f188690: 25cffed0 */ addiu $t7,$t6,-304 /* f188694: 01f99021 */ addu $s2,$t7,$t9 .L0f188698: @@ -1169,14 +1169,14 @@ glabel func0f188930 /* f188950: afb1001c */ sw $s1,0x1c($sp) /* f188954: afb00018 */ sw $s0,0x18($sp) /* f188958: 3c14800b */ lui $s4,%hi(g_MpSetup) -/* f18895c: 3c15800b */ lui $s5,%hi(g_MpPlayers) +/* f18895c: 3c15800b */ lui $s5,%hi(g_PlayerConfigsArray) /* f188960: 00809825 */ or $s3,$a0,$zero /* f188964: afbf003c */ sw $ra,0x3c($sp) /* f188968: afa50064 */ sw $a1,0x64($sp) /* f18896c: 00008825 */ or $s1,$zero,$zero /* f188970: 00009025 */ or $s2,$zero,$zero /* f188974: afa00050 */ sw $zero,0x50($sp) -/* f188978: 26b5c7b8 */ addiu $s5,$s5,%lo(g_MpPlayers) +/* f188978: 26b5c7b8 */ addiu $s5,$s5,%lo(g_PlayerConfigsArray) /* f18897c: 2694cb88 */ addiu $s4,$s4,%lo(g_MpSetup) /* f188980: 00008025 */ or $s0,$zero,$zero /* f188984: 241600a0 */ addiu $s6,$zero,0xa0 @@ -1201,8 +1201,8 @@ glabel func0f188930 /* f1889c8: 00094880 */ sll $t1,$t1,0x2 /* f1889cc: 01304823 */ subu $t1,$t1,$s0 /* f1889d0: 00094880 */ sll $t1,$t1,0x2 -/* f1889d4: 3c0b800b */ lui $t3,%hi(g_MpSimulants) -/* f1889d8: 256bc538 */ addiu $t3,$t3,%lo(g_MpSimulants) +/* f1889d4: 3c0b800b */ lui $t3,%hi(g_BotConfigsArray) +/* f1889d8: 256bc538 */ addiu $t3,$t3,%lo(g_BotConfigsArray) /* f1889dc: 252afed0 */ addiu $t2,$t1,-304 /* f1889e0: 014b2021 */ addu $a0,$t2,$t3 /* f1889e4: 908c0011 */ lbu $t4,0x11($a0) @@ -3764,7 +3764,7 @@ u32 var800874e8 = 0x500e500f; u32 var800874ec = 0x50100000; #if VERSION >= VERSION_NTSC_1_0 -void mpCalculatePlayerTitle(struct mpplayer *mpplayer) +void mpCalculatePlayerTitle(struct mpplayerconfig *mpplayer) { const u32 tiers[] = { 2, 4, 8, 16, 28, 60, 100, 150, 210, 300 }; s32 tallies[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -4272,26 +4272,26 @@ u32 table_0x2d678[] = { }; // 2d74c -struct mpsimulanttype g_MpSimulantTypes[] = { - // type, difficulty, name, body, require feature - { SIMTYPE_GENERAL, SIMDIFF_MEAT, L_MISC_088, MPBODY_DD_GUARD, 0 }, - { SIMTYPE_GENERAL, SIMDIFF_EASY, L_MISC_089, MPBODY_DD_SECGUARD, 0 }, - { SIMTYPE_GENERAL, SIMDIFF_NORMAL, L_MISC_090, MPBODY_DD_SHOCK_INF, 0 }, - { SIMTYPE_GENERAL, SIMDIFF_HARD, L_MISC_091, MPBODY_DDSHOCK, MPFEATURE_SIMDIFF_HARD }, - { SIMTYPE_GENERAL, SIMDIFF_PERFECT, L_MISC_092, MPBODY_STRIPES, MPFEATURE_SIMDIFF_PERFECT }, - { SIMTYPE_GENERAL, SIMDIFF_DARK, L_MISC_093, MPBODY_MOORE, MPFEATURE_SIMDIFF_DARK }, - { SIMTYPE_PEACE, SIMDIFF_NORMAL, L_MISC_094, MPBODY_DD_LABTECH, 0 }, - { SIMTYPE_SHIELD, SIMDIFF_NORMAL, L_MISC_095, MPBODY_G5_SWAT_GUARD, 0 }, - { SIMTYPE_ROCKET, SIMDIFF_NORMAL, L_MISC_096, MPBODY_G5_GUARD, 0 }, - { SIMTYPE_KAZE, SIMDIFF_NORMAL, L_MISC_097, MPBODY_PRES_SECURITY, 0 }, - { SIMTYPE_FIST, SIMDIFF_NORMAL, L_MISC_098, MPBODY_PELAGIC_GUARD, 0 }, - { SIMTYPE_PREY, SIMDIFF_NORMAL, L_MISC_099, MPBODY_DDSHOCK, 0 }, - { SIMTYPE_COWARD, SIMDIFF_NORMAL, L_MISC_100, MPBODY_PRESIDENT, 0 }, - { SIMTYPE_JUDGE, SIMDIFF_NORMAL, L_MISC_101, MPBODY_STEWARD, 0 }, - { SIMTYPE_FEUD, SIMDIFF_NORMAL, L_MISC_102, MPBODY_NSA_LACKEY, 0 }, - { SIMTYPE_SPEED, SIMDIFF_NORMAL, L_MISC_103, MPBODY_MRBLONDE, 0 }, - { SIMTYPE_TURTLE, SIMDIFF_NORMAL, L_MISC_104, MPBODY_CARRINGTON, 0 }, - { SIMTYPE_VENGE, SIMDIFF_NORMAL, L_MISC_105, MPBODY_ALASKAN_GUARD, 0 }, +struct botprofile g_BotProfiles[] = { + // type, difficulty, name, body, require feature + { BOTTYPE_GENERAL, BOTDIFF_MEAT, L_MISC_088, MPBODY_DD_GUARD, 0 }, + { BOTTYPE_GENERAL, BOTDIFF_EASY, L_MISC_089, MPBODY_DD_SECGUARD, 0 }, + { BOTTYPE_GENERAL, BOTDIFF_NORMAL, L_MISC_090, MPBODY_DD_SHOCK_INF, 0 }, + { BOTTYPE_GENERAL, BOTDIFF_HARD, L_MISC_091, MPBODY_DDSHOCK, MPFEATURE_BOTDIFF_HARD }, + { BOTTYPE_GENERAL, BOTDIFF_PERFECT, L_MISC_092, MPBODY_STRIPES, MPFEATURE_BOTDIFF_PERFECT }, + { BOTTYPE_GENERAL, BOTDIFF_DARK, L_MISC_093, MPBODY_MOORE, MPFEATURE_BOTDIFF_DARK }, + { BOTTYPE_PEACE, BOTDIFF_NORMAL, L_MISC_094, MPBODY_DD_LABTECH, 0 }, + { BOTTYPE_SHIELD, BOTDIFF_NORMAL, L_MISC_095, MPBODY_G5_SWAT_GUARD, 0 }, + { BOTTYPE_ROCKET, BOTDIFF_NORMAL, L_MISC_096, MPBODY_G5_GUARD, 0 }, + { BOTTYPE_KAZE, BOTDIFF_NORMAL, L_MISC_097, MPBODY_PRES_SECURITY, 0 }, + { BOTTYPE_FIST, BOTDIFF_NORMAL, L_MISC_098, MPBODY_PELAGIC_GUARD, 0 }, + { BOTTYPE_PREY, BOTDIFF_NORMAL, L_MISC_099, MPBODY_DDSHOCK, 0 }, + { BOTTYPE_COWARD, BOTDIFF_NORMAL, L_MISC_100, MPBODY_PRESIDENT, 0 }, + { BOTTYPE_JUDGE, BOTDIFF_NORMAL, L_MISC_101, MPBODY_STEWARD, 0 }, + { BOTTYPE_FEUD, BOTDIFF_NORMAL, L_MISC_102, MPBODY_NSA_LACKEY, 0 }, + { BOTTYPE_SPEED, BOTDIFF_NORMAL, L_MISC_103, MPBODY_MRBLONDE, 0 }, + { BOTTYPE_TURTLE, BOTDIFF_NORMAL, L_MISC_104, MPBODY_CARRINGTON, 0 }, + { BOTTYPE_VENGE, BOTDIFF_NORMAL, L_MISC_105, MPBODY_ALASKAN_GUARD, 0 }, }; // 2d7dc @@ -4516,9 +4516,9 @@ glabel var7f1b8db0 /* f18a680: 25cf0001 */ addiu $t7,$t6,0x1 /* f18a684: 448f2000 */ mtc1 $t7,$f4 /* f18a688: 3c14800a */ lui $s4,%hi(g_Vars) -/* f18a68c: 3c1e800b */ lui $s8,%hi(g_MpPlayers) +/* f18a68c: 3c1e800b */ lui $s8,%hi(g_PlayerConfigsArray) /* f18a690: 468021a0 */ cvt.s.w $f6,$f4 -/* f18a694: 27dec7b8 */ addiu $s8,$s8,%lo(g_MpPlayers) +/* f18a694: 27dec7b8 */ addiu $s8,$s8,%lo(g_PlayerConfigsArray) /* f18a698: 26949fc0 */ addiu $s4,$s4,%lo(g_Vars) /* f18a69c: 27b301fc */ addiu $s3,$sp,0x1fc /* f18a6a0: 2417000c */ addiu $s7,$zero,0xc @@ -4587,8 +4587,8 @@ glabel var7f1b8db0 /* f18a784: 000f7880 */ sll $t7,$t7,0x2 /* f18a788: 01e37823 */ subu $t7,$t7,$v1 /* f18a78c: 000f7880 */ sll $t7,$t7,0x2 -/* f18a790: 3c19800b */ lui $t9,%hi(g_MpSimulants) -/* f18a794: 2739c538 */ addiu $t9,$t9,%lo(g_MpSimulants) +/* f18a790: 3c19800b */ lui $t9,%hi(g_BotConfigsArray) +/* f18a794: 2739c538 */ addiu $t9,$t9,%lo(g_BotConfigsArray) /* f18a798: 25f8fed0 */ addiu $t8,$t7,-304 /* f18a79c: 03191021 */ addu $v0,$t8,$t9 /* f18a7a0: 00447021 */ addu $t6,$v0,$a0 @@ -4998,8 +4998,8 @@ glabel var7f1b8db0 /* f18ad88: 000f7880 */ sll $t7,$t7,0x2 /* f18ad8c: 01e37823 */ subu $t7,$t7,$v1 /* f18ad90: 000f7880 */ sll $t7,$t7,0x2 -/* f18ad94: 3c0d800b */ lui $t5,%hi(g_MpSimulants) -/* f18ad98: 25adc538 */ addiu $t5,$t5,%lo(g_MpSimulants) +/* f18ad94: 3c0d800b */ lui $t5,%hi(g_BotConfigsArray) +/* f18ad98: 25adc538 */ addiu $t5,$t5,%lo(g_BotConfigsArray) /* f18ad9c: 25f8fed0 */ addiu $t8,$t7,-304 /* f18ada0: 030d1021 */ addu $v0,$t8,$t5 .L0f18ada4: @@ -5068,8 +5068,8 @@ glabel var7f1b8db0 /* f18ae80: 000d6880 */ sll $t5,$t5,0x2 /* f18ae84: 01a36823 */ subu $t5,$t5,$v1 /* f18ae88: 000d6880 */ sll $t5,$t5,0x2 -/* f18ae8c: 3c19800b */ lui $t9,%hi(g_MpSimulants) -/* f18ae90: 2739c538 */ addiu $t9,$t9,%lo(g_MpSimulants) +/* f18ae8c: 3c19800b */ lui $t9,%hi(g_BotConfigsArray) +/* f18ae90: 2739c538 */ addiu $t9,$t9,%lo(g_BotConfigsArray) /* f18ae94: 25b8fed0 */ addiu $t8,$t5,-304 /* f18ae98: 03191021 */ addu $v0,$t8,$t9 /* f18ae9c: 8c4f0020 */ lw $t7,0x20($v0) @@ -5103,8 +5103,8 @@ glabel var7f1b8db0 /* f18aef8: 16cffdec */ bne $s6,$t7,.L0f18a6ac /* f18aefc: 26940080 */ addiu $s4,$s4,0x80 .L0f18af00: -/* f18af00: 3c1e800b */ lui $s8,%hi(g_MpPlayers) -/* f18af04: 27dec7b8 */ addiu $s8,$s8,%lo(g_MpPlayers) +/* f18af00: 3c1e800b */ lui $s8,%hi(g_PlayerConfigsArray) +/* f18af04: 27dec7b8 */ addiu $s8,$s8,%lo(g_PlayerConfigsArray) /* f18af08: 2417000c */ addiu $s7,$zero,0xc /* f18af0c: 0fc4a24b */ jal setCurrentPlayerNum /* f18af10: 8fa402f0 */ lw $a0,0x2f0($sp) @@ -5656,12 +5656,12 @@ glabel var7f1b8db0 /* f18b6d4: 14200072 */ bnez $at,.L0f18b8a0 /* f18b6d8: 3c0800ff */ lui $t0,0xff /* f18b6dc: 3c07800b */ lui $a3,%hi(g_MpSetup+0x16) -/* f18b6e0: 3c0b800b */ lui $t3,%hi(g_MpSimulants) +/* f18b6e0: 3c0b800b */ lui $t3,%hi(g_BotConfigsArray) /* f18b6e4: 00003025 */ or $a2,$zero,$zero /* f18b6e8: 2409ffff */ addiu $t1,$zero,-1 /* f18b6ec: 3508ffff */ ori $t0,$t0,0xffff /* f18b6f0: 240affff */ addiu $t2,$zero,-1 -/* f18b6f4: 256bc538 */ addiu $t3,$t3,%lo(g_MpSimulants) +/* f18b6f4: 256bc538 */ addiu $t3,$t3,%lo(g_BotConfigsArray) /* f18b6f8: 94e7cb9e */ lhu $a3,%lo(g_MpSetup+0x16)($a3) /* f18b6fc: 00002825 */ or $a1,$zero,$zero /* f18b700: 240c004c */ addiu $t4,$zero,0x4c @@ -5743,8 +5743,8 @@ glabel var7f1b8db0 /* f18b804: 0019c880 */ sll $t9,$t9,0x2 /* f18b808: 0329c823 */ subu $t9,$t9,$t1 /* f18b80c: 0019c880 */ sll $t9,$t9,0x2 -/* f18b810: 3c0e800b */ lui $t6,%hi(g_MpSimulants) -/* f18b814: 25cec538 */ addiu $t6,$t6,%lo(g_MpSimulants) +/* f18b810: 3c0e800b */ lui $t6,%hi(g_BotConfigsArray) +/* f18b814: 25cec538 */ addiu $t6,$t6,%lo(g_BotConfigsArray) /* f18b818: 272ffed0 */ addiu $t7,$t9,-304 /* f18b81c: 01ee1021 */ addu $v0,$t7,$t6 .L0f18b820: @@ -5773,8 +5773,8 @@ glabel var7f1b8db0 /* f18b86c: 000d6880 */ sll $t5,$t5,0x2 /* f18b870: 01aa6823 */ subu $t5,$t5,$t2 /* f18b874: 000d6880 */ sll $t5,$t5,0x2 -/* f18b878: 3c19800b */ lui $t9,%hi(g_MpSimulants) -/* f18b87c: 2739c538 */ addiu $t9,$t9,%lo(g_MpSimulants) +/* f18b878: 3c19800b */ lui $t9,%hi(g_BotConfigsArray) +/* f18b87c: 2739c538 */ addiu $t9,$t9,%lo(g_BotConfigsArray) /* f18b880: 25b8fed0 */ addiu $t8,$t5,-304 /* f18b884: 03191021 */ addu $v0,$t8,$t9 .L0f18b888: @@ -7403,15 +7403,15 @@ glabel func0f18bd90 /* f18bda0: afb6002c */ sw $s6,0x2c($sp) /* f18bda4: afb40024 */ sw $s4,0x24($sp) /* f18bda8: afb30020 */ sw $s3,0x20($sp) -/* f18bdac: 3c12800b */ lui $s2,%hi(g_MpPlayers) -/* f18bdb0: 3c15800b */ lui $s5,%hi(g_MpSimulants) +/* f18bdac: 3c12800b */ lui $s2,%hi(g_PlayerConfigsArray) +/* f18bdb0: 3c15800b */ lui $s5,%hi(g_BotConfigsArray) /* f18bdb4: afbf0034 */ sw $ra,0x34($sp) /* f18bdb8: afb10018 */ sw $s1,0x18($sp) /* f18bdbc: afb00014 */ sw $s0,0x14($sp) /* f18bdc0: afa40038 */ sw $a0,0x38($sp) /* f18bdc4: afa5003c */ sw $a1,0x3c($sp) -/* f18bdc8: 26b5c538 */ addiu $s5,$s5,%lo(g_MpSimulants) -/* f18bdcc: 2652c7b8 */ addiu $s2,$s2,%lo(g_MpPlayers) +/* f18bdc8: 26b5c538 */ addiu $s5,$s5,%lo(g_BotConfigsArray) +/* f18bdcc: 2652c7b8 */ addiu $s2,$s2,%lo(g_PlayerConfigsArray) /* f18bdd0: 241300a0 */ addiu $s3,$zero,0xa0 /* f18bdd4: 2414000c */ addiu $s4,$zero,0xc /* f18bdd8: 2416004c */ addiu $s6,$zero,0x4c @@ -8231,8 +8231,8 @@ glabel func0f18c794 /* f18c7cc: 00054880 */ sll $t1,$a1,0x2 /* f18c7d0: 0005c880 */ sll $t9,$a1,0x2 /* f18c7d4: 0325c821 */ addu $t9,$t9,$a1 -/* f18c7d8: 3c08800b */ lui $t0,%hi(g_MpPlayers) -/* f18c7dc: 2508c7b8 */ addiu $t0,$t0,%lo(g_MpPlayers) +/* f18c7d8: 3c08800b */ lui $t0,%hi(g_PlayerConfigsArray) +/* f18c7dc: 2508c7b8 */ addiu $t0,$t0,%lo(g_PlayerConfigsArray) /* f18c7e0: 0019c940 */ sll $t9,$t9,0x5 /* f18c7e4: 03e00008 */ jr $ra /* f18c7e8: 03281021 */ addu $v0,$t9,$t0 @@ -8241,8 +8241,8 @@ glabel func0f18c794 /* f18c7f0: 00094880 */ sll $t1,$t1,0x2 /* f18c7f4: 01254823 */ subu $t1,$t1,$a1 /* f18c7f8: 00094880 */ sll $t1,$t1,0x2 -/* f18c7fc: 3c0b800b */ lui $t3,%hi(g_MpSimulants) -/* f18c800: 256bc538 */ addiu $t3,$t3,%lo(g_MpSimulants) +/* f18c7fc: 3c0b800b */ lui $t3,%hi(g_BotConfigsArray) +/* f18c800: 256bc538 */ addiu $t3,$t3,%lo(g_BotConfigsArray) /* f18c804: 252afed0 */ addiu $t2,$t1,-304 /* f18c808: 03e00008 */ jr $ra /* f18c80c: 014b1021 */ addu $v0,$t2,$t3 @@ -8303,11 +8303,11 @@ s32 mpGetNumChrs(void) GLOBAL_ASM( glabel func0f18c8b8 /* f18c8b8: 3c05800b */ lui $a1,%hi(g_MpSetup+0x16) -/* f18c8bc: 3c0b800b */ lui $t3,%hi(g_MpSimulants) -/* f18c8c0: 3c08800b */ lui $t0,%hi(g_MpPlayers) +/* f18c8bc: 3c0b800b */ lui $t3,%hi(g_BotConfigsArray) +/* f18c8c0: 3c08800b */ lui $t0,%hi(g_PlayerConfigsArray) /* f18c8c4: 00001825 */ or $v1,$zero,$zero -/* f18c8c8: 2508c7b8 */ addiu $t0,$t0,%lo(g_MpPlayers) -/* f18c8cc: 256bc538 */ addiu $t3,$t3,%lo(g_MpSimulants) +/* f18c8c8: 2508c7b8 */ addiu $t0,$t0,%lo(g_PlayerConfigsArray) +/* f18c8cc: 256bc538 */ addiu $t3,$t3,%lo(g_BotConfigsArray) /* f18c8d0: 94a5cb9e */ lhu $a1,%lo(g_MpSetup+0x16)($a1) /* f18c8d4: 240c004c */ addiu $t4,$zero,0x4c /* f18c8d8: 240a000c */ addiu $t2,$zero,0xc @@ -8384,14 +8384,14 @@ glabel func0f18c984 /* f18c9c0: afa0005c */ sw $zero,0x5c($sp) /* f18c9c4: 2415004c */ addiu $s5,$zero,0x4c /* f18c9c8: 02150019 */ multu $s0,$s5 -/* f18c9cc: 3c188008 */ lui $t8,%hi(g_MpSimulantTypes) -/* f18c9d0: 2718772c */ addiu $t8,$t8,%lo(g_MpSimulantTypes) +/* f18c9cc: 3c188008 */ lui $t8,%hi(g_BotProfiles) +/* f18c9d0: 2718772c */ addiu $t8,$t8,%lo(g_BotProfiles) /* f18c9d4: 001278c0 */ sll $t7,$s2,0x3 /* f18c9d8: 01f83821 */ addu $a3,$t7,$t8 /* f18c9dc: 90e80001 */ lbu $t0,0x1($a3) -/* f18c9e0: 3c14800b */ lui $s4,%hi(g_MpSimulants) +/* f18c9e0: 3c14800b */ lui $s4,%hi(g_BotConfigsArray) /* f18c9e4: 90f90000 */ lbu $t9,0x0($a3) -/* f18c9e8: 2694c538 */ addiu $s4,$s4,%lo(g_MpSimulants) +/* f18c9e8: 2694c538 */ addiu $s4,$s4,%lo(g_BotConfigsArray) /* f18c9ec: 3c0a800b */ lui $t2,%hi(g_MpSimulantDifficultiesPerNumPlayers) /* f18c9f0: 00007012 */ mflo $t6 /* f18c9f4: 028ef021 */ addu $s8,$s4,$t6 @@ -8425,10 +8425,10 @@ glabel func0f18c984 /* f18ca60: 0c004c4c */ jal strcpy /* f18ca64: afa70040 */ sw $a3,0x40($sp) /* f18ca68: a3d10011 */ sb $s1,0x11($s8) -/* f18ca6c: 3c11800b */ lui $s1,%hi(g_MpPlayers) +/* f18ca6c: 3c11800b */ lui $s1,%hi(g_PlayerConfigsArray) /* f18ca70: 3c168008 */ lui $s6,%hi(table_0x2d678) /* f18ca74: 26d67658 */ addiu $s6,$s6,%lo(table_0x2d678) -/* f18ca78: 2631c7b8 */ addiu $s1,$s1,%lo(g_MpPlayers) +/* f18ca78: 2631c7b8 */ addiu $s1,$s1,%lo(g_PlayerConfigsArray) /* f18ca7c: 24170035 */ addiu $s7,$zero,0x35 /* f18ca80: 2413000c */ addiu $s3,$zero,0xc /* f18ca84: 241200a0 */ addiu $s2,$zero,0xa0 @@ -8501,8 +8501,8 @@ glabel func0f18cb60 /* f18cb64: 01c47021 */ addu $t6,$t6,$a0 /* f18cb68: 000e7080 */ sll $t6,$t6,0x2 /* f18cb6c: 01c47023 */ subu $t6,$t6,$a0 -/* f18cb70: 3c0f800b */ lui $t7,%hi(g_MpSimulants) -/* f18cb74: 25efc538 */ addiu $t7,$t7,%lo(g_MpSimulants) +/* f18cb70: 3c0f800b */ lui $t7,%hi(g_BotConfigsArray) +/* f18cb74: 25efc538 */ addiu $t7,$t7,%lo(g_BotConfigsArray) /* f18cb78: 000e7080 */ sll $t6,$t6,0x2 /* f18cb7c: 01cf1021 */ addu $v0,$t6,$t7 /* f18cb80: 3c19800b */ lui $t9,%hi(g_MpSimulantDifficultiesPerNumPlayers) @@ -8537,7 +8537,7 @@ s32 mpGetNumSimulants(void) void mpRemoveSimulant(s32 index) { g_MpSetup.chrslots &= ~(1 << (index + 4)); - g_MpSimulants[index].base.name[0] = '\0'; + g_BotConfigsArray[index].base.name[0] = '\0'; func0f1881d4(index); func0f18cddc(); } @@ -8614,21 +8614,21 @@ s32 mpGetSimTypeIndex(s32 type, s32 difficulty) { s32 i; - if (type == SIMTYPE_GENERAL) { - for (i = 0; i < ARRAYCOUNT(g_MpSimulantTypes); i++) { - if (g_MpSimulantTypes[i].difficulty == difficulty) { + if (type == BOTTYPE_GENERAL) { + for (i = 0; i < ARRAYCOUNT(g_BotProfiles); i++) { + if (g_BotProfiles[i].difficulty == difficulty) { break; } } } else { - for (i = 0; i < ARRAYCOUNT(g_MpSimulantTypes); i++) { - if (g_MpSimulantTypes[i].type == type) { + for (i = 0; i < ARRAYCOUNT(g_BotProfiles); i++) { + if (g_BotProfiles[i].type == type) { break; } } } - if (i >= ARRAYCOUNT(g_MpSimulantTypes)) { + if (i >= ARRAYCOUNT(g_BotProfiles)) { i = -1; } @@ -8655,10 +8655,10 @@ glabel func0f18cddc /* f18ce14: 0043082b */ sltu $at,$v0,$v1 /* f18ce18: 1420fffd */ bnez $at,.L0f18ce10 /* f18ce1c: ac40fffc */ sw $zero,-0x4($v0) -/* f18ce20: 3c17800b */ lui $s7,%hi(g_MpSimulants) +/* f18ce20: 3c17800b */ lui $s7,%hi(g_BotConfigsArray) /* f18ce24: 3c16800b */ lui $s6,%hi(g_MpSetup) /* f18ce28: 26d6cb88 */ addiu $s6,$s6,%lo(g_MpSetup) -/* f18ce2c: 26f7c538 */ addiu $s7,$s7,%lo(g_MpSimulants) +/* f18ce2c: 26f7c538 */ addiu $s7,$s7,%lo(g_BotConfigsArray) /* f18ce30: 24110004 */ addiu $s1,$zero,0x4 /* f18ce34: 241e004c */ addiu $s8,$zero,0x4c /* f18ce38: 27b50068 */ addiu $s5,$sp,0x68 @@ -8705,8 +8705,8 @@ glabel func0f18cddc /* f18cec8: 0044082b */ sltu $at,$v0,$a0 /* f18cecc: 5420fff7 */ bnezl $at,.L0f18ceac /* f18ced0: 8c4c0000 */ lw $t4,0x0($v0) -/* f18ced4: 3c148008 */ lui $s4,%hi(g_MpSimulantTypes) -/* f18ced8: 2694772c */ addiu $s4,$s4,%lo(g_MpSimulantTypes) +/* f18ced4: 3c148008 */ lui $s4,%hi(g_BotProfiles) +/* f18ced8: 2694772c */ addiu $s4,$s4,%lo(g_BotProfiles) /* f18cedc: 24110004 */ addiu $s1,$zero,0x4 /* f18cee0: 27b30050 */ addiu $s3,$sp,0x50 /* f18cee4: 96cd0016 */ lhu $t5,0x16($s6) @@ -8788,8 +8788,8 @@ s32 mpPlayerGetIndex(struct chrdata *chr) { s32 i; - for (i = 0; i < g_MpNumPlayers; i++) { - if (g_MpPlayerChrs[i] == chr) { + for (i = 0; i < g_MpNumChrs; i++) { + if (g_MpAllChrPtrs[i] == chr) { return i; } } @@ -8799,8 +8799,8 @@ s32 mpPlayerGetIndex(struct chrdata *chr) struct chrdata *mpGetChrFromPlayerIndex(s32 index) { - if (index >= 0 && index < g_MpNumPlayers) { - return g_MpPlayerChrs[index]; + if (index >= 0 && index < g_MpNumChrs) { + return g_MpAllChrPtrs[index]; } return NULL; @@ -8811,13 +8811,13 @@ s32 func0f18d074(s32 index) s32 i; for (i = 0; i < 4; i++) { - if (&g_MpPlayers[i].base == var800ac500[index]) { + if (&g_PlayerConfigsArray[i].base == g_MpAllChrConfigPtrs[index]) { return i; } } for (i = 0; i < MAX_SIMULANTS; i++) { - if (&g_MpSimulants[i].base == var800ac500[index]) { + if (&g_BotConfigsArray[i].base == g_MpAllChrConfigPtrs[index]) { return i + 4; } } @@ -8830,14 +8830,14 @@ s32 func0f18d0e8(s32 arg0) s32 i; if (arg0 < 4) { - for (i = 0; i < g_MpNumPlayers; i++) { - if (var800ac500[i] == &g_MpPlayers[arg0].base) { + for (i = 0; i < g_MpNumChrs; i++) { + if (g_MpAllChrConfigPtrs[i] == &g_PlayerConfigsArray[arg0].base) { return i; } } } else { - for (i = 0; i < g_MpNumPlayers; i++) { - if (var800ac500[i] == &g_MpSimulants[arg0 - 4].base) { + for (i = 0; i < g_MpNumChrs; i++) { + if (g_MpAllChrConfigPtrs[i] == &g_BotConfigsArray[arg0 - 4].base) { return i; } } @@ -8858,7 +8858,7 @@ void mpplayerfileLoadGunFuncs(struct savebuffer *buffer, s32 playernum) numbits = 8; } - g_MpPlayers[playernum].gunfuncs[i] = savebufferReadBits(buffer, numbits); + g_PlayerConfigsArray[playernum].gunfuncs[i] = savebufferReadBits(buffer, numbits); bitsremaining -= 8; i++; @@ -8877,7 +8877,7 @@ void mpplayerfileSaveGunFuncs(struct savebuffer *buffer, s32 playernum) numbits = 8; } - savebufferOr(buffer, g_MpPlayers[playernum].gunfuncs[i], numbits); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].gunfuncs[i], numbits); bitsremaining -= 8; i++; @@ -8891,16 +8891,16 @@ void mpplayerfileLoadWad(s32 playernum, struct savebuffer *buffer, s32 arg2) s32 i; s32 j; - savebufferReadString(buffer, g_MpPlayers[playernum].base.name, 1); - g_MpPlayers[playernum].time = savebufferReadBits(buffer, 28); + savebufferReadString(buffer, g_PlayerConfigsArray[playernum].base.name, 1); + g_PlayerConfigsArray[playernum].time = savebufferReadBits(buffer, 28); if (arg2 != 0) { - g_MpPlayers[playernum].base.mpheadnum = savebufferReadBits(buffer, 7); - g_MpPlayers[playernum].base.mpbodynum = savebufferReadBits(buffer, 7); + g_PlayerConfigsArray[playernum].base.mpheadnum = savebufferReadBits(buffer, 7); + g_PlayerConfigsArray[playernum].base.mpbodynum = savebufferReadBits(buffer, 7); savebufferReadGuid(buffer, &guid); - if (g_MpPlayers[playernum].base.mpheadnum >= mpGetNumHeads2()) { + if (g_PlayerConfigsArray[playernum].base.mpheadnum >= mpGetNumHeads2()) { if (guid.fileid != 0 && guid.deviceserial != 0) { if (g_MenuData.unk668 < 11) { g_MenuData.unk668++; @@ -8910,7 +8910,7 @@ void mpplayerfileLoadWad(s32 playernum, struct savebuffer *buffer, s32 arg2) g_MenuData.unk5d8[g_MenuData.unk668].unk09 = g_MpPlayerNum; } } else { - g_MpPlayers[playernum].base.mpheadnum = MPHEAD_DARK_COMBAT; + g_PlayerConfigsArray[playernum].base.mpheadnum = MPHEAD_DARK_COMBAT; } } } else { @@ -8919,24 +8919,24 @@ void mpplayerfileLoadWad(s32 playernum, struct savebuffer *buffer, s32 arg2) savebufferReadGuid(buffer, &guid); } - g_MpPlayers[playernum].base.displayoptions = savebufferReadBits(buffer, 8); - g_MpPlayers[playernum].kills = savebufferReadBits(buffer, 20); - g_MpPlayers[playernum].deaths = savebufferReadBits(buffer, 20); - g_MpPlayers[playernum].gamesplayed = savebufferReadBits(buffer, 19); - g_MpPlayers[playernum].gameswon = savebufferReadBits(buffer, 19); - g_MpPlayers[playernum].gameslost = savebufferReadBits(buffer, 19); - g_MpPlayers[playernum].distance = savebufferReadBits(buffer, 25); - g_MpPlayers[playernum].accuracy = savebufferReadBits(buffer, 10); - g_MpPlayers[playernum].damagedealt = savebufferReadBits(buffer, 26); - g_MpPlayers[playernum].painreceived = savebufferReadBits(buffer, 26); - g_MpPlayers[playernum].headshots = savebufferReadBits(buffer, 20); - g_MpPlayers[playernum].ammoused = savebufferReadBits(buffer, 30); - g_MpPlayers[playernum].accuracymedals = savebufferReadBits(buffer, 18); - g_MpPlayers[playernum].headshotmedals = savebufferReadBits(buffer, 18); - g_MpPlayers[playernum].killmastermedals = savebufferReadBits(buffer, 18); - g_MpPlayers[playernum].survivormedals = savebufferReadBits(buffer, 16); - g_MpPlayers[playernum].base.controlmode = savebufferReadBits(buffer, 2); - g_MpPlayers[playernum].options = savebufferReadBits(buffer, 12); + g_PlayerConfigsArray[playernum].base.displayoptions = savebufferReadBits(buffer, 8); + g_PlayerConfigsArray[playernum].kills = savebufferReadBits(buffer, 20); + g_PlayerConfigsArray[playernum].deaths = savebufferReadBits(buffer, 20); + g_PlayerConfigsArray[playernum].gamesplayed = savebufferReadBits(buffer, 19); + g_PlayerConfigsArray[playernum].gameswon = savebufferReadBits(buffer, 19); + g_PlayerConfigsArray[playernum].gameslost = savebufferReadBits(buffer, 19); + g_PlayerConfigsArray[playernum].distance = savebufferReadBits(buffer, 25); + g_PlayerConfigsArray[playernum].accuracy = savebufferReadBits(buffer, 10); + g_PlayerConfigsArray[playernum].damagedealt = savebufferReadBits(buffer, 26); + g_PlayerConfigsArray[playernum].painreceived = savebufferReadBits(buffer, 26); + g_PlayerConfigsArray[playernum].headshots = savebufferReadBits(buffer, 20); + g_PlayerConfigsArray[playernum].ammoused = savebufferReadBits(buffer, 30); + g_PlayerConfigsArray[playernum].accuracymedals = savebufferReadBits(buffer, 18); + g_PlayerConfigsArray[playernum].headshotmedals = savebufferReadBits(buffer, 18); + g_PlayerConfigsArray[playernum].killmastermedals = savebufferReadBits(buffer, 18); + g_PlayerConfigsArray[playernum].survivormedals = savebufferReadBits(buffer, 16); + g_PlayerConfigsArray[playernum].controlmode = savebufferReadBits(buffer, 2); + g_PlayerConfigsArray[playernum].options = savebufferReadBits(buffer, 12); for (i = 0; i < 30; i++) { for (j = 1; j < 5; j++) { @@ -8945,7 +8945,7 @@ void mpplayerfileLoadWad(s32 playernum, struct savebuffer *buffer, s32 arg2) } mpDetermineUnlockedFeatures(); - mpCalculatePlayerTitle(&g_MpPlayers[playernum]); + mpCalculatePlayerTitle(&g_PlayerConfigsArray[playernum]); mpplayerfileLoadGunFuncs(buffer, playernum); } @@ -8955,19 +8955,19 @@ void mpplayerfileSaveWad(s32 playernum, struct savebuffer *buffer) s32 j; u32 stack; - func0f0d55a4(buffer, g_MpPlayers[playernum].base.name); + func0f0d55a4(buffer, g_PlayerConfigsArray[playernum].base.name); - if (g_MpPlayers[playernum].time > 0x0fffffff) { // over 3106 days - g_MpPlayers[playernum].time = 0x0fffffff; + if (g_PlayerConfigsArray[playernum].time > 0x0fffffff) { // over 3106 days + g_PlayerConfigsArray[playernum].time = 0x0fffffff; } - savebufferOr(buffer, g_MpPlayers[playernum].time, 28); - savebufferOr(buffer, g_MpPlayers[playernum].base.mpheadnum, 7); - savebufferOr(buffer, g_MpPlayers[playernum].base.mpbodynum, 7); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].time, 28); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].base.mpheadnum, 7); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].base.mpbodynum, 7); - if (g_MpPlayers[playernum].base.mpheadnum >= mpGetNumHeads2()) { + if (g_PlayerConfigsArray[playernum].base.mpheadnum >= mpGetNumHeads2()) { struct fileguid guid; - phGetGuid(g_MpPlayers[playernum].base.mpheadnum - mpGetNumHeads2(), &guid); + phGetGuid(g_PlayerConfigsArray[playernum].base.mpheadnum - mpGetNumHeads2(), &guid); savebufferWriteGuid(buffer, &guid); } else { struct fileguid guid; @@ -8976,100 +8976,100 @@ void mpplayerfileSaveWad(s32 playernum, struct savebuffer *buffer) savebufferWriteGuid(buffer, &guid); } - savebufferOr(buffer, g_MpPlayers[playernum].base.displayoptions, 8); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].base.displayoptions, 8); - if (g_MpPlayers[playernum].kills > 0xfffff) { // 1,048,575 - g_MpPlayers[playernum].kills = 0xfffff; + if (g_PlayerConfigsArray[playernum].kills > 0xfffff) { // 1,048,575 + g_PlayerConfigsArray[playernum].kills = 0xfffff; } - savebufferOr(buffer, g_MpPlayers[playernum].kills, 20); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].kills, 20); - if (g_MpPlayers[playernum].deaths > 0xfffff) { // 1,048,575 - g_MpPlayers[playernum].deaths = 0xfffff; + if (g_PlayerConfigsArray[playernum].deaths > 0xfffff) { // 1,048,575 + g_PlayerConfigsArray[playernum].deaths = 0xfffff; } - savebufferOr(buffer, g_MpPlayers[playernum].deaths, 20); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].deaths, 20); - if (g_MpPlayers[playernum].gamesplayed > 0x7ffff) { // 524,287 - g_MpPlayers[playernum].gamesplayed = 0x7ffff; + if (g_PlayerConfigsArray[playernum].gamesplayed > 0x7ffff) { // 524,287 + g_PlayerConfigsArray[playernum].gamesplayed = 0x7ffff; } - savebufferOr(buffer, g_MpPlayers[playernum].gamesplayed, 19); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].gamesplayed, 19); - if (g_MpPlayers[playernum].gameswon > 0x7ffff) { // 524,287 - g_MpPlayers[playernum].gameswon = 0x7ffff; + if (g_PlayerConfigsArray[playernum].gameswon > 0x7ffff) { // 524,287 + g_PlayerConfigsArray[playernum].gameswon = 0x7ffff; } - savebufferOr(buffer, g_MpPlayers[playernum].gameswon, 19); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].gameswon, 19); - if (g_MpPlayers[playernum].gameslost > 0x7ffff) { // 524,287 - g_MpPlayers[playernum].gameslost = 0x7ffff; + if (g_PlayerConfigsArray[playernum].gameslost > 0x7ffff) { // 524,287 + g_PlayerConfigsArray[playernum].gameslost = 0x7ffff; } - savebufferOr(buffer, g_MpPlayers[playernum].gameslost, 19); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].gameslost, 19); - if (g_MpPlayers[playernum].distance > 0x1ffffff) { // 33,554,431 - g_MpPlayers[playernum].distance = 0x1ffffff; + if (g_PlayerConfigsArray[playernum].distance > 0x1ffffff) { // 33,554,431 + g_PlayerConfigsArray[playernum].distance = 0x1ffffff; } - savebufferOr(buffer, g_MpPlayers[playernum].distance, 25); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].distance, 25); - if (g_MpPlayers[playernum].accuracy > 0x3ff) { // 1023 - g_MpPlayers[playernum].accuracy = 0x3ff; + if (g_PlayerConfigsArray[playernum].accuracy > 0x3ff) { // 1023 + g_PlayerConfigsArray[playernum].accuracy = 0x3ff; } - savebufferOr(buffer, g_MpPlayers[playernum].accuracy, 10); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].accuracy, 10); - if (g_MpPlayers[playernum].damagedealt > 0x3ffffff) { // 67,108,863 - g_MpPlayers[playernum].damagedealt = 0x3ffffff; + if (g_PlayerConfigsArray[playernum].damagedealt > 0x3ffffff) { // 67,108,863 + g_PlayerConfigsArray[playernum].damagedealt = 0x3ffffff; } - savebufferOr(buffer, g_MpPlayers[playernum].damagedealt, 26); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].damagedealt, 26); - if (g_MpPlayers[playernum].painreceived > 0x3ffffff) { // 67,108,863 - g_MpPlayers[playernum].painreceived = 0x3ffffff; + if (g_PlayerConfigsArray[playernum].painreceived > 0x3ffffff) { // 67,108,863 + g_PlayerConfigsArray[playernum].painreceived = 0x3ffffff; } - savebufferOr(buffer, g_MpPlayers[playernum].painreceived, 26); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].painreceived, 26); - if (g_MpPlayers[playernum].headshots > 0xfffff) { // 1,048,575 - g_MpPlayers[playernum].headshots = 0xfffff; + if (g_PlayerConfigsArray[playernum].headshots > 0xfffff) { // 1,048,575 + g_PlayerConfigsArray[playernum].headshots = 0xfffff; } - savebufferOr(buffer, g_MpPlayers[playernum].headshots, 20); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].headshots, 20); - if (g_MpPlayers[playernum].ammoused > 0x3fffffff) { // 1,073,741,823 - g_MpPlayers[playernum].ammoused = 0x3fffffff; + if (g_PlayerConfigsArray[playernum].ammoused > 0x3fffffff) { // 1,073,741,823 + g_PlayerConfigsArray[playernum].ammoused = 0x3fffffff; } - savebufferOr(buffer, g_MpPlayers[playernum].ammoused, 30); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].ammoused, 30); - if (g_MpPlayers[playernum].accuracymedals > 0x3ffff) { // 262,143 - g_MpPlayers[playernum].accuracymedals = 0x3ffff; + if (g_PlayerConfigsArray[playernum].accuracymedals > 0x3ffff) { // 262,143 + g_PlayerConfigsArray[playernum].accuracymedals = 0x3ffff; } - savebufferOr(buffer, g_MpPlayers[playernum].accuracymedals, 18); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].accuracymedals, 18); - if (g_MpPlayers[playernum].headshotmedals > 0x3ffff) { // 262,143 - g_MpPlayers[playernum].headshotmedals = 0x3ffff; + if (g_PlayerConfigsArray[playernum].headshotmedals > 0x3ffff) { // 262,143 + g_PlayerConfigsArray[playernum].headshotmedals = 0x3ffff; } - savebufferOr(buffer, g_MpPlayers[playernum].headshotmedals, 18); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].headshotmedals, 18); - if (g_MpPlayers[playernum].killmastermedals > 0x3ffff) { // 262,143 - g_MpPlayers[playernum].killmastermedals = 0x3ffff; + if (g_PlayerConfigsArray[playernum].killmastermedals > 0x3ffff) { // 262,143 + g_PlayerConfigsArray[playernum].killmastermedals = 0x3ffff; } - savebufferOr(buffer, g_MpPlayers[playernum].killmastermedals, 18); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].killmastermedals, 18); - if (g_MpPlayers[playernum].survivormedals > 0xffff) { // 65,535 - g_MpPlayers[playernum].survivormedals = 0xffff; + if (g_PlayerConfigsArray[playernum].survivormedals > 0xffff) { // 65,535 + g_PlayerConfigsArray[playernum].survivormedals = 0xffff; } - savebufferOr(buffer, g_MpPlayers[playernum].survivormedals, 16); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].survivormedals, 16); - savebufferOr(buffer, g_MpPlayers[playernum].base.controlmode, 2); - savebufferOr(buffer, g_MpPlayers[playernum].options, 12); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].controlmode, 2); + savebufferOr(buffer, g_PlayerConfigsArray[playernum].options, 12); for (i = 0; i < 30; i++) { for (j = 1; j < 5; j++) { @@ -9106,8 +9106,8 @@ s32 mpplayerfileSave(s32 playernum, s32 device, s32 fileid, u16 deviceserial) ret = pakSaveAtGuid(device, fileid, PAKFILETYPE_MPPLAYER, buffer.bytes, &newfileid, 0); if (ret == 0) { - g_MpPlayers[playernum].fileguid.fileid = newfileid; - g_MpPlayers[playernum].fileguid.deviceserial = deviceserial; + g_PlayerConfigsArray[playernum].fileguid.fileid = newfileid; + g_PlayerConfigsArray[playernum].fileguid.deviceserial = deviceserial; return 0; } @@ -9129,13 +9129,13 @@ s32 mpplayerfileLoad(s32 playernum, s32 device, s32 fileid, u16 deviceserial) ret = pakReadBodyAtGuid(device, fileid, buffer.bytes, 0); if (ret == 0) { - g_MpPlayers[playernum].fileguid.fileid = fileid; - g_MpPlayers[playernum].fileguid.deviceserial = deviceserial; + g_PlayerConfigsArray[playernum].fileguid.fileid = fileid; + g_PlayerConfigsArray[playernum].fileguid.deviceserial = deviceserial; mpplayerfileLoadWad(playernum, &buffer, 1); func0f0d54c4(&buffer); - g_MpPlayers[playernum].handicap = 0x80; + g_PlayerConfigsArray[playernum].handicap = 0x80; return 0; } @@ -9406,8 +9406,8 @@ glabel func0f18dcec /* f18dd60: 8f210000 */ lw $at,0x0($t9) /* f18dd64: 3c09800b */ lui $t1,%hi(g_MpSimulantDifficultiesPerNumPlayers) /* f18dd68: 2537c798 */ addiu $s7,$t1,%lo(g_MpSimulantDifficultiesPerNumPlayers) -/* f18dd6c: 3c11800b */ lui $s1,%hi(g_MpSimulants) -/* f18dd70: 2631c538 */ addiu $s1,$s1,%lo(g_MpSimulants) +/* f18dd6c: 3c11800b */ lui $s1,%hi(g_BotConfigsArray) +/* f18dd70: 2631c538 */ addiu $s1,$s1,%lo(g_BotConfigsArray) /* f18dd74: 02e0a825 */ or $s5,$s7,$zero /* f18dd78: 00009825 */ or $s3,$zero,$zero /* f18dd7c: 03c0a025 */ or $s4,$s8,$zero @@ -9677,21 +9677,21 @@ void mpsetupfileLoadWad(struct savebuffer *buffer) g_MpSetup.chrslots &= 0x000f; for (i = 0; i < MAX_SIMULANTS; i++) { - g_MpSimulants[i].base.name[0] = '\0'; - g_MpSimulants[i].base.simtype = savebufferReadBits(buffer, 5); - g_MpSimulants[i].difficulty = savebufferReadBits(buffer, 3); + g_BotConfigsArray[i].base.name[0] = '\0'; + g_BotConfigsArray[i].type = savebufferReadBits(buffer, 5); + g_BotConfigsArray[i].difficulty = savebufferReadBits(buffer, 3); for (j = 0; j < 4; j++) { - g_MpSimulantDifficultiesPerNumPlayers[i * 4 + j] = g_MpSimulants[i].difficulty; + g_MpSimulantDifficultiesPerNumPlayers[i * 4 + j] = g_BotConfigsArray[i].difficulty; } - if (g_MpSimulants[i].difficulty != SIMDIFF_DISABLED) { + if (g_BotConfigsArray[i].difficulty != BOTDIFF_DISABLED) { g_MpSetup.chrslots |= 1 << (i + 4); } - g_MpSimulants[i].base.mpheadnum = savebufferReadBits(buffer, 7); - g_MpSimulants[i].base.mpbodynum = savebufferReadBits(buffer, 7); - g_MpSimulants[i].base.team = savebufferReadBits(buffer, 3); + g_BotConfigsArray[i].base.mpheadnum = savebufferReadBits(buffer, 7); + g_BotConfigsArray[i].base.mpbodynum = savebufferReadBits(buffer, 7); + g_BotConfigsArray[i].base.team = savebufferReadBits(buffer, 3); } func0f18cddc(); @@ -9707,7 +9707,7 @@ void mpsetupfileLoadWad(struct savebuffer *buffer) g_MpSetup.teamscorelimit = savebufferReadBits(buffer, 9); for (i = 0; i < 4; i++) { - g_MpPlayers[i].base.team = savebufferReadBits(buffer, 3); + g_PlayerConfigsArray[i].base.team = savebufferReadBits(buffer, 3); } mpForceUnlockSimulantFeatures(); @@ -9736,30 +9736,30 @@ void mpsetupfileSaveWad(struct savebuffer *buffer) savebufferOr(buffer, g_MpSetup.options, 21); for (i = 0; i < 8; i++) { - savebufferOr(buffer, g_MpSimulants[i].base.simtype, 5); + savebufferOr(buffer, g_BotConfigsArray[i].type, 5); if (g_MpSetup.chrslots & (1 << (i + 4))) { - savebufferOr(buffer, g_MpSimulants[i].difficulty, 3); + savebufferOr(buffer, g_BotConfigsArray[i].difficulty, 3); } else { - savebufferOr(buffer, SIMDIFF_DISABLED, 3); + savebufferOr(buffer, BOTDIFF_DISABLED, 3); } - savebufferOr(buffer, g_MpSimulants[i].base.mpheadnum, 7); + savebufferOr(buffer, g_BotConfigsArray[i].base.mpheadnum, 7); - if (g_MpSimulants[i].base.mpbodynum == 0xff) { - s32 index = mpGetSimTypeIndex(g_MpSimulants[i].base.simtype, g_MpSimulants[i].difficulty); + if (g_BotConfigsArray[i].base.mpbodynum == 0xff) { + s32 index = mpGetSimTypeIndex(g_BotConfigsArray[i].type, g_BotConfigsArray[i].difficulty); - if (index < 0 || index >= ARRAYCOUNT(g_MpSimulantTypes)) { + if (index < 0 || index >= ARRAYCOUNT(g_BotProfiles)) { index = 0; } - mpbodynum = g_MpSimulantTypes[index].body; + mpbodynum = g_BotProfiles[index].body; } else { - mpbodynum = g_MpSimulants[i].base.mpbodynum; + mpbodynum = g_BotConfigsArray[i].base.mpbodynum; } savebufferOr(buffer, mpbodynum, 7); - savebufferOr(buffer, g_MpSimulants[i].base.team, 3); + savebufferOr(buffer, g_BotConfigsArray[i].base.team, 3); } for (i = 0; i < 6; i++) { @@ -9771,7 +9771,7 @@ void mpsetupfileSaveWad(struct savebuffer *buffer) savebufferOr(buffer, g_MpSetup.teamscorelimit, 9); for (i = 0; i < 4; i++) { - savebufferOr(buffer, g_MpPlayers[i].base.team, 3); + savebufferOr(buffer, g_PlayerConfigsArray[i].base.team, 3); } } diff --git a/src/game/mplayer/scenarios.c b/src/game/mplayer/scenarios.c index 661421de7..54d6d245f 100644 --- a/src/game/mplayer/scenarios.c +++ b/src/game/mplayer/scenarios.c @@ -18,7 +18,7 @@ #include "game/mplayer/setup.h" #include "game/mplayer/scenarios.h" #include "game/radar.h" -#include "game/game_197600.h" +#include "game/botcmd.h" #include "game/game_19aa80.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" @@ -904,14 +904,14 @@ void scenarioHtbTick(void) // Check if a simulant is holding it if (g_ScenarioData.htb.token == NULL) { - for (i = PLAYERCOUNT(); i < g_MpNumPlayers; i++) { + for (i = PLAYERCOUNT(); i < g_MpNumChrs; i++) { #if VERSION >= VERSION_NTSC_1_0 - if (g_MpPlayerChrs[i]->prop && g_MpPlayerChrs[i]->aibot->unk09c_00) + if (g_MpAllChrPtrs[i]->prop && g_MpAllChrPtrs[i]->aibot->unk09c_00) #else - if (g_MpPlayerChrs[i]->aibot->unk09c_00) + if (g_MpAllChrPtrs[i]->aibot->unk09c_00) #endif { - g_ScenarioData.htb.token = g_MpPlayerChrs[i]->prop; + g_ScenarioData.htb.token = g_MpAllChrPtrs[i]->prop; break; } } @@ -941,7 +941,7 @@ void scenarioHtbCallback14(struct chrdata *chr) if (chr->aibot->unk0a0 >= PALDOWN(7200)) { sndStart(var80095200, SFX_MP_SCOREPOINT, NULL, -1, -1, -1, -1, -1); - var800ac500[mpPlayerGetIndex(chr)]->unk3e++; + g_MpAllChrConfigPtrs[mpPlayerGetIndex(chr)]->unk3e++; chr->aibot->unk0a0 = 0; } } else { @@ -953,7 +953,7 @@ void scenarioHtbCallback14(struct chrdata *chr) if (g_Vars.currentplayerstats->tokenheldtime >= PALDOWN(7200)) { sndStart(var80095200, SFX_MP_SCOREPOINT, NULL, -1, -1, -1, -1, -1); - var800ac500[g_Vars.currentplayernum]->unk3e++; + g_MpAllChrConfigPtrs[g_Vars.currentplayernum]->unk3e++; hudmsgCreateWithFlags(langGet(L_MPWEAPONS_024), HUDMSGTYPE_MPSCENARIO, HUDMSGFLAG_ONLYIFALIVE); // "1 Point!" g_Vars.currentplayerstats->tokenheldtime = 0; } @@ -1318,9 +1318,9 @@ glabel scenarioHtbCallback18 ); #endif -void scenarioHtbKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) +void scenarioHtbKill(struct mpchrconfig *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) { - struct mpchr *loopmpchr; + struct mpchrconfig *loopmpchr; s32 i; *score = 0; @@ -1332,9 +1332,9 @@ void scenarioHtbKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) *score -= mpchr->killcounts[i]; } else if (g_MpSetup.options & MPOPTION_TEAMSENABLED) { if (i < 4) { - loopmpchr = &g_MpPlayers[i].base; + loopmpchr = &g_PlayerConfigsArray[i].base; } else { - loopmpchr = &g_MpSimulants[i - 4].base; + loopmpchr = &g_BotConfigsArray[i - 4].base; } if (loopmpchr->team == mpchr->team) { @@ -1428,12 +1428,12 @@ void scenarioCtcInit(void) for (k = 0; k < MAX_MPCHRS; k++) { if (g_MpSetup.chrslots & (1 << k)) { - struct mpchr *basedata; + struct mpchrconfig *basedata; if (k < 4) { - basedata = &g_MpPlayers[k].base; + basedata = &g_PlayerConfigsArray[k].base; } else { - basedata = &g_MpSimulants[k - 4].base; + basedata = &g_BotConfigsArray[k - 4].base; } while (basedata->team >= scenarioGetMaxTeams()) { @@ -1603,8 +1603,8 @@ glabel scenarioCtcReset /* f180f64: 00116080 */ sll $t4,$s1,0x2 /* f180f68: 00115080 */ sll $t2,$s1,0x2 /* f180f6c: 01515021 */ addu $t2,$t2,$s1 -/* f180f70: 3c0b800b */ lui $t3,%hi(g_MpPlayers) -/* f180f74: 256bc7b8 */ addiu $t3,$t3,%lo(g_MpPlayers) +/* f180f70: 3c0b800b */ lui $t3,%hi(g_PlayerConfigsArray) +/* f180f74: 256bc7b8 */ addiu $t3,$t3,%lo(g_PlayerConfigsArray) /* f180f78: 000a5140 */ sll $t2,$t2,0x5 /* f180f7c: 10000009 */ b .L0f180fa4 /* f180f80: 014b8021 */ addu $s0,$t2,$t3 @@ -1613,8 +1613,8 @@ glabel scenarioCtcReset /* f180f88: 000c6080 */ sll $t4,$t4,0x2 /* f180f8c: 01916023 */ subu $t4,$t4,$s1 /* f180f90: 000c6080 */ sll $t4,$t4,0x2 -/* f180f94: 3c19800b */ lui $t9,%hi(g_MpSimulants) -/* f180f98: 2739c538 */ addiu $t9,$t9,%lo(g_MpSimulants) +/* f180f94: 3c19800b */ lui $t9,%hi(g_BotConfigsArray) +/* f180f98: 2739c538 */ addiu $t9,$t9,%lo(g_BotConfigsArray) /* f180f9c: 258dfed0 */ addiu $t5,$t4,-304 /* f180fa0: 01b98021 */ addu $s0,$t5,$t9 .L0f180fa4: @@ -2306,9 +2306,9 @@ glabel scenarioCtcReset ); #endif -void scenarioCtcKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) +void scenarioCtcKill(struct mpchrconfig *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) { - struct mpchr *loopmpchr; + struct mpchrconfig *loopmpchr; s32 i; *score = 0; @@ -2320,9 +2320,9 @@ void scenarioCtcKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) *score -= mpchr->killcounts[i]; } else { if (i < 4) { - loopmpchr = &g_MpPlayers[i].base; + loopmpchr = &g_PlayerConfigsArray[i].base; } else { - loopmpchr = &g_MpSimulants[i - 4].base; + loopmpchr = &g_BotConfigsArray[i - 4].base; } if (loopmpchr->team == mpchr->team) { @@ -3828,14 +3828,14 @@ glabel var7f1b8950 /* f1822f8: 00009025 */ or $s2,$zero,$zero /* f1822fc: 0c004241 */ jal sndStart /* f182300: e7a60014 */ swc1 $f6,0x14($sp) -/* f182304: 3c03800b */ lui $v1,%hi(g_MpNumPlayers) -/* f182308: 8c63c530 */ lw $v1,%lo(g_MpNumPlayers)($v1) -/* f18230c: 3c10800b */ lui $s0,%hi(g_MpPlayerChrs) -/* f182310: 2610c4d0 */ addiu $s0,$s0,%lo(g_MpPlayerChrs) +/* f182304: 3c03800b */ lui $v1,%hi(g_MpNumChrs) +/* f182308: 8c63c530 */ lw $v1,%lo(g_MpNumChrs)($v1) +/* f18230c: 3c10800b */ lui $s0,%hi(g_MpAllChrPtrs) +/* f182310: 2610c4d0 */ addiu $s0,$s0,%lo(g_MpAllChrPtrs) /* f182314: 1860001e */ blez $v1,.L0f182390 /* f182318: 00002825 */ or $a1,$zero,$zero -/* f18231c: 3c11800b */ lui $s1,%hi(var800ac500) -/* f182320: 2631c500 */ addiu $s1,$s1,%lo(var800ac500) +/* f18231c: 3c11800b */ lui $s1,%hi(g_MpAllChrConfigPtrs) +/* f182320: 2631c500 */ addiu $s1,$s1,%lo(g_MpAllChrConfigPtrs) .L0f182324: /* f182324: 8e0d0000 */ lw $t5,0x0($s0) /* f182328: 91a40125 */ lbu $a0,0x125($t5) @@ -3857,8 +3857,8 @@ glabel var7f1b8950 /* f182368: 252a0001 */ addiu $t2,$t1,0x1 /* f18236c: a44a003e */ sh $t2,0x3e($v0) .L0f182370: -/* f182370: 3c03800b */ lui $v1,%hi(g_MpNumPlayers) -/* f182374: 8c63c530 */ lw $v1,%lo(g_MpNumPlayers)($v1) +/* f182370: 3c03800b */ lui $v1,%hi(g_MpNumChrs) +/* f182374: 8c63c530 */ lw $v1,%lo(g_MpNumChrs)($v1) /* f182378: 26520001 */ addiu $s2,$s2,0x1 /* f18237c: 24a50004 */ addiu $a1,$a1,0x0004 /* f182380: 0243082a */ slt $at,$s2,$v1 @@ -3868,8 +3868,8 @@ glabel var7f1b8950 .L0f182390: /* f182390: 1860001b */ blez $v1,.L0f182400 /* f182394: 8e91028c */ lw $s1,0x28c($s4) -/* f182398: 3c10800b */ lui $s0,%hi(g_MpPlayerChrs) -/* f18239c: 2610c4d0 */ addiu $s0,$s0,%lo(g_MpPlayerChrs) +/* f182398: 3c10800b */ lui $s0,%hi(g_MpAllChrPtrs) +/* f18239c: 2610c4d0 */ addiu $s0,$s0,%lo(g_MpAllChrPtrs) /* f1823a0: 8e020000 */ lw $v0,0x0($s0) .L0f1823a4: /* f1823a4: 8c4b02d4 */ lw $t3,0x2d4($v0) @@ -3889,8 +3889,8 @@ glabel var7f1b8950 /* f1823dc: 0fc377e9 */ jal hudmsgCreateWithFlags /* f1823e0: 24060001 */ addiu $a2,$zero,0x1 .L0f1823e4: -/* f1823e4: 3c0d800b */ lui $t5,%hi(g_MpNumPlayers) -/* f1823e8: 8dadc530 */ lw $t5,%lo(g_MpNumPlayers)($t5) +/* f1823e4: 3c0d800b */ lui $t5,%hi(g_MpNumChrs) +/* f1823e8: 8dadc530 */ lw $t5,%lo(g_MpNumChrs)($t5) /* f1823ec: 26520001 */ addiu $s2,$s2,0x1 /* f1823f0: 26100004 */ addiu $s0,$s0,0x4 /* f1823f4: 024d082a */ slt $at,$s2,$t5 @@ -4617,9 +4617,9 @@ glabel scenarioKohCallback18 ); #endif -void scenarioKohKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) +void scenarioKohKill(struct mpchrconfig *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) { - struct mpchr *loopmpchr; + struct mpchrconfig *loopmpchr; s32 i; *score = 0; @@ -4631,9 +4631,9 @@ void scenarioKohKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) *score -= mpchr->killcounts[i]; } else { if (i < 4) { - loopmpchr = &g_MpPlayers[i].base; + loopmpchr = &g_PlayerConfigsArray[i].base; } else { - loopmpchr = &g_MpSimulants[i - 4].base; + loopmpchr = &g_BotConfigsArray[i - 4].base; } if (loopmpchr->team == mpchr->team) { @@ -5331,9 +5331,9 @@ void scenarioHtmTick(void) // Check if a simulant is holding it if (g_ScenarioData.htm.uplink == NULL) { - for (i = PLAYERCOUNT(); i < g_MpNumPlayers; i++) { - if (g_MpPlayerChrs[i]->aibot->unk04c_05) { - g_ScenarioData.htm.uplink = g_MpPlayerChrs[i]->prop; + for (i = PLAYERCOUNT(); i < g_MpNumChrs; i++) { + if (g_MpAllChrPtrs[i]->aibot->unk04c_05) { + g_ScenarioData.htm.uplink = g_MpAllChrPtrs[i]->prop; break; } } @@ -6492,9 +6492,9 @@ glabel scenarioHtmCallback18 ); #endif -void scenarioHtmKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) +void scenarioHtmKill(struct mpchrconfig *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) { - struct mpchr *loopmpchr; + struct mpchrconfig *loopmpchr; s32 i; s32 index; @@ -6511,9 +6511,9 @@ void scenarioHtmKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) *score -= mpchr->killcounts[i]; } else if (g_MpSetup.options & MPOPTION_TEAMSENABLED) { if (i < 4) { - loopmpchr = &g_MpPlayers[i].base; + loopmpchr = &g_PlayerConfigsArray[i].base; } else { - loopmpchr = &g_MpSimulants[i - 4].base; + loopmpchr = &g_BotConfigsArray[i - 4].base; } if (loopmpchr->team == mpchr->team) { @@ -6962,8 +6962,8 @@ glabel scenarioPacChooseVictims /* f184418: a440001e */ sh $zero,0x1e($v0) /* f18441c: 1443fffd */ bne $v0,$v1,.L0f184414 /* f184420: a4400036 */ sh $zero,0x36($v0) -/* f184424: 3c13800b */ lui $s3,%hi(g_MpNumPlayers) -/* f184428: 2673c530 */ addiu $s3,$s3,%lo(g_MpNumPlayers) +/* f184424: 3c13800b */ lui $s3,%hi(g_MpNumChrs) +/* f184428: 2673c530 */ addiu $s3,$s3,%lo(g_MpNumChrs) /* f18442c: 8e640000 */ lw $a0,0x0($s3) /* f184430: 00008825 */ or $s1,$zero,$zero /* f184434: 1880001f */ blez $a0,.L0f1844b4 @@ -7038,9 +7038,9 @@ glabel scenarioPacChooseVictims // // i = 0; // -// while (i < g_MpNumPlayers) { +// while (i < g_MpNumChrs) { // bool isnew = true; -// s32 victimplayernum = random() % g_MpNumPlayers; +// s32 victimplayernum = random() % g_MpNumChrs; // // for (j = 0; j < i; j++) { // if (g_ScenarioData.pac.victims[j] == victimplayernum) { @@ -7055,7 +7055,7 @@ glabel scenarioPacChooseVictims // } // } // -// for (i = 0; i < g_MpNumPlayers; i++) { +// for (i = 0; i < g_MpNumChrs; i++) { // // This loop probably printed debug messages // } //} @@ -7092,11 +7092,11 @@ glabel scenarioPacHighlight /* f18456c: 00184040 */ sll $t0,$t8,0x1 /* f184570: 01284821 */ addu $t1,$t1,$t0 /* f184574: 8529c118 */ lh $t1,%lo(g_ScenarioData+0x8)($t1) -/* f184578: 3c0b800b */ lui $t3,%hi(g_MpPlayerChrs) +/* f184578: 3c0b800b */ lui $t3,%hi(g_MpAllChrPtrs) /* f18457c: 8c990004 */ lw $t9,0x4($a0) /* f184580: 00095080 */ sll $t2,$t1,0x2 /* f184584: 016a5821 */ addu $t3,$t3,$t2 -/* f184588: 8d6bc4d0 */ lw $t3,%lo(g_MpPlayerChrs)($t3) +/* f184588: 8d6bc4d0 */ lw $t3,%lo(g_MpAllChrPtrs)($t3) /* f18458c: 240c00ff */ addiu $t4,$zero,0xff /* f184590: 240d0040 */ addiu $t5,$zero,0x40 /* f184594: 172b0006 */ bne $t9,$t3,.L0f1845b0 @@ -7118,7 +7118,7 @@ glabel scenarioPacHighlight // if ((g_MpSetup.options & MPOPTION_PAC_HIGHLIGHTTARGET) && // (prop->type == PROPTYPE_PLAYER || prop->type == PROPTYPE_CHR) && // g_ScenarioData.pac.victimindex != -1 && -// prop->chr == g_MpPlayerChrs[g_ScenarioData.pac.victims[g_ScenarioData.pac.victimindex]]) { +// prop->chr == g_MpAllChrPtrs[g_ScenarioData.pac.victims[g_ScenarioData.pac.victimindex]]) { // colour[0] = 0; // colour[1] = 0xff; // colour[2] = 0; @@ -7137,10 +7137,10 @@ glabel func0f1845bc /* f1845c0: 2442c110 */ addiu $v0,$v0,%lo(g_ScenarioData) /* f1845c4: 8c4e0004 */ lw $t6,0x4($v0) /* f1845c8: 27bdff70 */ addiu $sp,$sp,-144 -/* f1845cc: 3c18800b */ lui $t8,%hi(g_MpNumPlayers) +/* f1845cc: 3c18800b */ lui $t8,%hi(g_MpNumChrs) /* f1845d0: 25cf0001 */ addiu $t7,$t6,0x1 /* f1845d4: ac4f0004 */ sw $t7,0x4($v0) -/* f1845d8: 8f18c530 */ lw $t8,%lo(g_MpNumPlayers)($t8) +/* f1845d8: 8f18c530 */ lw $t8,%lo(g_MpNumChrs)($t8) /* f1845dc: afbf002c */ sw $ra,0x2c($sp) /* f1845e0: afb40028 */ sw $s4,0x28($sp) /* f1845e4: afb30024 */ sw $s3,0x24($sp) @@ -7205,8 +7205,8 @@ glabel func0f1845bc /* f1846b4: 10000018 */ b .L0f184718 /* f1846b8: 02202025 */ or $a0,$s1,$zero .L0f1846bc: -/* f1846bc: 3c09800b */ lui $t1,%hi(var800ac500) -/* f1846c0: 2529c500 */ addiu $t1,$t1,%lo(var800ac500) +/* f1846bc: 3c09800b */ lui $t1,%hi(g_MpAllChrConfigPtrs) +/* f1846c0: 2529c500 */ addiu $t1,$t1,%lo(g_MpAllChrConfigPtrs) /* f1846c4: 00144080 */ sll $t0,$s4,0x2 /* f1846c8: 01098021 */ addu $s0,$t0,$t1 /* f1846cc: 0fc619e0 */ jal mpChrsAreSameTeam @@ -7283,10 +7283,10 @@ glabel func0f1845bc /* f1845c0: 2442c110 */ addiu $v0,$v0,%lo(g_ScenarioData) /* f1845c4: 8c4e0004 */ lw $t6,0x4($v0) /* f1845c8: 27bdff70 */ addiu $sp,$sp,-144 -/* f1845cc: 3c18800b */ lui $t8,%hi(g_MpNumPlayers) +/* f1845cc: 3c18800b */ lui $t8,%hi(g_MpNumChrs) /* f1845d0: 25cf0001 */ addiu $t7,$t6,0x1 /* f1845d4: ac4f0004 */ sw $t7,0x4($v0) -/* f1845d8: 8f18c530 */ lw $t8,%lo(g_MpNumPlayers)($t8) +/* f1845d8: 8f18c530 */ lw $t8,%lo(g_MpNumChrs)($t8) /* f1845dc: afbf002c */ sw $ra,0x2c($sp) /* f1845e0: afb40028 */ sw $s4,0x28($sp) /* f1845e4: afb30024 */ sw $s3,0x24($sp) @@ -7351,8 +7351,8 @@ glabel func0f1845bc /* f1846b4: 10000018 */ b .L0f184718 /* f1846b8: 02202025 */ or $a0,$s1,$zero .L0f1846bc: -/* f1846bc: 3c09800b */ lui $t1,%hi(var800ac500) -/* f1846c0: 2529c500 */ addiu $t1,$t1,%lo(var800ac500) +/* f1846bc: 3c09800b */ lui $t1,%hi(g_MpAllChrConfigPtrs) +/* f1846c0: 2529c500 */ addiu $t1,$t1,%lo(g_MpAllChrConfigPtrs) /* f1846c4: 00144080 */ sll $t0,$s4,0x2 /* f1846c8: 01098021 */ addu $s0,$t0,$t1 /* f1846cc: 0fc619e0 */ jal mpChrsAreSameTeam @@ -8338,9 +8338,9 @@ glabel scenarioPacCallback18 ); #endif -void scenarioPacKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) +void scenarioPacKill(struct mpchrconfig *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) { - struct mpchr *loopmpchr; + struct mpchrconfig *loopmpchr; s32 i; s32 index; @@ -8358,9 +8358,9 @@ void scenarioPacKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3) *score -= mpchr->killcounts[i]; } else if (g_MpSetup.options & MPOPTION_TEAMSENABLED) { if (i < 4) { - loopmpchr = &g_MpPlayers[i].base; + loopmpchr = &g_PlayerConfigsArray[i].base; } else { - loopmpchr = &g_MpSimulants[i - 4].base; + loopmpchr = &g_BotConfigsArray[i - 4].base; } if (loopmpchr->team == mpchr->team) { @@ -8398,11 +8398,11 @@ glabel scenarioPacRadar2 /* f184db8: 000fc040 */ sll $t8,$t7,0x1 /* f184dbc: 0338c821 */ addu $t9,$t9,$t8 /* f184dc0: 8739c118 */ lh $t9,%lo(g_ScenarioData+0x8)($t9) -/* f184dc4: 3c09800b */ lui $t1,%hi(g_MpPlayerChrs) +/* f184dc4: 3c09800b */ lui $t1,%hi(g_MpAllChrPtrs) /* f184dc8: 3c02800a */ lui $v0,%hi(g_Vars+0x284) /* f184dcc: 00194080 */ sll $t0,$t9,0x2 /* f184dd0: 01284821 */ addu $t1,$t1,$t0 -/* f184dd4: 8d29c4d0 */ lw $t1,%lo(g_MpPlayerChrs)($t1) +/* f184dd4: 8d29c4d0 */ lw $t1,%lo(g_MpAllChrPtrs)($t1) /* f184dd8: 8d2a001c */ lw $t2,0x1c($t1) /* f184ddc: 15450033 */ bne $t2,$a1,.L0f184eac /* f184de0: afaa0034 */ sw $t2,0x34($sp) @@ -8472,7 +8472,7 @@ glabel scenarioPacRadar2 //{ // if ((g_MpSetup.options & MPOPTION_PAC_SHOWONRADAR) && g_ScenarioData.pac.victimindex >= 0) { // s32 index = g_ScenarioData.pac.victimindex; -// struct prop *thing = g_MpPlayerChrs[g_ScenarioData.pac.victims[index]]->prop; +// struct prop *thing = g_MpAllChrPtrs[g_ScenarioData.pac.victims[index]]->prop; // // if (thing == prop) { // struct coord dist; @@ -8958,8 +8958,8 @@ void mpCreateMatchStartHudmsgs(void) sprintf(scenarioname, "%s\n", langGet(g_MpScenarioOverviews[g_MpSetup.scenario].name)); - for (i = 0; i < g_MpNumPlayers; i++) { - if (g_MpPlayerChrs[i]->aibot == NULL) { + for (i = 0; i < g_MpNumChrs; i++) { + if (g_MpAllChrPtrs[i]->aibot == NULL) { setCurrentPlayerNum(i); if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE) { @@ -9561,11 +9561,11 @@ glabel func0f185c14 /* f185c60: 1000003b */ b .L0f185d50 /* f185c64: 8fbf001c */ lw $ra,0x1c($sp) .L0f185c68: -/* f185c68: 3c09800b */ lui $t1,%hi(g_MpSimulants) -/* f185c6c: 3c07800b */ lui $a3,%hi(g_MpPlayers) +/* f185c68: 3c09800b */ lui $t1,%hi(g_BotConfigsArray) +/* f185c6c: 3c07800b */ lui $a3,%hi(g_PlayerConfigsArray) /* f185c70: acc00000 */ sw $zero,0x0($a2) -/* f185c74: 24e7c7b8 */ addiu $a3,$a3,%lo(g_MpPlayers) -/* f185c78: 2529c538 */ addiu $t1,$t1,%lo(g_MpSimulants) +/* f185c74: 24e7c7b8 */ addiu $a3,$a3,%lo(g_PlayerConfigsArray) +/* f185c78: 2529c538 */ addiu $t1,$t1,%lo(g_BotConfigsArray) /* f185c7c: 00001025 */ or $v0,$zero,$zero /* f185c80: 02001825 */ or $v1,$s0,$zero /* f185c84: 240a004c */ addiu $t2,$zero,0x4c @@ -9730,13 +9730,13 @@ glabel var7f1b89b8 /* f185ebc: 00001025 */ or $v0,$zero,$zero .L0f185ec0: /* f185ec0: 8d8ca248 */ lw $t4,%lo(g_Vars+0x288)($t4) -/* f185ec4: 3c0f800b */ lui $t7,%hi(g_MpPlayers+0x14) +/* f185ec4: 3c0f800b */ lui $t7,%hi(g_PlayerConfigsArray+0x14) /* f185ec8: 8d8d0070 */ lw $t5,0x70($t4) /* f185ecc: 000d7080 */ sll $t6,$t5,0x2 /* f185ed0: 01cd7021 */ addu $t6,$t6,$t5 /* f185ed4: 000e7140 */ sll $t6,$t6,0x5 /* f185ed8: 01ee7821 */ addu $t7,$t7,$t6 -/* f185edc: 8defc7cc */ lw $t7,%lo(g_MpPlayers+0x14)($t7) +/* f185edc: 8defc7cc */ lw $t7,%lo(g_PlayerConfigsArray+0x14)($t7) /* f185ee0: 31f80002 */ andi $t8,$t7,0x2 /* f185ee4: 530000a1 */ beqzl $t8,.L0f18616c /* f185ee8: 00001025 */ or $v0,$zero,$zero @@ -9819,13 +9819,13 @@ glabel var7f1b89b8 /* f18600c: 1160000e */ beqz $t3,.L0f186048 /* f186010: 3c0c800a */ lui $t4,%hi(g_Vars+0x288) /* f186014: 8d8ca248 */ lw $t4,%lo(g_Vars+0x288)($t4) -/* f186018: 3c0f800b */ lui $t7,%hi(g_MpPlayers+0x14) +/* f186018: 3c0f800b */ lui $t7,%hi(g_PlayerConfigsArray+0x14) /* f18601c: 8d8d0070 */ lw $t5,0x70($t4) /* f186020: 000d7080 */ sll $t6,$t5,0x2 /* f186024: 01cd7021 */ addu $t6,$t6,$t5 /* f186028: 000e7140 */ sll $t6,$t6,0x5 /* f18602c: 01ee7821 */ addu $t7,$t7,$t6 -/* f186030: 8defc7cc */ lw $t7,%lo(g_MpPlayers+0x14)($t7) +/* f186030: 8defc7cc */ lw $t7,%lo(g_PlayerConfigsArray+0x14)($t7) /* f186034: 31f80008 */ andi $t8,$t7,0x8 /* f186038: 13000003 */ beqz $t8,.L0f186048 /* f18603c: 00000000 */ nop @@ -9834,13 +9834,13 @@ glabel var7f1b89b8 .L0f186048: /* f186048: 3c19800a */ lui $t9,%hi(g_Vars+0x288) /* f18604c: 8f39a248 */ lw $t9,%lo(g_Vars+0x288)($t9) -/* f186050: 3c0b800b */ lui $t3,%hi(g_MpPlayers+0x14) +/* f186050: 3c0b800b */ lui $t3,%hi(g_PlayerConfigsArray+0x14) /* f186054: 8f290070 */ lw $t1,0x70($t9) /* f186058: 00095080 */ sll $t2,$t1,0x2 /* f18605c: 01495021 */ addu $t2,$t2,$t1 /* f186060: 000a5140 */ sll $t2,$t2,0x5 /* f186064: 016a5821 */ addu $t3,$t3,$t2 -/* f186068: 8d6bc7cc */ lw $t3,%lo(g_MpPlayers+0x14)($t3) +/* f186068: 8d6bc7cc */ lw $t3,%lo(g_PlayerConfigsArray+0x14)($t3) /* f18606c: 316c0001 */ andi $t4,$t3,0x1 /* f186070: 11800002 */ beqz $t4,.L0f18607c /* f186074: 00000000 */ nop @@ -10227,8 +10227,8 @@ void mpCreateScenarioHudmsg(s32 playernum, char *message) bool mpChrsAreSameTeam(s32 arg0, s32 arg1) { - struct mpchr *achr; - struct mpchr *bchr; + struct mpchrconfig *achr; + struct mpchrconfig *bchr; if ((g_MpSetup.options & MPOPTION_TEAMSENABLED) && arg0 >= 0 && arg1 >= 0) { s32 a = func0f18d074(arg0); @@ -10236,15 +10236,15 @@ bool mpChrsAreSameTeam(s32 arg0, s32 arg1) if (a >= 0 && b >= 0) { if (a < 4) { - achr = &g_MpPlayers[a].base; + achr = &g_PlayerConfigsArray[a].base; } else { - achr = &g_MpSimulants[a - 4].base; + achr = &g_BotConfigsArray[a - 4].base; } if (b < 4) { - bchr = &g_MpPlayers[b].base; + bchr = &g_PlayerConfigsArray[b].base; } else { - bchr = &g_MpSimulants[b - 4].base; + bchr = &g_BotConfigsArray[b - 4].base; } return (achr->team == bchr->team) ? true : false; @@ -10294,7 +10294,7 @@ glabel chrGiveBriefcase /* f187924: 8c8302d4 */ lw $v1,0x2d4($a0) /* f187928: 906e009c */ lbu $t6,0x9c($v1) /* f18792c: 35d80080 */ ori $t8,$t6,0x80 -/* f187930: 0fc663e3 */ jal aibotGiveSingleWeapon +/* f187930: 0fc663e3 */ jal botinvGiveSingleWeapon /* f187934: a078009c */ sb $t8,0x9c($v1) /* f187938: 3c11800a */ lui $s1,0x800a /* f18793c: 10000020 */ b .PF0f1879c0 @@ -10544,7 +10544,7 @@ glabel chrGiveBriefcase .PF0f187ca4: /* f187ca4: 11a00009 */ beqz $t5,.PF0f187ccc /* f187ca8: 01802025 */ move $a0,$t4 -/* f187cac: 0fc66aa1 */ jal func0f199984 +/* f187cac: 0fc66aa1 */ jal botinvDropOne /* f187cb0: 24050057 */ li $a1,0x57 /* f187cb4: 8fae0128 */ lw $t6,0x128($sp) /* f187cb8: 8dc302d4 */ lw $v1,0x2d4($t6) @@ -10895,7 +10895,7 @@ glabel chrGiveBriefcase /* f18818c: 01e02025 */ move $a0,$t7 /* f188190: 13200009 */ beqz $t9,.PF0f1881b8 /* f188194: 00000000 */ nop -/* f188198: 0fc663e3 */ jal aibotGiveSingleWeapon +/* f188198: 0fc663e3 */ jal botinvGiveSingleWeapon /* f18819c: 24050057 */ li $a1,0x57 /* f1881a0: 8fab0124 */ lw $t3,0x124($sp) /* f1881a4: 00001025 */ move $v0,$zero @@ -10966,9 +10966,9 @@ glabel chrGiveBriefcase /* f1868ec: 0fc633fe */ jal mpPlayerGetIndex /* f1868f0: 00000000 */ nop /* f1868f4: 00025080 */ sll $t2,$v0,0x2 -/* f1868f8: 3c0b800b */ lui $t3,%hi(var800ac500) +/* f1868f8: 3c0b800b */ lui $t3,%hi(g_MpAllChrConfigPtrs) /* f1868fc: 016a5821 */ addu $t3,$t3,$t2 -/* f186900: 8d6bc500 */ lw $t3,%lo(var800ac500)($t3) +/* f186900: 8d6bc500 */ lw $t3,%lo(g_MpAllChrConfigPtrs)($t3) /* f186904: 8fac0120 */ lw $t4,0x120($sp) /* f186908: 8fa4012c */ lw $a0,0x12c($sp) /* f18690c: afab0050 */ sw $t3,0x50($sp) @@ -10979,20 +10979,20 @@ glabel chrGiveBriefcase /* f186920: 8c8302d4 */ lw $v1,0x2d4($a0) /* f186924: 906e009c */ lbu $t6,0x9c($v1) /* f186928: 35d80080 */ ori $t8,$t6,0x80 -/* f18692c: 0fc65fa3 */ jal aibotGiveSingleWeapon +/* f18692c: 0fc65fa3 */ jal botinvGiveSingleWeapon /* f186930: a078009c */ sb $t8,0x9c($v1) /* f186934: 3c11800a */ lui $s1,%hi(g_Vars) /* f186938: 10000020 */ b .L0f1869bc /* f18693c: 26319fc0 */ addiu $s1,$s1,%lo(g_Vars) /* f186940: 8e39028c */ lw $t9,0x28c($s1) .L0f186944: -/* f186944: 3c0c800b */ lui $t4,%hi(g_MpPlayers) -/* f186948: 258cc7b8 */ addiu $t4,$t4,%lo(g_MpPlayers) +/* f186944: 3c0c800b */ lui $t4,%hi(g_PlayerConfigsArray) +/* f186948: 258cc7b8 */ addiu $t4,$t4,%lo(g_PlayerConfigsArray) /* f18694c: 001979c0 */ sll $t7,$t9,0x7 /* f186950: 022f5021 */ addu $t2,$s1,$t7 /* f186954: 8d4200e4 */ lw $v0,0xe4($t2) -/* f186958: 3c19800b */ lui $t9,%hi(g_MpSimulants) -/* f18695c: 2739c538 */ addiu $t9,$t9,%lo(g_MpSimulants) +/* f186958: 3c19800b */ lui $t9,%hi(g_BotConfigsArray) +/* f18695c: 2739c538 */ addiu $t9,$t9,%lo(g_BotConfigsArray) /* f186960: 28410004 */ slti $at,$v0,0x4 /* f186964: 10200007 */ beqz $at,.L0f186984 /* f186968: 00027080 */ sll $t6,$v0,0x2 @@ -11151,9 +11151,9 @@ glabel chrGiveBriefcase /* f186b80: 0fc633fe */ jal mpPlayerGetIndex /* f186b84: 01402025 */ or $a0,$t2,$zero /* f186b88: 00025880 */ sll $t3,$v0,0x2 -/* f186b8c: 3c0c800b */ lui $t4,%hi(var800ac500) +/* f186b8c: 3c0c800b */ lui $t4,%hi(g_MpAllChrConfigPtrs) /* f186b90: 018b6021 */ addu $t4,$t4,$t3 -/* f186b94: 8d8cc500 */ lw $t4,%lo(var800ac500)($t4) +/* f186b94: 8d8cc500 */ lw $t4,%lo(g_MpAllChrConfigPtrs)($t4) /* f186b98: 8fad0128 */ lw $t5,0x128($sp) /* f186b9c: 3c11800a */ lui $s1,%hi(g_Vars) /* f186ba0: afac0050 */ sw $t4,0x50($sp) @@ -11162,13 +11162,13 @@ glabel chrGiveBriefcase /* f186bac: 8da302d4 */ lw $v1,0x2d4($t5) /* f186bb0: 8e2e028c */ lw $t6,0x28c($s1) .L0f186bb4: -/* f186bb4: 3c0a800b */ lui $t2,%hi(g_MpPlayers) -/* f186bb8: 254ac7b8 */ addiu $t2,$t2,%lo(g_MpPlayers) +/* f186bb4: 3c0a800b */ lui $t2,%hi(g_PlayerConfigsArray) +/* f186bb8: 254ac7b8 */ addiu $t2,$t2,%lo(g_PlayerConfigsArray) /* f186bbc: 000ec1c0 */ sll $t8,$t6,0x7 /* f186bc0: 0238c821 */ addu $t9,$s1,$t8 /* f186bc4: 8f2200e4 */ lw $v0,0xe4($t9) -/* f186bc8: 3c0e800b */ lui $t6,%hi(g_MpSimulants) -/* f186bcc: 25cec538 */ addiu $t6,$t6,%lo(g_MpSimulants) +/* f186bc8: 3c0e800b */ lui $t6,%hi(g_BotConfigsArray) +/* f186bcc: 25cec538 */ addiu $t6,$t6,%lo(g_BotConfigsArray) /* f186bd0: 28410004 */ slti $at,$v0,0x4 /* f186bd4: 10200007 */ beqz $at,.L0f186bf4 /* f186bd8: 00026080 */ sll $t4,$v0,0x2 @@ -11229,7 +11229,7 @@ glabel chrGiveBriefcase .L0f186ca0: /* f186ca0: 11a00009 */ beqz $t5,.L0f186cc8 /* f186ca4: 01802025 */ or $a0,$t4,$zero -/* f186ca8: 0fc66661 */ jal func0f199984 +/* f186ca8: 0fc66661 */ jal botinvDropOne /* f186cac: 24050057 */ addiu $a1,$zero,0x57 /* f186cb0: 8fae0128 */ lw $t6,0x128($sp) /* f186cb4: 8dc302d4 */ lw $v1,0x2d4($t6) @@ -11336,7 +11336,7 @@ glabel chrGiveBriefcase /* f186e28: 02002025 */ or $a0,$s0,$zero /* f186e2c: 8fae0128 */ lw $t6,0x128($sp) /* f186e30: 00107880 */ sll $t7,$s0,0x2 -/* f186e34: 3c0b800b */ lui $t3,%hi(var800ac500) +/* f186e34: 3c0b800b */ lui $t3,%hi(g_MpAllChrConfigPtrs) /* f186e38: 8dd902d4 */ lw $t9,0x2d4($t6) /* f186e3c: 8faa0118 */ lw $t2,0x118($sp) /* f186e40: 016f5821 */ addu $t3,$t3,$t7 @@ -11350,7 +11350,7 @@ glabel chrGiveBriefcase /* f186e60: 10000011 */ b .L0f186ea8 /* f186e64: 8e2c006c */ lw $t4,0x6c($s1) .L0f186e68: -/* f186e68: 8d6bc500 */ lw $t3,%lo(var800ac500)($t3) +/* f186e68: 8d6bc500 */ lw $t3,%lo(g_MpAllChrConfigPtrs)($t3) /* f186e6c: 8fb80114 */ lw $t8,0x114($sp) /* f186e70: 24060001 */ addiu $a2,$zero,0x1 /* f186e74: 916d0011 */ lbu $t5,0x11($t3) @@ -11531,7 +11531,7 @@ glabel chrGiveBriefcase /* f1870e4: 02002025 */ or $a0,$s0,$zero /* f1870e8: 8fb90128 */ lw $t9,0x128($sp) /* f1870ec: 00107080 */ sll $t6,$s0,0x2 -/* f1870f0: 3c0a800b */ lui $t2,%hi(var800ac500) +/* f1870f0: 3c0a800b */ lui $t2,%hi(g_MpAllChrConfigPtrs) /* f1870f4: 8f2b02d4 */ lw $t3,0x2d4($t9) /* f1870f8: 8fb80118 */ lw $t8,0x118($sp) /* f1870fc: 014e5021 */ addu $t2,$t2,$t6 @@ -11545,7 +11545,7 @@ glabel chrGiveBriefcase /* f18711c: 10000011 */ b .L0f187164 /* f187120: 8e39006c */ lw $t9,0x6c($s1) .L0f187124: -/* f187124: 8d4ac500 */ lw $t2,%lo(var800ac500)($t2) +/* f187124: 8d4ac500 */ lw $t2,%lo(g_MpAllChrConfigPtrs)($t2) /* f187128: 85ac0062 */ lh $t4,0x62($t5) /* f18712c: 24060001 */ addiu $a2,$zero,0x1 /* f187130: 914f0011 */ lbu $t7,0x11($t2) @@ -11604,7 +11604,7 @@ glabel chrGiveBriefcase /* f1871e8: 01e02025 */ or $a0,$t7,$zero /* f1871ec: 13200009 */ beqz $t9,.L0f187214 /* f1871f0: 00000000 */ nop -/* f1871f4: 0fc65fa3 */ jal aibotGiveSingleWeapon +/* f1871f4: 0fc65fa3 */ jal botinvGiveSingleWeapon /* f1871f8: 24050057 */ addiu $a1,$zero,0x57 /* f1871fc: 8fab0124 */ lw $t3,0x124($sp) /* f187200: 00001025 */ or $v0,$zero,$zero @@ -11688,7 +11688,7 @@ glabel chrGiveBriefcase /* f180d88: 8c8302d4 */ lw $v1,0x2d4($a0) /* f180d8c: 906e009c */ lbu $t6,0x9c($v1) /* f180d90: 35d80080 */ ori $t8,$t6,0x80 -/* f180d94: 0fc6479b */ jal aibotGiveSingleWeapon +/* f180d94: 0fc6479b */ jal botinvGiveSingleWeapon /* f180d98: a078009c */ sb $t8,0x9c($v1) /* f180d9c: 3c11800a */ lui $s1,0x800a /* f180da0: 10000020 */ beqz $zero,.NB0f180e24 @@ -11932,7 +11932,7 @@ glabel chrGiveBriefcase .NB0f1810f0: /* f1810f0: 11800009 */ beqz $t4,.NB0f181118 /* f1810f4: 01602025 */ or $a0,$t3,$zero -/* f1810f8: 0fc64e59 */ jal func0f199984 +/* f1810f8: 0fc64e59 */ jal botinvDropOne /* f1810fc: 24050056 */ addiu $a1,$zero,0x56 /* f181100: 8fad0128 */ lw $t5,0x128($sp) /* f181104: 8da302d4 */ lw $v1,0x2d4($t5) @@ -12307,7 +12307,7 @@ glabel chrGiveBriefcase /* f181638: 01c02025 */ or $a0,$t6,$zero /* f18163c: 13200009 */ beqz $t9,.NB0f181664 /* f181640: 00000000 */ sll $zero,$zero,0x0 -/* f181644: 0fc6479b */ jal aibotGiveSingleWeapon +/* f181644: 0fc6479b */ jal botinvGiveSingleWeapon /* f181648: 24050056 */ addiu $a1,$zero,0x56 /* f18164c: 8faa0124 */ lw $t2,0x124($sp) /* f181650: 00001025 */ or $v0,$zero,$zero @@ -12456,7 +12456,7 @@ glabel func0f187288 s32 chrGiveUplink(struct chrdata *chr, struct prop *prop) { s32 i; - struct mpchr *mpchr; + struct mpchrconfig *mpchr; char message[60]; s32 mpindex; u32 playernum; @@ -12469,14 +12469,14 @@ s32 chrGiveUplink(struct chrdata *chr, struct prop *prop) g_ScenarioData.htm.uplink = chr->prop; if (chr->aibot) { - mpchr = var800ac500[mpPlayerGetIndex(chr)]; + mpchr = g_MpAllChrConfigPtrs[mpPlayerGetIndex(chr)]; } else { mpindex = g_Vars.playerstats[g_Vars.currentplayernum].mpindex; if (mpindex < 4) { - mpchr = &g_MpPlayers[mpindex].base; + mpchr = &g_PlayerConfigsArray[mpindex].base; } else { - mpchr = &g_MpSimulants[mpindex - 4].base; + mpchr = &g_BotConfigsArray[mpindex - 4].base; } } @@ -12500,7 +12500,7 @@ s32 chrGiveUplink(struct chrdata *chr, struct prop *prop) if (chr->aibot) { propPlayPickupSound(prop, WEAPON_DATAUPLINK); - aibotGiveSingleWeapon(chr, WEAPON_DATAUPLINK); + botinvGiveSingleWeapon(chr, WEAPON_DATAUPLINK); chr->aibot->unk04c_05 = true; #if VERSION >= VERSION_NTSC_1_0 diff --git a/src/game/mplayer/setup.c b/src/game/mplayer/setup.c index cc5ac6f72..b3b9153bb 100644 --- a/src/game/mplayer/setup.c +++ b/src/game/mplayer/setup.c @@ -41,7 +41,7 @@ s32 menuhandlerMpDropOut(s32 operation, struct menuitem *item, union handlerdata char *mpGetCurrentPlayerName(struct menuitem *item) { - return g_MpPlayers[g_MpPlayerNum].base.name; + return g_PlayerConfigsArray[g_MpPlayerNum].base.name; } s32 menuhandlerMpTeamsLabel(s32 operation, struct menuitem *item, union handlerdata *data) @@ -431,12 +431,12 @@ s32 menuhandlerMpControlCheckbox(s32 operation, struct menuitem *item, union han switch (operation) { case MENUOP_GET: if (item->param3 == OPTION_FORWARDPITCH) { - if ((g_MpPlayers[g_MpPlayerNum].options & item->param3) == 0) { + if ((g_PlayerConfigsArray[g_MpPlayerNum].options & item->param3) == 0) { return true; } return false; } - if ((g_MpPlayers[g_MpPlayerNum].options & item->param3) == 0) { + if ((g_PlayerConfigsArray[g_MpPlayerNum].options & item->param3) == 0) { return false; } return true; @@ -451,10 +451,10 @@ s32 menuhandlerMpControlCheckbox(s32 operation, struct menuitem *item, union han } } - g_MpPlayers[g_MpPlayerNum].options &= ~item->param3; + g_PlayerConfigsArray[g_MpPlayerNum].options &= ~item->param3; if (data->checkbox.value) { - g_MpPlayers[g_MpPlayerNum].options |= item->param3; + g_PlayerConfigsArray[g_MpPlayerNum].options |= item->param3; } } @@ -526,15 +526,15 @@ s32 menuhandlerMpDisplayOptionCheckbox(s32 operation, struct menuitem *item, uni { switch (operation) { case MENUOP_GET: - if ((g_MpPlayers[g_MpPlayerNum].base.displayoptions & item->param3) == 0) { + if ((g_PlayerConfigsArray[g_MpPlayerNum].base.displayoptions & item->param3) == 0) { return false; } return true; case MENUOP_SET: - g_MpPlayers[g_MpPlayerNum].base.displayoptions &= ~(u8)item->param3; + g_PlayerConfigsArray[g_MpPlayerNum].base.displayoptions &= ~(u8)item->param3; if (data->checkbox.value) { - g_MpPlayers[g_MpPlayerNum].base.displayoptions |= (u8)item->param3; + g_PlayerConfigsArray[g_MpPlayerNum].base.displayoptions |= (u8)item->param3; } break; } @@ -602,10 +602,10 @@ s32 func0f179b68(s32 operation, struct menuitem *item, union handlerdata *data) { switch (operation) { case MENUOP_GETSLIDER: - data->slider.value = g_MpPlayers[g_MpPlayerNum].base.unk18; + data->slider.value = g_PlayerConfigsArray[g_MpPlayerNum].base.unk18; break; case MENUOP_SET: - g_MpPlayers[g_MpPlayerNum].base.unk18 = (u8) data->slider.value; + g_PlayerConfigsArray[g_MpPlayerNum].base.unk18 = (u8) data->slider.value; break; case MENUOP_GETSLIDERLABEL: sprintf(data->slider.label, "%d%%\n", data->slider.value + 20); @@ -619,10 +619,10 @@ s32 func0f179c14(s32 operation, struct menuitem *item, union handlerdata *data) { switch (operation) { case MENUOP_GETSLIDER: - data->slider.value = g_MpPlayers[g_MpPlayerNum].base.unk1a; + data->slider.value = g_PlayerConfigsArray[g_MpPlayerNum].base.unk1a; break; case MENUOP_SET: - g_MpPlayers[g_MpPlayerNum].base.unk1a = (u8) data->slider.value; + g_PlayerConfigsArray[g_MpPlayerNum].base.unk1a = (u8) data->slider.value; break; case MENUOP_GETSLIDERLABEL: sprintf(data->slider.label, "%d%%\n", data->slider.value + 20); @@ -636,10 +636,10 @@ s32 func0f179cc0(s32 operation, struct menuitem *item, union handlerdata *data) { switch (operation) { case MENUOP_GETSLIDER: - data->slider.value = g_MpPlayers[g_MpPlayerNum].base.unk1c; + data->slider.value = g_PlayerConfigsArray[g_MpPlayerNum].base.unk1c; break; case MENUOP_SET: - g_MpPlayers[g_MpPlayerNum].base.unk1c = data->slider.value; + g_PlayerConfigsArray[g_MpPlayerNum].base.unk1c = data->slider.value; break; case MENUOP_GETSLIDERLABEL: sprintf(data->slider.label, "%d%%\n", data->slider.value + 25); @@ -1315,29 +1315,29 @@ s32 menuhandlerMpCharacterBody(s32 operation, struct menuitem *item, union handl { switch (operation) { case MENUOP_SET: - if (g_MpPlayers[g_MpPlayerNum].base.mpheadnum < mpGetNumHeads()) { + if (g_PlayerConfigsArray[g_MpPlayerNum].base.mpheadnum < mpGetNumHeads()) { #if VERSION >= VERSION_NTSC_1_0 if (!data->carousel.unk04) #endif { - g_MpPlayers[g_MpPlayerNum].base.mpheadnum = mpGetMpheadnumByMpbodynum(data->carousel.value); + g_PlayerConfigsArray[g_MpPlayerNum].base.mpheadnum = mpGetMpheadnumByMpbodynum(data->carousel.value); } } - g_MpPlayers[g_MpPlayerNum].base.mpbodynum = data->carousel.value; + g_PlayerConfigsArray[g_MpPlayerNum].base.mpbodynum = data->carousel.value; func0f17b8f0(); break; case MENUOP_CHECKPREFOCUSED: #if VERSION >= VERSION_NTSC_1_0 func0f179da4(operation, item, data, - g_MpPlayers[g_MpPlayerNum].base.mpbodynum, - g_MpPlayers[g_MpPlayerNum].base.mpheadnum, 1); + g_PlayerConfigsArray[g_MpPlayerNum].base.mpbodynum, + g_PlayerConfigsArray[g_MpPlayerNum].base.mpheadnum, 1); #endif return true; } return func0f179da4(operation, item, data, - g_MpPlayers[g_MpPlayerNum].base.mpbodynum, - g_MpPlayers[g_MpPlayerNum].base.mpheadnum, 1); + g_PlayerConfigsArray[g_MpPlayerNum].base.mpbodynum, + g_PlayerConfigsArray[g_MpPlayerNum].base.mpheadnum, 1); } s32 menudialog0017a174(s32 operation, struct menudialog *dialog, union handlerdata *data) @@ -1456,67 +1456,67 @@ const char var7f1b7ed0[] = "Menu99 -> Calling Camera Module Finish\n"; char *mpMenuTextKills(struct menuitem *item) { \ - sprintf(g_StringPointer, "%d\n", g_MpPlayers[g_MpPlayerNum].kills); + sprintf(g_StringPointer, "%d\n", g_PlayerConfigsArray[g_MpPlayerNum].kills); return g_StringPointer; } char *mpMenuTextDeaths(struct menuitem *item) { \ - sprintf(g_StringPointer, "%d\n", g_MpPlayers[g_MpPlayerNum].deaths); + sprintf(g_StringPointer, "%d\n", g_PlayerConfigsArray[g_MpPlayerNum].deaths); return g_StringPointer; } char *mpMenuTextGamesPlayed(struct menuitem *item) { \ - sprintf(g_StringPointer, "%d\n", g_MpPlayers[g_MpPlayerNum].gamesplayed); + sprintf(g_StringPointer, "%d\n", g_PlayerConfigsArray[g_MpPlayerNum].gamesplayed); return g_StringPointer; } char *mpMenuTextGamesWon(struct menuitem *item) { \ - sprintf(g_StringPointer, "%d\n", g_MpPlayers[g_MpPlayerNum].gameswon); + sprintf(g_StringPointer, "%d\n", g_PlayerConfigsArray[g_MpPlayerNum].gameswon); return g_StringPointer; } char *mpMenuTextGamesLost(struct menuitem *item) { \ - sprintf(g_StringPointer, "%d\n", g_MpPlayers[g_MpPlayerNum].gameslost); + sprintf(g_StringPointer, "%d\n", g_PlayerConfigsArray[g_MpPlayerNum].gameslost); return g_StringPointer; } char *mpMenuTextHeadShots(struct menuitem *item) { \ - sprintf(g_StringPointer, "%d\n", g_MpPlayers[g_MpPlayerNum].headshots); + sprintf(g_StringPointer, "%d\n", g_PlayerConfigsArray[g_MpPlayerNum].headshots); return g_StringPointer; } char *mpMenuTextMedalAccuracy(struct menuitem *item) { \ - sprintf(g_StringPointer, "%d\n", g_MpPlayers[g_MpPlayerNum].accuracymedals); + sprintf(g_StringPointer, "%d\n", g_PlayerConfigsArray[g_MpPlayerNum].accuracymedals); return g_StringPointer; } char *mpMenuTextMedalHeadShot(struct menuitem *item) { \ - sprintf(g_StringPointer, "%d\n", g_MpPlayers[g_MpPlayerNum].headshotmedals); + sprintf(g_StringPointer, "%d\n", g_PlayerConfigsArray[g_MpPlayerNum].headshotmedals); return g_StringPointer; } char *mpMenuTextMedalKillMaster(struct menuitem *item) { \ - sprintf(g_StringPointer, "%d\n", g_MpPlayers[g_MpPlayerNum].killmastermedals); + sprintf(g_StringPointer, "%d\n", g_PlayerConfigsArray[g_MpPlayerNum].killmastermedals); return g_StringPointer; } char *mpMenuTextMedalSurvivor(struct menuitem *item) { \ - sprintf(g_StringPointer, "%d\n", g_MpPlayers[g_MpPlayerNum].survivormedals); + sprintf(g_StringPointer, "%d\n", g_PlayerConfigsArray[g_MpPlayerNum].survivormedals); return g_StringPointer; } char *mpMenuTextAmmoUsed(struct menuitem *item) { - s32 value = g_MpPlayers[g_MpPlayerNum].ammoused; + s32 value = g_PlayerConfigsArray[g_MpPlayerNum].ammoused; if (value > 100000) { value = value / 1000; @@ -1536,7 +1536,7 @@ char *mpMenuTextAmmoUsed(struct menuitem *item) char *mpMenuTextDistance(struct menuitem *item) { - sprintf(g_StringPointer, "%s%s%.1fkm\n", "", "", g_MpPlayers[g_MpPlayerNum].distance / 10.0f); + sprintf(g_StringPointer, "%s%s%.1fkm\n", "", "", g_PlayerConfigsArray[g_MpPlayerNum].distance / 10.0f); return g_StringPointer; } @@ -1545,13 +1545,13 @@ GLOBAL_ASM( glabel mpMenuTextTime /* f17ab38: 3c0e8007 */ lui $t6,%hi(g_MpPlayerNum) /* f17ab3c: 8dce1448 */ lw $t6,%lo(g_MpPlayerNum)($t6) -/* f17ab40: 3c02800b */ lui $v0,%hi(g_MpPlayers+0x68) +/* f17ab40: 3c02800b */ lui $v0,%hi(g_PlayerConfigsArray+0x68) /* f17ab44: 2408003c */ addiu $t0,$zero,0x3c /* f17ab48: 000e7880 */ sll $t7,$t6,0x2 /* f17ab4c: 01ee7821 */ addu $t7,$t7,$t6 /* f17ab50: 000f7940 */ sll $t7,$t7,0x5 /* f17ab54: 004f1021 */ addu $v0,$v0,$t7 -/* f17ab58: 8c42c820 */ lw $v0,%lo(g_MpPlayers+0x68)($v0) +/* f17ab58: 8c42c820 */ lw $v0,%lo(g_PlayerConfigsArray+0x68)($v0) /* f17ab5c: 27bdffe0 */ addiu $sp,$sp,-32 /* f17ab60: afbf001c */ sw $ra,0x1c($sp) /* f17ab64: 0048001b */ divu $zero,$v0,$t0 @@ -1806,12 +1806,12 @@ const char var7f1b7f68[] = "%d:%02d:%02d"; char *mpMenuTextAccuracy(struct menuitem *item) { #if VERSION < VERSION_NTSC_1_0 - if (g_MpPlayers[g_MpPlayerNum].gamesplayed < 8) { + if (g_PlayerConfigsArray[g_MpPlayerNum].gamesplayed < 8) { return "-\n"; } #endif - sprintf(g_StringPointer, "%s%s%.1f%%", "", "", g_MpPlayers[g_MpPlayerNum].accuracy / 10.0f); + sprintf(g_StringPointer, "%s%s%.1f%%", "", "", g_PlayerConfigsArray[g_MpPlayerNum].accuracy / 10.0f); return g_StringPointer; } @@ -1849,13 +1849,13 @@ void mpFormatDamageValue(char *dst, f32 damage) char *mpMenuTextPainReceived(struct menuitem *item) { - mpFormatDamageValue(g_StringPointer, g_MpPlayers[g_MpPlayerNum].painreceived / 10.0f); + mpFormatDamageValue(g_StringPointer, g_PlayerConfigsArray[g_MpPlayerNum].painreceived / 10.0f); return g_StringPointer; } char *mpMenuTextDamageDealt(struct menuitem *item) { - mpFormatDamageValue(g_StringPointer, g_MpPlayers[g_MpPlayerNum].damagedealt / 10.0f); + mpFormatDamageValue(g_StringPointer, g_PlayerConfigsArray[g_MpPlayerNum].damagedealt / 10.0f); return g_StringPointer; } @@ -2304,14 +2304,14 @@ glabel menuhandlerMpMedal char *mpMenuTitleStatsForPlayerName(struct menudialog *dialog) { // "Stats for %s" - sprintf(g_StringPointer, langGet(L_MPMENU_145), g_MpPlayers[g_MpPlayerNum].base.name); + sprintf(g_StringPointer, langGet(L_MPMENU_145), g_PlayerConfigsArray[g_MpPlayerNum].base.name); return g_StringPointer; } s32 menuhandlerMpUsernamePassword(s32 operation, struct menuitem *item, union handlerdata *data) { if (operation == MENUOP_CHECKHIDDEN) { - if (g_MpPlayers[g_MpPlayerNum].title != MPPLAYERTITLE_PERFECT) { + if (g_PlayerConfigsArray[g_MpPlayerNum].title != MPPLAYERTITLE_PERFECT) { return true; } } @@ -3383,15 +3383,15 @@ glabel var7f1b814c s32 menuhandlerMpCharacterHead(s32 operation, struct menuitem *item, union handlerdata *data) { if (operation == MENUOP_SET) { - g_MpPlayers[g_MpPlayerNum].base.mpheadnum = data->carousel.value; + g_PlayerConfigsArray[g_MpPlayerNum].base.mpheadnum = data->carousel.value; } - return func0f17b4f8(operation, item, data, g_MpPlayers[g_MpPlayerNum].base.mpheadnum, 1); + return func0f17b4f8(operation, item, data, g_PlayerConfigsArray[g_MpPlayerNum].base.mpheadnum, 1); } char *mpMenuTextBodyName(struct menuitem *item) { - return mpGetBodyName(g_MpPlayers[g_MpPlayerNum].base.mpbodynum); + return mpGetBodyName(g_PlayerConfigsArray[g_MpPlayerNum].base.mpbodynum); } void func0f17b8f0(void) @@ -3407,15 +3407,15 @@ glabel menuhandler0017b91c /* f17b928: 8cc20000 */ lw $v0,0x0($a2) /* f17b92c: 24010012 */ addiu $at,$zero,0x12 /* f17b930: 10810034 */ beq $a0,$at,.L0f17ba04 -/* f17b934: 3c07800b */ lui $a3,%hi(g_MpPlayers) +/* f17b934: 3c07800b */ lui $a3,%hi(g_PlayerConfigsArray) /* f17b938: 03e00008 */ jr $ra /* f17b93c: 00001025 */ or $v0,$zero,$zero .L0f17b940: /* f17b940: 3c088007 */ lui $t0,%hi(g_MpPlayerNum) /* f17b944: 25081448 */ addiu $t0,$t0,%lo(g_MpPlayerNum) /* f17b948: 8d040000 */ lw $a0,0x0($t0) -/* f17b94c: 3c07800b */ lui $a3,%hi(g_MpPlayers) -/* f17b950: 24e7c7b8 */ addiu $a3,$a3,%lo(g_MpPlayers) +/* f17b94c: 3c07800b */ lui $a3,%hi(g_PlayerConfigsArray) +/* f17b950: 24e7c7b8 */ addiu $a3,$a3,%lo(g_PlayerConfigsArray) /* f17b954: 00047080 */ sll $t6,$a0,0x2 /* f17b958: 01c47021 */ addu $t6,$t6,$a0 /* f17b95c: 000e7140 */ sll $t6,$t6,0x5 @@ -3472,8 +3472,8 @@ glabel menuhandler0017b91c /* f17ba14: 25081448 */ addiu $t0,$t0,%lo(g_MpPlayerNum) /* f17ba18: 3c0b8007 */ lui $t3,%hi(g_MpPlayerNum) /* f17ba1c: 8d6b1448 */ lw $t3,%lo(g_MpPlayerNum)($t3) -/* f17ba20: 3c0e800b */ lui $t6,%hi(g_MpPlayers) -/* f17ba24: 25cec7b8 */ addiu $t6,$t6,%lo(g_MpPlayers) +/* f17ba20: 3c0e800b */ lui $t6,%hi(g_PlayerConfigsArray) +/* f17ba24: 25cec7b8 */ addiu $t6,$t6,%lo(g_PlayerConfigsArray) /* f17ba28: 000b6080 */ sll $t4,$t3,0x2 /* f17ba2c: 018b6021 */ addu $t4,$t4,$t3 /* f17ba30: 000c6140 */ sll $t4,$t4,0x5 @@ -3492,7 +3492,7 @@ glabel menuhandler0017b91c /* f17ba60: 24630001 */ addiu $v1,$v1,0x1 .L0f17ba64: /* f17ba64: 8d0f0000 */ lw $t7,0x0($t0) -/* f17ba68: 24e7c7b8 */ addiu $a3,$a3,%lo(g_MpPlayers) +/* f17ba68: 24e7c7b8 */ addiu $a3,$a3,%lo(g_PlayerConfigsArray) /* f17ba6c: 240b000a */ addiu $t3,$zero,0xa /* f17ba70: 000fc080 */ sll $t8,$t7,0x2 /* f17ba74: 030fc021 */ addu $t8,$t8,$t7 @@ -4171,13 +4171,13 @@ glabel var7f1b81a8 /* f17c060: 8e020000 */ lw $v0,0x0($s0) /* f17c064: 8e680000 */ lw $t0,0x0($s3) /* f17c068: 3c13800b */ lui $s3,%hi(g_MpSetup) -/* f17c06c: 3c11800b */ lui $s1,%hi(g_MpPlayers) +/* f17c06c: 3c11800b */ lui $s1,%hi(g_PlayerConfigsArray) /* f17c070: 00084880 */ sll $t1,$t0,0x2 /* f17c074: 01284823 */ subu $t1,$t1,$t0 /* f17c078: 000948c0 */ sll $t1,$t1,0x3 /* f17c07c: 00499021 */ addu $s2,$v0,$t1 /* f17c080: 24150001 */ addiu $s5,$zero,0x1 -/* f17c084: 2631c7b8 */ addiu $s1,$s1,%lo(g_MpPlayers) +/* f17c084: 2631c7b8 */ addiu $s1,$s1,%lo(g_PlayerConfigsArray) /* f17c088: 2673cb88 */ addiu $s3,$s3,%lo(g_MpSetup) /* f17c08c: 00008025 */ or $s0,$zero,$zero /* f17c090: 24140004 */ addiu $s4,$zero,0x4 @@ -4485,13 +4485,13 @@ s32 menuhandlerMpHandicapPlayer(s32 operation, struct menuitem *item, union hand } break; case MENUOP_GETSLIDER: - data->slider.value = g_MpPlayers[item->param].handicap; + data->slider.value = g_PlayerConfigsArray[item->param].handicap; break; case MENUOP_SET: - g_MpPlayers[item->param].handicap = (u16)data->slider.value; + g_PlayerConfigsArray[item->param].handicap = (u16)data->slider.value; break; case MENUOP_GETSLIDERLABEL: - sprintf(data->slider.label, "%s%s%.00f%%\n", "", "", mpHandicapToDamageScale(g_MpPlayers[item->param].handicap) * 100); + sprintf(data->slider.label, "%s%s%.00f%%\n", "", "", mpHandicapToDamageScale(g_PlayerConfigsArray[item->param].handicap) * 100); break; } @@ -4501,7 +4501,7 @@ s32 menuhandlerMpHandicapPlayer(s32 operation, struct menuitem *item, union hand char *mpMenuTextHandicapPlayerName(struct menuitem *item) { if (g_MpSetup.chrslots & (1 << item->param)) { - return g_MpPlayers[item->param].base.name; + return g_PlayerConfigsArray[item->param].base.name; } return ""; @@ -4515,7 +4515,7 @@ s32 menuhandlerMpRestoreHandicapDefaults(s32 operation, struct menuitem *item, u s32 i; for (i = 0; i < 4; i++) { - g_MpPlayers[i].handicap = 0x80; + g_PlayerConfigsArray[i].handicap = 0x80; } } @@ -4525,8 +4525,8 @@ s32 menuhandlerMpRestoreHandicapDefaults(s32 operation, struct menuitem *item, u s32 menudialogMpReady(s32 operation, struct menudialog *dialog, union handlerdata *data) { if (operation == MENUOP_OPEN) { - if (g_MpPlayers[g_MpPlayerNum].fileguid.fileid && g_MpPlayers[g_MpPlayerNum].fileguid.deviceserial) { - filemgrSaveOrLoad(&g_MpPlayers[g_MpPlayerNum].fileguid, FILEOP_SAVE_MPPLAYER, g_MpPlayerNum); + if (g_PlayerConfigsArray[g_MpPlayerNum].fileguid.fileid && g_PlayerConfigsArray[g_MpPlayerNum].fileguid.deviceserial) { + filemgrSaveOrLoad(&g_PlayerConfigsArray[g_MpPlayerNum].fileguid, FILEOP_SAVE_MPPLAYER, g_MpPlayerNum); } } @@ -4536,7 +4536,7 @@ s32 menudialogMpReady(s32 operation, struct menudialog *dialog, union handlerdat s32 menudialogMpSimulant(s32 operation, struct menudialog *dialog, union handlerdata *data) { if (operation == MENUOP_TICK) { - if ((u8)g_MpSimulants[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.name[0] == '\0') { + if ((u8)g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.name[0] == '\0') { menuPopDialog(); } } @@ -4758,10 +4758,10 @@ glabel var7f1b81e8 /* f17c710: 8c2881ac */ lw $t0,%lo(var7f1b81ac)($at) /* f17c714: 01000008 */ jr $t0 /* f17c718: 00000000 */ nop -/* f17c71c: 3c108008 */ lui $s0,%hi(g_MpSimulantTypes) +/* f17c71c: 3c108008 */ lui $s0,%hi(g_BotProfiles) /* f17c720: 3c118008 */ lui $s1,%hi(g_MpBodies) /* f17c724: 263177bc */ addiu $s1,$s1,%lo(g_MpBodies) -/* f17c728: 2610772c */ addiu $s0,$s0,%lo(g_MpSimulantTypes) +/* f17c728: 2610772c */ addiu $s0,$s0,%lo(g_BotProfiles) .L0f17c72c: /* f17c72c: 0fc67244 */ jal mpIsFeatureUnlocked /* f17c730: 92040006 */ lbu $a0,0x6($s0) @@ -4773,10 +4773,10 @@ glabel var7f1b81e8 /* f17c744: 00000000 */ nop /* f17c748: 100000b4 */ b .L0f17ca1c /* f17c74c: ae920000 */ sw $s2,0x0($s4) -/* f17c750: 3c108008 */ lui $s0,%hi(g_MpSimulantTypes) +/* f17c750: 3c108008 */ lui $s0,%hi(g_BotProfiles) /* f17c754: 3c118008 */ lui $s1,%hi(g_MpBodies) /* f17c758: 263177bc */ addiu $s1,$s1,%lo(g_MpBodies) -/* f17c75c: 2610772c */ addiu $s0,$s0,%lo(g_MpSimulantTypes) +/* f17c75c: 2610772c */ addiu $s0,$s0,%lo(g_BotProfiles) .L0f17c760: /* f17c760: 0fc67244 */ jal mpIsFeatureUnlocked /* f17c764: 92040006 */ lbu $a0,0x6($s0) @@ -4830,8 +4830,8 @@ glabel var7f1b81e8 /* f17c818: 240a0001 */ addiu $t2,$zero,0x1 /* f17c81c: afaa0038 */ sw $t2,0x38($sp) .L0f17c820: -/* f17c820: 3c108008 */ lui $s0,%hi(g_MpSimulantTypes) -/* f17c824: 2610772c */ addiu $s0,$s0,%lo(g_MpSimulantTypes) +/* f17c820: 3c108008 */ lui $s0,%hi(g_BotProfiles) +/* f17c824: 2610772c */ addiu $s0,$s0,%lo(g_BotProfiles) /* f17c828: 00008825 */ or $s1,$zero,$zero /* f17c82c: 24130012 */ addiu $s3,$zero,0x12 .L0f17c830: @@ -4849,7 +4849,7 @@ glabel var7f1b81e8 .L0f17c858: /* f17c858: 8fac0038 */ lw $t4,0x38($sp) /* f17c85c: 8fad003c */ lw $t5,0x3c($sp) -/* f17c860: 3c19800b */ lui $t9,%hi(g_MpSimulants) +/* f17c860: 3c19800b */ lui $t9,%hi(g_BotConfigsArray) /* f17c864: 11800006 */ beqz $t4,.L0f17c880 /* f17c868: 000d7880 */ sll $t7,$t5,0x2 /* f17c86c: 8fa4003c */ lw $a0,0x3c($sp) @@ -4863,7 +4863,7 @@ glabel var7f1b81e8 /* f17c888: 000f7880 */ sll $t7,$t7,0x2 /* f17c88c: 01ed7823 */ subu $t7,$t7,$t5 /* f17c890: 000f7880 */ sll $t7,$t7,0x2 -/* f17c894: 2739c538 */ addiu $t9,$t9,%lo(g_MpSimulants) +/* f17c894: 2739c538 */ addiu $t9,$t9,%lo(g_BotConfigsArray) /* f17c898: 01f91021 */ addu $v0,$t7,$t9 /* f17c89c: 31d800ff */ andi $t8,$t6,0xff /* f17c8a0: 17000004 */ bnez $t8,.L0f17c8b4 @@ -4888,8 +4888,8 @@ glabel var7f1b81e8 /* f17c8e8: 002a0821 */ addu $at,$at,$t2 /* f17c8ec: 1000004b */ b .L0f17ca1c /* f17c8f0: ac28ee20 */ sw $t0,%lo(g_Menus+0xe20)($at) -/* f17c8f4: 3c108008 */ lui $s0,%hi(g_MpSimulantTypes) -/* f17c8f8: 2610772c */ addiu $s0,$s0,%lo(g_MpSimulantTypes) +/* f17c8f4: 3c108008 */ lui $s0,%hi(g_BotProfiles) +/* f17c8f8: 2610772c */ addiu $s0,$s0,%lo(g_BotProfiles) /* f17c8fc: 00008825 */ or $s1,$zero,$zero /* f17c900: 24130012 */ addiu $s3,$zero,0x12 .L0f17c904: @@ -4942,8 +4942,8 @@ glabel var7f1b81e8 /* f17c9b4: 1000001b */ b .L0f17ca24 /* f17c9b8: 8fbf002c */ lw $ra,0x2c($sp) /* f17c9bc: 8e8b0000 */ lw $t3,0x0($s4) -/* f17c9c0: 3c108008 */ lui $s0,%hi(g_MpSimulantTypes) -/* f17c9c4: 2610772c */ addiu $s0,$s0,%lo(g_MpSimulantTypes) +/* f17c9c0: 3c108008 */ lui $s0,%hi(g_BotProfiles) +/* f17c9c4: 2610772c */ addiu $s0,$s0,%lo(g_BotProfiles) /* f17c9c8: 000b60c0 */ sll $t4,$t3,0x3 /* f17c9cc: 026c6821 */ addu $t5,$s3,$t4 /* f17c9d0: 8daf0000 */ lw $t7,0x0($t5) @@ -5291,28 +5291,28 @@ s32 menuhandlerMpSimulantHead(s32 operation, struct menuitem *item, union handle */ switch (operation) { case MENUOP_SET: - g_MpSimulants[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.mpheadnum = start + data->carousel.value; + g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.mpheadnum = start + data->carousel.value; case MENUOP_FOCUS: if (operation == MENUOP_FOCUS && item->param2 == 1 - && g_MpSimulants[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.mpheadnum < start) { - g_MpSimulants[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.mpheadnum = start; + && g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.mpheadnum < start) { + g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.mpheadnum = start; } break; } - return func0f17b4f8(operation, item, data, g_MpSimulants[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.mpheadnum, 0); + return func0f17b4f8(operation, item, data, g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.mpheadnum, 0); } s32 menuhandlerMpSimulantBody(s32 operation, struct menuitem *item, union handlerdata *data) { if (operation == MENUOP_SET) { - g_MpSimulants[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.mpbodynum = data->carousel.value; + g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.mpbodynum = data->carousel.value; } return func0f179da4(operation, item, data, - g_MpSimulants[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.mpbodynum, - g_MpSimulants[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.mpheadnum, + g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.mpbodynum, + g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.mpheadnum, 0); } @@ -5378,7 +5378,7 @@ glabel menuhandlerMpSimulantDifficulty .L0f17ce40: /* f17ce40: 8f181448 */ lw $t8,%lo(g_MpPlayerNum)($t8) /* f17ce44: 3c08800a */ lui $t0,%hi(g_Menus+0xe1c) -/* f17ce48: 3c02800b */ lui $v0,%hi(g_MpSimulants+0x48) +/* f17ce48: 3c02800b */ lui $v0,%hi(g_BotConfigsArray+0x48) /* f17ce4c: 0018c8c0 */ sll $t9,$t8,0x3 /* f17ce50: 0338c823 */ subu $t9,$t9,$t8 /* f17ce54: 0019c880 */ sll $t9,$t9,0x2 @@ -5394,7 +5394,7 @@ glabel menuhandlerMpSimulantDifficulty /* f17ce7c: 01284823 */ subu $t1,$t1,$t0 /* f17ce80: 00094880 */ sll $t1,$t1,0x2 /* f17ce84: 00491021 */ addu $v0,$v0,$t1 -/* f17ce88: 9042c580 */ lbu $v0,%lo(g_MpSimulants+0x48)($v0) +/* f17ce88: 9042c580 */ lbu $v0,%lo(g_BotConfigsArray+0x48)($v0) /* f17ce8c: 04400005 */ bltz $v0,.L0f17cea4 /* f17ce90: 28410006 */ slti $at,$v0,0x6 /* f17ce94: 10200003 */ beqz $at,.L0f17cea4 @@ -5405,10 +5405,10 @@ glabel menuhandlerMpSimulantDifficulty /* f17cea4: 10000023 */ b .L0f17cf34 /* f17cea8: ae800000 */ sw $zero,0x0($s4) .L0f17ceac: -/* f17ceac: 3c108008 */ lui $s0,%hi(g_MpSimulantTypes) -/* f17ceb0: 3c118008 */ lui $s1,%hi(g_MpSimulantTypes+0x30) -/* f17ceb4: 2631775c */ addiu $s1,$s1,%lo(g_MpSimulantTypes+0x30) -/* f17ceb8: 2610772c */ addiu $s0,$s0,%lo(g_MpSimulantTypes) +/* f17ceac: 3c108008 */ lui $s0,%hi(g_BotProfiles) +/* f17ceb0: 3c118008 */ lui $s1,%hi(g_BotProfiles+0x30) +/* f17ceb4: 2631775c */ addiu $s1,$s1,%lo(g_BotProfiles+0x30) +/* f17ceb8: 2610772c */ addiu $s0,$s0,%lo(g_BotProfiles) .L0f17cebc: /* f17cebc: 0fc67244 */ jal mpIsFeatureUnlocked /* f17cec0: 92040006 */ lbu $a0,0x6($s0) @@ -5421,8 +5421,8 @@ glabel menuhandlerMpSimulantDifficulty /* f17ced8: 10000016 */ b .L0f17cf34 /* f17cedc: ae920000 */ sw $s2,0x0($s4) .L0f17cee0: -/* f17cee0: 3c108008 */ lui $s0,%hi(g_MpSimulantTypes) -/* f17cee4: 2610772c */ addiu $s0,$s0,%lo(g_MpSimulantTypes) +/* f17cee0: 3c108008 */ lui $s0,%hi(g_BotProfiles) +/* f17cee4: 2610772c */ addiu $s0,$s0,%lo(g_BotProfiles) /* f17cee8: 24130006 */ addiu $s3,$zero,0x6 .L0f17ceec: /* f17ceec: 0fc67244 */ jal mpIsFeatureUnlocked @@ -5505,7 +5505,7 @@ glabel menuhandlerMpSimulantDifficulty .L0f17ce40: /* f17ce40: 8f181448 */ lw $t8,%lo(g_MpPlayerNum)($t8) /* f17ce44: 3c08800a */ lui $t0,%hi(g_Menus+0xe1c) -/* f17ce48: 3c02800b */ lui $v0,%hi(g_MpSimulants+0x48) +/* f17ce48: 3c02800b */ lui $v0,%hi(g_BotConfigsArray+0x48) /* f17ce4c: 0018c8c0 */ sll $t9,$t8,0x3 /* f17ce50: 0338c823 */ subu $t9,$t9,$t8 /* f17ce54: 0019c880 */ sll $t9,$t9,0x2 @@ -5521,7 +5521,7 @@ glabel menuhandlerMpSimulantDifficulty /* f17ce7c: 01284823 */ subu $t1,$t1,$t0 /* f17ce80: 00094880 */ sll $t1,$t1,0x2 /* f17ce84: 00491021 */ addu $v0,$v0,$t1 -/* f17ce88: 9042c580 */ lbu $v0,%lo(g_MpSimulants+0x48)($v0) +/* f17ce88: 9042c580 */ lbu $v0,%lo(g_BotConfigsArray+0x48)($v0) /* f17ce8c: 04400005 */ bltz $v0,.L0f17cea4 /* f17ce90: 28410006 */ slti $at,$v0,0x6 /* f17ce94: 10200003 */ beqz $at,.L0f17cea4 @@ -5532,10 +5532,10 @@ glabel menuhandlerMpSimulantDifficulty /* f17cea4: 10000023 */ b .L0f17cf34 /* f17cea8: ae800000 */ sw $zero,0x0($s4) .L0f17ceac: -/* f17ceac: 3c108008 */ lui $s0,%hi(g_MpSimulantTypes) -/* f17ceb0: 3c118008 */ lui $s1,%hi(g_MpSimulantTypes+0x30) -/* f17ceb4: 2631775c */ addiu $s1,$s1,%lo(g_MpSimulantTypes+0x30) -/* f17ceb8: 2610772c */ addiu $s0,$s0,%lo(g_MpSimulantTypes) +/* f17ceac: 3c108008 */ lui $s0,%hi(g_BotProfiles) +/* f17ceb0: 3c118008 */ lui $s1,%hi(g_BotProfiles+0x30) +/* f17ceb4: 2631775c */ addiu $s1,$s1,%lo(g_BotProfiles+0x30) +/* f17ceb8: 2610772c */ addiu $s0,$s0,%lo(g_BotProfiles) .L0f17cebc: /* f17cebc: 0fc67244 */ jal mpIsFeatureUnlocked /* f17cec0: 92040006 */ lbu $a0,0x6($s0) @@ -5548,8 +5548,8 @@ glabel menuhandlerMpSimulantDifficulty /* f17ced8: 10000016 */ b .L0f17cf34 /* f17cedc: ae920000 */ sw $s2,0x0($s4) .L0f17cee0: -/* f17cee0: 3c108008 */ lui $s0,%hi(g_MpSimulantTypes) -/* f17cee4: 2610772c */ addiu $s0,$s0,%lo(g_MpSimulantTypes) +/* f17cee0: 3c108008 */ lui $s0,%hi(g_BotProfiles) +/* f17cee4: 2610772c */ addiu $s0,$s0,%lo(g_BotProfiles) /* f17cee8: 24130006 */ addiu $s3,$zero,0x6 .L0f17ceec: /* f17ceec: 0fc67244 */ jal mpIsFeatureUnlocked @@ -5726,7 +5726,7 @@ s32 menuhandlerMpDeleteSimulant(s32 operation, struct menuitem *item, union hand char *mpMenuTitleEditSimulant(struct menudialog *dialog) { - sprintf(g_StringPointer, "%s", &g_MpSimulants[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.name); + sprintf(g_StringPointer, "%s", &g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.name); return g_StringPointer; } @@ -5736,11 +5736,11 @@ s32 menuhandlerMpChangeSimulantType(s32 operation, struct menuitem *item, union s32 i; s32 count = 0; s32 simtypeindex = mpGetSimTypeIndex( - g_MpSimulants[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.simtype, - g_MpSimulants[g_Menus[g_MpPlayerNum].mpsetup.slotindex].difficulty); + g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].type, + g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].difficulty); for (i = 0; i < simtypeindex; i++) { - if (mpIsFeatureUnlocked(g_MpSimulantTypes[i].requirefeature)) { + if (mpIsFeatureUnlocked(g_BotProfiles[i].requirefeature)) { count++; } } @@ -5813,18 +5813,18 @@ char *mpMenuTextSimulantName(struct menuitem *item) { s32 index = item->param; - if (g_MpSimulants[index].base.name[0] == '\0' || (g_MpSetup.chrslots & 1 << (index + 4)) == 0) { + if (g_BotConfigsArray[index].base.name[0] == '\0' || (g_MpSetup.chrslots & 1 << (index + 4)) == 0) { return ""; } - return g_MpSimulants[index].base.name; + return g_BotConfigsArray[index].base.name; } char *func0f17d3dc(struct menuitem *item) { s32 index = item->param; - if (g_MpSimulants[index].base.name[0] == '\0' + if (g_BotConfigsArray[index].base.name[0] == '\0' || ((g_MpSetup.chrslots & 1 << (index + 4)) == 0)) { return ""; } @@ -5947,7 +5947,7 @@ s32 menuhandlerMpNTeams(s32 operation, struct menuitem *item, union handlerdata i = (start + 1) % numchrs; do { - struct mpchr *mpchr = func0f18c794(i); + struct mpchrconfig *mpchr = func0f18c794(i); if (teamsremaining); @@ -6219,12 +6219,12 @@ s32 menuhandlerMpMaximumTeams(s32 operation, struct menuitem *item, union handle for (i = 0; i != MAX_MPCHRS; i++) { if (g_MpSetup.chrslots & (1 << i)) { - struct mpchr *mpchr; + struct mpchrconfig *mpchr; if (i < 4) { - mpchr = &g_MpPlayers[i].base; + mpchr = &g_PlayerConfigsArray[i].base; } else { - mpchr = &g_MpSimulants[i - 4].base; + mpchr = &g_BotConfigsArray[i - 4].base; } mpchr->team = team++; @@ -6248,12 +6248,12 @@ s32 menuhandlerMpHumansVsSimulants(s32 operation, struct menuitem *item, union h for (i = 0; i != MAX_MPCHRS; i++) { if (g_MpSetup.chrslots & (1 << i)) { - struct mpchr *mpchr; + struct mpchrconfig *mpchr; if (i < 4) { - mpchr = &g_MpPlayers[i].base; + mpchr = &g_PlayerConfigsArray[i].base; } else { - mpchr = &g_MpSimulants[i - 4].base; + mpchr = &g_BotConfigsArray[i - 4].base; } mpchr->team = i < 4 ? 0 : 1; @@ -6276,12 +6276,12 @@ s32 menuhandlerMpHumanSimulantPairs(s32 operation, struct menuitem *item, union for (i = 0; i != MAX_MPCHRS; i++) { if (g_MpSetup.chrslots & (1 << i)) { - struct mpchr *mpchr; + struct mpchrconfig *mpchr; if (i < 4) { - mpchr = &g_MpPlayers[i].base; + mpchr = &g_PlayerConfigsArray[i].base; } else { - mpchr = &g_MpSimulants[i - 4].base; + mpchr = &g_BotConfigsArray[i - 4].base; } if (i < 4) { @@ -6304,7 +6304,7 @@ s32 menuhandlerMpHumanSimulantPairs(s32 operation, struct menuitem *item, union char *mpMenuTextChrNameForTeamSetup(struct menuitem *item) { - struct mpchr *mpchr = func0f18c794(item->param); + struct mpchrconfig *mpchr = func0f18c794(item->param); if (mpchr) { return mpchr->name; @@ -6332,7 +6332,7 @@ s32 func0f17dac4(s32 operation, struct menuitem *item, union handlerdata *data) s32 menuhandlerMpTeamSlot(s32 operation, struct menuitem *item, union handlerdata *data) { - struct mpchr *mpchr; + struct mpchrconfig *mpchr; switch (operation) { case MENUOP_SET: @@ -7984,7 +7984,7 @@ s32 menuhandlerMpLock(s32 operation, struct menuitem *item, union handlerdata *d return (s32) langGet(labels[data->dropdown.value]); } if (mpGetLockType() == MPLOCKTYPE_PLAYER) { - return (s32) g_MpPlayers[mpGetLockPlayerNum()].base.name; + return (s32) g_PlayerConfigsArray[mpGetLockPlayerNum()].base.name; } return (s32) mpGetCurrentPlayerName(item); case MENUOP_SET: @@ -8004,7 +8004,7 @@ s32 menuhandlerMpLock(s32 operation, struct menuitem *item, union handlerdata *d s32 menuhandlerMpSavePlayer(s32 operation, struct menuitem *item, union handlerdata *data) { if (operation == MENUOP_SET) { - if (g_MpPlayers[g_MpPlayerNum].fileguid.fileid == 0) { + if (g_PlayerConfigsArray[g_MpPlayerNum].fileguid.fileid == 0) { filemgrPushSelectLocationDialog(6, FILETYPE_MPPLAYER); } else { menuPushDialog(&g_MpSavePlayerMenuDialog); @@ -8016,7 +8016,7 @@ s32 menuhandlerMpSavePlayer(s32 operation, struct menuitem *item, union handlerd char *mpMenuTextSavePlayerOrCopy(struct menuitem *item) { - if (g_MpPlayers[g_MpPlayerNum].fileguid.fileid == 0) { + if (g_PlayerConfigsArray[g_MpPlayerNum].fileguid.fileid == 0) { return langGet(L_MPMENU_038); // "Save Player" } @@ -8114,7 +8114,7 @@ void mpConfigureQuickTeamPlayers(void) g_MpSetup.options |= MPOPTION_TEAMSENABLED; for (i = 0; i < 4; i++) { - g_MpPlayers[i].base.team = g_Vars.mpplayerteams[i]; + g_PlayerConfigsArray[i].base.team = g_Vars.mpplayerteams[i]; } break; @@ -8122,7 +8122,7 @@ void mpConfigureQuickTeamPlayers(void) g_MpSetup.options |= MPOPTION_TEAMSENABLED; for (i = 0; i < 4; i++) { - g_MpPlayers[i].base.team = 0; + g_PlayerConfigsArray[i].base.team = 0; } break; @@ -8130,7 +8130,7 @@ void mpConfigureQuickTeamPlayers(void) g_MpSetup.options |= MPOPTION_TEAMSENABLED; for (i = 0; i < 4; i++) { - g_MpPlayers[i].base.team = i; + g_PlayerConfigsArray[i].base.team = i; } break; @@ -8140,7 +8140,7 @@ void mpConfigureQuickTeamPlayers(void) void mpConfigureQuickTeamSimulants(void) { - struct mpchr *mpchr; + struct mpchrconfig *mpchr; s32 numchrs; s32 numsims; s32 i; @@ -8170,8 +8170,8 @@ void mpConfigureQuickTeamSimulants(void) func0f18cddc(); - for (i = 0; i < ARRAYCOUNT(g_MpSimulants); i++) { - g_MpSimulants[i].base.team = 1; + for (i = 0; i < ARRAYCOUNT(g_BotConfigsArray); i++) { + g_BotConfigsArray[i].base.team = 1; } break; @@ -8184,7 +8184,7 @@ void mpConfigureQuickTeamSimulants(void) if (numsims >= 0) { func0f18c984(numsims, g_Vars.mpsimdifficulty); - g_MpSimulants[numsims].base.team = mpchr->team; + g_BotConfigsArray[numsims].base.team = mpchr->team; } } } @@ -8318,7 +8318,7 @@ s32 mpQuickTeamSimulantDifficultyHandler(s32 operation, struct menuitem *item, u switch (operation) { case MENUOP_GETOPTIONCOUNT: for (i = 0; i < 6; i++) { - if (mpIsFeatureUnlocked(g_MpSimulantTypes[i].requirefeature)) { + if (mpIsFeatureUnlocked(g_BotProfiles[i].requirefeature)) { count++; } } @@ -8327,7 +8327,7 @@ s32 mpQuickTeamSimulantDifficultyHandler(s32 operation, struct menuitem *item, u break; case MENUOP_GETOPTIONTEXT: for (i = 0; i < 6; i++) { - if (mpIsFeatureUnlocked(g_MpSimulantTypes[i].requirefeature)) { + if (mpIsFeatureUnlocked(g_BotProfiles[i].requirefeature)) { if (count == data->dropdown.value) { return (s32) langGet(i + L_MISC_082); } diff --git a/src/game/mpstats.c b/src/game/mpstats.c index 8cabf5441..c3eb853a6 100644 --- a/src/game/mpstats.c +++ b/src/game/mpstats.c @@ -8,7 +8,7 @@ #include "game/hudmsg.h" #include "game/game_127910.h" #include "game/mplayer/setup.h" -#include "game/game_197600.h" +#include "game/botcmd.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" #include "game/options.h" @@ -172,16 +172,16 @@ void mpstatsRecordPlayerSuicide(void) s32 duration; s32 time; s32 mpindex; - struct mpchr *mpchr; + struct mpchrconfig *mpchr; if (g_Vars.normmplayerisrunning) { time = getMissionTime(); mpindex = g_Vars.currentplayerstats->mpindex; if (mpindex < 4) { - mpchr = &g_MpPlayers[mpindex].base; + mpchr = &g_PlayerConfigsArray[mpindex].base; } else { - mpchr = &g_MpSimulants[mpindex - 4].base; + mpchr = &g_BotConfigsArray[mpindex - 4].base; } // Show HUD message @@ -231,9 +231,9 @@ void mpstatsRecordPlayerSuicide(void) void mpstatsRecordDeath(s32 aplayernum, s32 vplayernum) { s32 vmpindex = -1; - struct mpchr *vmpchr = NULL; + struct mpchrconfig *vmpchr = NULL; s32 ampindex; - struct mpchr *ampchr = NULL; + struct mpchrconfig *ampchr = NULL; s32 prevplayernum; char text[256]; @@ -247,9 +247,9 @@ void mpstatsRecordDeath(s32 aplayernum, s32 vplayernum) if (ampindex >= 0) { if (ampindex < 4) { - ampchr = &g_MpPlayers[ampindex].base; + ampchr = &g_PlayerConfigsArray[ampindex].base; } else { - ampchr = &g_MpSimulants[ampindex - 4].base; + ampchr = &g_BotConfigsArray[ampindex - 4].base; } } } @@ -259,9 +259,9 @@ void mpstatsRecordDeath(s32 aplayernum, s32 vplayernum) if (vmpindex >= 0) { if (vmpindex < 4) { - vmpchr = &g_MpPlayers[vmpindex].base; + vmpchr = &g_PlayerConfigsArray[vmpindex].base; } else { - vmpchr = &g_MpSimulants[vmpindex - 4].base; + vmpchr = &g_BotConfigsArray[vmpindex - 4].base; } } } @@ -293,7 +293,7 @@ void mpstatsRecordDeath(s32 aplayernum, s32 vplayernum) if (g_Vars.normmplayerisrunning && aplayernum >= 0) { // "Killed by %s" - sprintf(text, "%s %s", langGet(L_MISC_183), var800ac500[aplayernum]->name); + sprintf(text, "%s %s", langGet(L_MISC_183), g_MpAllChrConfigPtrs[aplayernum]->name); hudmsgCreate(text, HUDMSGTYPE_DEFAULT); } @@ -313,7 +313,7 @@ void mpstatsRecordDeath(s32 aplayernum, s32 vplayernum) if (g_Vars.normmplayerisrunning && vplayernum >= 0) { // "Killed %s" - sprintf(text, "%s %s", langGet(L_MISC_184), var800ac500[vplayernum]->name); + sprintf(text, "%s %s", langGet(L_MISC_184), g_MpAllChrConfigPtrs[vplayernum]->name); hudmsgCreate(text, HUDMSGTYPE_DEFAULT); } @@ -326,18 +326,18 @@ void mpstatsRecordDeath(s32 aplayernum, s32 vplayernum) && aplayernum >= 0 && vplayernum >= PLAYERCOUNT() && aplayernum != vplayernum) { - g_MpPlayerChrs[vplayernum]->aibot->lastkilledbyplayernum = aplayernum; + g_MpAllChrPtrs[vplayernum]->aibot->lastkilledbyplayernum = aplayernum; } } - if (g_Vars.normmplayerisrunning && aplayernum >= 0 && g_MpPlayerChrs[aplayernum]->aibot) { - s32 index = mpGetWeaponIndexByWeaponNum(g_MpPlayerChrs[aplayernum]->aibot->weaponnum); + if (g_Vars.normmplayerisrunning && aplayernum >= 0 && g_MpAllChrPtrs[aplayernum]->aibot) { + s32 index = mpGetWeaponSlotByWeaponNum(g_MpAllChrPtrs[aplayernum]->aibot->weaponnum); if (index >= 0) { if (aplayernum == vplayernum) { - g_MpPlayerChrs[aplayernum]->aibot->suicidesbygunfunc[index][g_MpPlayerChrs[aplayernum]->aibot->gunfunc]++; + g_MpAllChrPtrs[aplayernum]->aibot->suicidesbygunfunc[index][g_MpAllChrPtrs[aplayernum]->aibot->gunfunc]++; } else { - g_MpPlayerChrs[aplayernum]->aibot->killsbygunfunc[index][g_MpPlayerChrs[aplayernum]->aibot->gunfunc]++; + g_MpAllChrPtrs[aplayernum]->aibot->killsbygunfunc[index][g_MpAllChrPtrs[aplayernum]->aibot->gunfunc]++; } } } diff --git a/src/game/options.c b/src/game/options.c index f4ce203a2..5cef297d6 100644 --- a/src/game/options.c +++ b/src/game/options.c @@ -24,77 +24,77 @@ u16 var8008231cnb = 0x7fff; s32 optionsGetControlMode(s32 mpchrnum) { - return g_MpPlayers[mpchrnum].base.controlmode; + return g_PlayerConfigsArray[mpchrnum].controlmode; } void optionsSetControlMode(s32 mpchrnum, s32 mode) { - g_MpPlayers[mpchrnum].base.controlmode = mode; + g_PlayerConfigsArray[mpchrnum].controlmode = mode; } s32 optionsGetContpadNum1(s32 mpchrnum) { - return g_MpPlayers[mpchrnum].base.contpad1; + return g_PlayerConfigsArray[mpchrnum].contpad1; } s32 optionsGetContpadNum2(s32 mpchrnum) { - return g_MpPlayers[mpchrnum].base.contpad2; + return g_PlayerConfigsArray[mpchrnum].contpad2; } s32 optionsGetForwardPitch(s32 mpchrnum) { - return (g_MpPlayers[mpchrnum].options & OPTION_FORWARDPITCH) != 0; + return (g_PlayerConfigsArray[mpchrnum].options & OPTION_FORWARDPITCH) != 0; } s32 optionsGetAutoAim(s32 mpchrnum) { - return (g_MpPlayers[mpchrnum].options & OPTION_AUTOAIM) != 0; + return (g_PlayerConfigsArray[mpchrnum].options & OPTION_AUTOAIM) != 0; } s32 optionsGetLookAhead(s32 mpchrnum) { - return (g_MpPlayers[mpchrnum].options & OPTION_LOOKAHEAD) != 0; + return (g_PlayerConfigsArray[mpchrnum].options & OPTION_LOOKAHEAD) != 0; } s32 optionsGetAimControl(s32 mpchrnum) { - return (g_MpPlayers[mpchrnum].options & OPTION_AIMCONTROL) != 0; + return (g_PlayerConfigsArray[mpchrnum].options & OPTION_AIMCONTROL) != 0; } s32 optionsGetSightOnScreen(s32 mpchrnum) { - return (g_MpPlayers[mpchrnum].options & OPTION_SIGHTONSCREEN) != 0; + return (g_PlayerConfigsArray[mpchrnum].options & OPTION_SIGHTONSCREEN) != 0; } s32 optionsGetAmmoOnScreen(s32 mpchrnum) { - return (g_MpPlayers[mpchrnum].options & OPTION_AMMOONSCREEN) != 0; + return (g_PlayerConfigsArray[mpchrnum].options & OPTION_AMMOONSCREEN) != 0; } s32 optionsGetShowGunFunction(s32 mpchrnum) { - return (g_MpPlayers[mpchrnum].options & OPTION_SHOWGUNFUNCTION) != 0; + return (g_PlayerConfigsArray[mpchrnum].options & OPTION_SHOWGUNFUNCTION) != 0; } s32 optionsGetAlwaysShowTarget(s32 mpchrnum) { - return (g_MpPlayers[mpchrnum].options & OPTION_ALWAYSSHOWTARGET) != 0; + return (g_PlayerConfigsArray[mpchrnum].options & OPTION_ALWAYSSHOWTARGET) != 0; } s32 optionsGetShowZoomRange(s32 mpchrnum) { - return (g_MpPlayers[mpchrnum].options & OPTION_SHOWZOOMRANGE) != 0; + return (g_PlayerConfigsArray[mpchrnum].options & OPTION_SHOWZOOMRANGE) != 0; } s32 optionsGetPaintball(s32 mpchrnum) { - return (g_MpPlayers[mpchrnum].options & OPTION_PAINTBALL) != 0; + return (g_PlayerConfigsArray[mpchrnum].options & OPTION_PAINTBALL) != 0; } s32 optionsGetShowMissionTime(s32 mpchrnum) { - return (g_MpPlayers[mpchrnum].options & OPTION_SHOWMISSIONTIME) != 0; + return (g_PlayerConfigsArray[mpchrnum].options & OPTION_SHOWMISSIONTIME) != 0; } u8 optionsGetInGameSubtitles(void) @@ -109,105 +109,105 @@ u8 optionsGetCutsceneSubtitles(void) s32 optionsGetHeadRoll(s32 mpchrnum) { - return (g_MpPlayers[mpchrnum].options & OPTION_HEADROLL) != 0; + return (g_PlayerConfigsArray[mpchrnum].options & OPTION_HEADROLL) != 0; } void optionsSetForwardPitch(s32 mpchrnum, bool enable) { if (enable) { - g_MpPlayers[mpchrnum].options |= OPTION_FORWARDPITCH; + g_PlayerConfigsArray[mpchrnum].options |= OPTION_FORWARDPITCH; } else { - g_MpPlayers[mpchrnum].options &= ~OPTION_FORWARDPITCH; + g_PlayerConfigsArray[mpchrnum].options &= ~OPTION_FORWARDPITCH; } } void optionsSetAutoAim(s32 mpchrnum, bool enable) { if (enable) { - g_MpPlayers[mpchrnum].options |= OPTION_AUTOAIM; + g_PlayerConfigsArray[mpchrnum].options |= OPTION_AUTOAIM; } else { - g_MpPlayers[mpchrnum].options &= ~OPTION_AUTOAIM; + g_PlayerConfigsArray[mpchrnum].options &= ~OPTION_AUTOAIM; } } void optionsSetLookAhead(s32 mpchrnum, bool enable) { if (enable) { - g_MpPlayers[mpchrnum].options |= OPTION_LOOKAHEAD; + g_PlayerConfigsArray[mpchrnum].options |= OPTION_LOOKAHEAD; } else { - g_MpPlayers[mpchrnum].options &= ~OPTION_LOOKAHEAD; + g_PlayerConfigsArray[mpchrnum].options &= ~OPTION_LOOKAHEAD; } } void optionsSetAimControl(s32 mpchrnum, s32 index) { if (index) { - g_MpPlayers[mpchrnum].options |= OPTION_AIMCONTROL; + g_PlayerConfigsArray[mpchrnum].options |= OPTION_AIMCONTROL; } else { - g_MpPlayers[mpchrnum].options &= ~OPTION_AIMCONTROL; + g_PlayerConfigsArray[mpchrnum].options &= ~OPTION_AIMCONTROL; } } void optionsSetSightOnScreen(s32 mpchrnum, bool enable) { if (enable) { - g_MpPlayers[mpchrnum].options |= OPTION_SIGHTONSCREEN; + g_PlayerConfigsArray[mpchrnum].options |= OPTION_SIGHTONSCREEN; } else { - g_MpPlayers[mpchrnum].options &= ~OPTION_SIGHTONSCREEN; + g_PlayerConfigsArray[mpchrnum].options &= ~OPTION_SIGHTONSCREEN; } } void optionsSetAmmoOnScreen(s32 mpchrnum, bool enable) { if (enable) { - g_MpPlayers[mpchrnum].options |= OPTION_AMMOONSCREEN; + g_PlayerConfigsArray[mpchrnum].options |= OPTION_AMMOONSCREEN; } else { - g_MpPlayers[mpchrnum].options &= ~OPTION_AMMOONSCREEN; + g_PlayerConfigsArray[mpchrnum].options &= ~OPTION_AMMOONSCREEN; } } void optionsSetShowGunFunction(s32 mpchrnum, bool enable) { if (enable) { - g_MpPlayers[mpchrnum].options |= OPTION_SHOWGUNFUNCTION; + g_PlayerConfigsArray[mpchrnum].options |= OPTION_SHOWGUNFUNCTION; } else { - g_MpPlayers[mpchrnum].options &= ~OPTION_SHOWGUNFUNCTION; + g_PlayerConfigsArray[mpchrnum].options &= ~OPTION_SHOWGUNFUNCTION; } } void optionsSetAlwaysShowTarget(s32 mpchrnum, bool enable) { if (enable) { - g_MpPlayers[mpchrnum].options |= OPTION_ALWAYSSHOWTARGET; + g_PlayerConfigsArray[mpchrnum].options |= OPTION_ALWAYSSHOWTARGET; } else { - g_MpPlayers[mpchrnum].options &= ~OPTION_ALWAYSSHOWTARGET; + g_PlayerConfigsArray[mpchrnum].options &= ~OPTION_ALWAYSSHOWTARGET; } } void optionsSetShowZoomRange(s32 mpchrnum, bool enable) { if (enable) { - g_MpPlayers[mpchrnum].options |= OPTION_SHOWZOOMRANGE; + g_PlayerConfigsArray[mpchrnum].options |= OPTION_SHOWZOOMRANGE; } else { - g_MpPlayers[mpchrnum].options &= ~OPTION_SHOWZOOMRANGE; + g_PlayerConfigsArray[mpchrnum].options &= ~OPTION_SHOWZOOMRANGE; } } void optionsSetPaintball(s32 mpchrnum, bool enable) { if (enable) { - g_MpPlayers[mpchrnum].options |= OPTION_PAINTBALL; + g_PlayerConfigsArray[mpchrnum].options |= OPTION_PAINTBALL; } else { - g_MpPlayers[mpchrnum].options &= ~OPTION_PAINTBALL; + g_PlayerConfigsArray[mpchrnum].options &= ~OPTION_PAINTBALL; } } void optionsSetShowMissionTime(s32 mpchrnum, bool enable) { if (enable) { - g_MpPlayers[mpchrnum].options |= OPTION_SHOWMISSIONTIME; + g_PlayerConfigsArray[mpchrnum].options |= OPTION_SHOWMISSIONTIME; } else { - g_MpPlayers[mpchrnum].options &= ~OPTION_SHOWMISSIONTIME; + g_PlayerConfigsArray[mpchrnum].options &= ~OPTION_SHOWMISSIONTIME; } } @@ -224,9 +224,9 @@ void optionsSetCutsceneSubtitles(s32 enable) void optionsSetHeadRoll(s32 mpchrnum, bool enable) { if (enable) { - g_MpPlayers[mpchrnum].options |= OPTION_HEADROLL; + g_PlayerConfigsArray[mpchrnum].options |= OPTION_HEADROLL; } else { - g_MpPlayers[mpchrnum].options &= ~OPTION_HEADROLL; + g_PlayerConfigsArray[mpchrnum].options &= ~OPTION_HEADROLL; } } diff --git a/src/game/prop.c b/src/game/prop.c index 1fbb3902b..1089eaaa3 100644 --- a/src/game/prop.c +++ b/src/game/prop.c @@ -20,7 +20,7 @@ #include "game/smoke/smoke.h" #include "game/sparks/sparks.h" #include "game/bg.h" -#include "game/game_190260.h" +#include "game/bot.h" #include "game/training/training.h" #include "game/pad.h" #include "game/propobj.h" @@ -1973,7 +1973,7 @@ glabel var7f1ab190pf /* f063740: 8c4f02d4 */ lw $t7,0x2d4($v0) /* f063744: 11e00005 */ beqz $t7,.PF0f06375c /* f063748: 00000000 */ nop -/* f06374c: 0fc64a62 */ jal aibotTick +/* f06374c: 0fc64a62 */ jal botTick /* f063750: 02002025 */ move $a0,$s0 /* f063754: 10000004 */ b .PF0f063768 /* f063758: 00403025 */ move $a2,$v0 @@ -2143,7 +2143,7 @@ glabel var7f1ab190pf /* f0639ac: 8c4f02d4 */ lw $t7,0x2d4($v0) /* f0639b0: 11e00005 */ beqz $t7,.PF0f0639c8 /* f0639b4: 00000000 */ nop -/* f0639b8: 0fc64a62 */ jal aibotTick +/* f0639b8: 0fc64a62 */ jal botTick /* f0639bc: 02002025 */ move $a0,$s0 /* f0639c0: 1000003c */ b .PF0f063ab4 /* f0639c4: 00403025 */ move $a2,$v0 @@ -2959,7 +2959,7 @@ glabel propsTick /* f0634d4: 8c4f02d4 */ lw $t7,0x2d4($v0) /* f0634d8: 11e00005 */ beqz $t7,.L0f0634f0 /* f0634dc: 00000000 */ nop -/* f0634e0: 0fc64634 */ jal aibotTick +/* f0634e0: 0fc64634 */ jal botTick /* f0634e4: 02002025 */ or $a0,$s0,$zero /* f0634e8: 10000004 */ b .L0f0634fc /* f0634ec: 00403025 */ or $a2,$v0,$zero @@ -3123,7 +3123,7 @@ glabel propsTick /* f063728: 8c4f02d4 */ lw $t7,0x2d4($v0) /* f06372c: 11e00005 */ beqz $t7,.L0f063744 /* f063730: 00000000 */ nop -/* f063734: 0fc64634 */ jal aibotTick +/* f063734: 0fc64634 */ jal botTick /* f063738: 02002025 */ or $a0,$s0,$zero /* f06373c: 1000003c */ b .L0f063830 /* f063740: 00403025 */ or $a2,$v0,$zero @@ -3932,7 +3932,7 @@ glabel propsTick /* f062748: 8c4f02d4 */ lw $t7,0x2d4($v0) /* f06274c: 11e00005 */ beqz $t7,.NB0f062764 /* f062750: 00000000 */ sll $zero,$zero,0x0 -/* f062754: 0fc62e6d */ jal aibotTick +/* f062754: 0fc62e6d */ jal botTick /* f062758: 02002025 */ or $a0,$s0,$zero /* f06275c: 10000004 */ beqz $zero,.NB0f062770 /* f062760: 00403025 */ or $a2,$v0,$zero @@ -4096,7 +4096,7 @@ glabel propsTick /* f06299c: 8c4f02d4 */ lw $t7,0x2d4($v0) /* f0629a0: 11e00005 */ beqz $t7,.NB0f0629b8 /* f0629a4: 00000000 */ sll $zero,$zero,0x0 -/* f0629a8: 0fc62e6d */ jal aibotTick +/* f0629a8: 0fc62e6d */ jal botTick /* f0629ac: 02002025 */ or $a0,$s0,$zero /* f0629b0: 1000003c */ beqz $zero,.NB0f062aa4 /* f0629b4: 00403025 */ or $a2,$v0,$zero @@ -4803,7 +4803,7 @@ glabel propsTick // splatTick(prop); // // if (chr && chr->aibot) { -// op = aibotTick(prop); +// op = botTick(prop); // } else { // op = chrTick(prop); // } @@ -4866,7 +4866,7 @@ glabel propsTick // splatTick(prop); // // if (chr && chr->aibot) { -// op = aibotTick(prop); +// op = botTick(prop); // } else { // op = chrTick(prop); // } diff --git a/src/game/propobj.c b/src/game/propobj.c index 33d4ab2ce..dda033486 100644 --- a/src/game/propobj.c +++ b/src/game/propobj.c @@ -48,8 +48,8 @@ #include "game/mplayer/setup.h" #include "game/mplayer/scenarios.h" #include "game/mpstats.h" -#include "game/game_190260.h" -#include "game/game_1999b0.h" +#include "game/bot.h" +#include "game/botact.h" #include "game/training/training.h" #include "game/lang.h" #include "game/mplayer/mplayer.h" @@ -5975,9 +5975,9 @@ void objFree(struct defaultobj *obj, bool freeprop, bool canregen) && obj->projectile->ownerprop) { s32 i; - for (i = 0; i < g_MpNumPlayers; i++) { - if (g_MpPlayerChrs[i]->aibot && g_MpPlayerChrs[i]->aibot->skrocket == obj->prop) { - g_MpPlayerChrs[i]->aibot->skrocket = NULL; + for (i = 0; i < g_MpNumChrs; i++) { + if (g_MpAllChrPtrs[i]->aibot && g_MpAllChrPtrs[i]->aibot->skrocket == obj->prop) { + g_MpAllChrPtrs[i]->aibot->skrocket = NULL; } } } @@ -6046,9 +6046,9 @@ void objFree(struct defaultobj *obj, bool freeprop, bool canregen) if (g_Vars.normmplayerisrunning) { s32 i; - for (i = 0; i < g_MpNumPlayers; i++) { - if (g_MpPlayerChrs[i]->aibot && g_MpPlayerChrs[i]->aibot->fetchprop == obj->prop) { - g_MpPlayerChrs[i]->aibot->fetchprop = NULL; + for (i = 0; i < g_MpNumChrs; i++) { + if (g_MpAllChrPtrs[i]->aibot && g_MpAllChrPtrs[i]->aibot->fetchprop == obj->prop) { + g_MpAllChrPtrs[i]->aibot->fetchprop = NULL; } } } @@ -21716,7 +21716,7 @@ glabel var7f1aa3d0 /* f073564: 26650008 */ addiu $a1,$s3,0x8 /* f073568: 24460008 */ addiu $a2,$v0,0x8 /* f07356c: 26670028 */ addiu $a3,$s3,0x28 -/* f073570: 0fc669b4 */ jal func0f19a6d0 +/* f073570: 0fc669b4 */ jal botactFindRocketRoute /* f073574: afb20014 */ sw $s2,0x14($sp) /* f073578: c7ac0094 */ lwc1 $f12,0x94($sp) /* f07357c: 1440000c */ bnez $v0,.L0f0735b0 @@ -21729,7 +21729,7 @@ glabel var7f1aa3d0 /* f073594: 956400f8 */ lhu $a0,0xf8($t3) /* f073598: e7ae008c */ swc1 $f14,0x8c($sp) /* f07359c: e7ac0094 */ swc1 $f12,0x94($sp) -/* f0735a0: 0fc669f4 */ jal func0f19a7d0 +/* f0735a0: 0fc669f4 */ jal botactGetRocketSpawnPos /* f0735a4: 264500c4 */ addiu $a1,$s2,0xc4 /* f0735a8: c7ac0094 */ lwc1 $f12,0x94($sp) /* f0735ac: c7ae008c */ lwc1 $f14,0x8c($sp) @@ -21941,10 +21941,10 @@ glabel var7f1aa3d0 /* f0738ac: 12800065 */ beqz $s4,.L0f073a44 /* f0738b0: 8faf0188 */ lw $t7,0x188($sp) /* f0738b4: 85f80062 */ lh $t8,0x62($t7) -/* f0738b8: 3c19800b */ lui $t9,%hi(g_MpNumPlayers) +/* f0738b8: 3c19800b */ lui $t9,%hi(g_MpNumChrs) /* f0738bc: 13000061 */ beqz $t8,.L0f073a44 /* f0738c0: 00000000 */ nop -/* f0738c4: 8f39c530 */ lw $t9,%lo(g_MpNumPlayers)($t9) +/* f0738c4: 8f39c530 */ lw $t9,%lo(g_MpNumChrs)($t9) /* f0738c8: 00008825 */ or $s1,$zero,$zero /* f0738cc: 1b20005d */ blez $t9,.L0f073a44 /* f0738d0: 00000000 */ nop @@ -21962,7 +21962,7 @@ glabel var7f1aa3d0 /* f0738fc: 24060002 */ addiu $a2,$zero,0x2 /* f073900: 1040004a */ beqz $v0,.L0f073a2c /* f073904: 00002025 */ or $a0,$zero,$zero -/* f073908: 0fc64a53 */ jal func0f19294c +/* f073908: 0fc64a53 */ jal bot0f19294c /* f07390c: 02002825 */ or $a1,$s0,$zero /* f073910: 14400046 */ bnez $v0,.L0f073a2c /* f073914: 00000000 */ nop @@ -21998,8 +21998,8 @@ glabel var7f1aa3d0 /* f073988: 00000000 */ nop /* f07398c: 0fc633fe */ jal mpPlayerGetIndex /* f073990: 02802025 */ or $a0,$s4,$zero -/* f073994: 3c0b800b */ lui $t3,%hi(g_MpNumPlayers) -/* f073998: 8d6bc530 */ lw $t3,%lo(g_MpNumPlayers)($t3) +/* f073994: 3c0b800b */ lui $t3,%hi(g_MpNumChrs) +/* f073998: 8d6bc530 */ lw $t3,%lo(g_MpNumChrs)($t3) /* f07399c: 8eaa000c */ lw $t2,0xc($s5) /* f0739a0: 26640008 */ addiu $a0,$s3,0x8 /* f0739a4: 26650028 */ addiu $a1,$s3,0x28 @@ -22039,8 +22039,8 @@ glabel var7f1aa3d0 /* f073a24: a2400104 */ sb $zero,0x104($s2) /* f073a28: e64600cc */ swc1 $f6,0xcc($s2) .L0f073a2c: -/* f073a2c: 3c08800b */ lui $t0,%hi(g_MpNumPlayers) -/* f073a30: 8d08c530 */ lw $t0,%lo(g_MpNumPlayers)($t0) +/* f073a2c: 3c08800b */ lui $t0,%hi(g_MpNumChrs) +/* f073a30: 8d08c530 */ lw $t0,%lo(g_MpNumChrs)($t0) /* f073a34: 26310001 */ addiu $s1,$s1,0x1 /* f073a38: 0228082a */ slt $at,$s1,$t0 /* f073a3c: 1420ffa5 */ bnez $at,.L0f0738d4 @@ -22173,7 +22173,7 @@ glabel var7f1aa3d0 /* f073564: 26650008 */ addiu $a1,$s3,0x8 /* f073568: 24460008 */ addiu $a2,$v0,0x8 /* f07356c: 26670028 */ addiu $a3,$s3,0x28 -/* f073570: 0fc669b4 */ jal func0f19a6d0 +/* f073570: 0fc669b4 */ jal botactFindRocketRoute /* f073574: afb20014 */ sw $s2,0x14($sp) /* f073578: c7ac0094 */ lwc1 $f12,0x94($sp) /* f07357c: 1440000c */ bnez $v0,.L0f0735b0 @@ -22186,7 +22186,7 @@ glabel var7f1aa3d0 /* f073594: 956400f8 */ lhu $a0,0xf8($t3) /* f073598: e7ae008c */ swc1 $f14,0x8c($sp) /* f07359c: e7ac0094 */ swc1 $f12,0x94($sp) -/* f0735a0: 0fc669f4 */ jal func0f19a7d0 +/* f0735a0: 0fc669f4 */ jal botactGetRocketSpawnPos /* f0735a4: 264500c4 */ addiu $a1,$s2,0xc4 /* f0735a8: c7ac0094 */ lwc1 $f12,0x94($sp) /* f0735ac: c7ae008c */ lwc1 $f14,0x8c($sp) @@ -22398,10 +22398,10 @@ glabel var7f1aa3d0 /* f0738ac: 12800065 */ beqz $s4,.L0f073a44 /* f0738b0: 8faf0188 */ lw $t7,0x188($sp) /* f0738b4: 85f80062 */ lh $t8,0x62($t7) -/* f0738b8: 3c19800b */ lui $t9,%hi(g_MpNumPlayers) +/* f0738b8: 3c19800b */ lui $t9,%hi(g_MpNumChrs) /* f0738bc: 13000061 */ beqz $t8,.L0f073a44 /* f0738c0: 00000000 */ nop -/* f0738c4: 8f39c530 */ lw $t9,%lo(g_MpNumPlayers)($t9) +/* f0738c4: 8f39c530 */ lw $t9,%lo(g_MpNumChrs)($t9) /* f0738c8: 00008825 */ or $s1,$zero,$zero /* f0738cc: 1b20005d */ blez $t9,.L0f073a44 /* f0738d0: 00000000 */ nop @@ -22419,7 +22419,7 @@ glabel var7f1aa3d0 /* f0738fc: 24060002 */ addiu $a2,$zero,0x2 /* f073900: 1040004a */ beqz $v0,.L0f073a2c /* f073904: 00002025 */ or $a0,$zero,$zero -/* f073908: 0fc64a53 */ jal func0f19294c +/* f073908: 0fc64a53 */ jal bot0f19294c /* f07390c: 02002825 */ or $a1,$s0,$zero /* f073910: 14400046 */ bnez $v0,.L0f073a2c /* f073914: 00000000 */ nop @@ -22455,8 +22455,8 @@ glabel var7f1aa3d0 /* f073988: 00000000 */ nop /* f07398c: 0fc633fe */ jal mpPlayerGetIndex /* f073990: 02802025 */ or $a0,$s4,$zero -/* f073994: 3c0b800b */ lui $t3,%hi(g_MpNumPlayers) -/* f073998: 8d6bc530 */ lw $t3,%lo(g_MpNumPlayers)($t3) +/* f073994: 3c0b800b */ lui $t3,%hi(g_MpNumChrs) +/* f073998: 8d6bc530 */ lw $t3,%lo(g_MpNumChrs)($t3) /* f07399c: 8eaa000c */ lw $t2,0xc($s5) /* f0739a0: 26640008 */ addiu $a0,$s3,0x8 /* f0739a4: 26650028 */ addiu $a1,$s3,0x28 @@ -22496,8 +22496,8 @@ glabel var7f1aa3d0 /* f073a24: a2400104 */ sb $zero,0x104($s2) /* f073a28: e64600cc */ swc1 $f6,0xcc($s2) .L0f073a2c: -/* f073a2c: 3c08800b */ lui $t0,%hi(g_MpNumPlayers) -/* f073a30: 8d08c530 */ lw $t0,%lo(g_MpNumPlayers)($t0) +/* f073a2c: 3c08800b */ lui $t0,%hi(g_MpNumChrs) +/* f073a30: 8d08c530 */ lw $t0,%lo(g_MpNumChrs)($t0) /* f073a34: 26310001 */ addiu $s1,$s1,0x1 /* f073a38: 0228082a */ slt $at,$s1,$t0 /* f073a3c: 1420ffa5 */ bnez $at,.L0f0738d4 @@ -35620,11 +35620,11 @@ glabel var7f1aa580 /* f079074: 3c09800a */ lui $t1,%hi(g_Vars) /* f079078: 25299fc0 */ addiu $t1,$t1,%lo(g_Vars) /* f07907c: 8d390318 */ lw $t9,0x318($t1) -/* f079080: 3c05800b */ lui $a1,%hi(g_MpNumPlayers) +/* f079080: 3c05800b */ lui $a1,%hi(g_MpNumChrs) /* f079084: 13200003 */ beqz $t9,.L0f079094 /* f079088: 00000000 */ nop /* f07908c: 10000007 */ b .L0f0790ac -/* f079090: 8ca5c530 */ lw $a1,%lo(g_MpNumPlayers)($a1) +/* f079090: 8ca5c530 */ lw $a1,%lo(g_MpNumChrs)($a1) .L0f079094: /* f079094: 0fc07934 */ jal chrsGetNumSlots /* f079098: afa800ac */ sw $t0,0xac($sp) @@ -35659,9 +35659,9 @@ glabel var7f1aa580 /* f0790fc: 00417024 */ and $t6,$v0,$at /* f079100: 000e7f02 */ srl $t7,$t6,0x1c /* f079104: 11e3ffea */ beq $t7,$v1,.L0f0790b0 -/* f079108: 3c04800b */ lui $a0,%hi(g_MpPlayerChrs) +/* f079108: 3c04800b */ lui $a0,%hi(g_MpAllChrPtrs) /* f07910c: 00982021 */ addu $a0,$a0,$t8 -/* f079110: 8c84c4d0 */ lw $a0,%lo(g_MpPlayerChrs)($a0) +/* f079110: 8c84c4d0 */ lw $a0,%lo(g_MpAllChrPtrs)($a0) /* f079114: 8c99001c */ lw $t9,0x1c($a0) /* f079118: 5320ffe6 */ beqzl $t9,.L0f0790b4 /* f07911c: 246a0001 */ addiu $t2,$v1,0x1 @@ -36842,11 +36842,11 @@ glabel var7f1aa580 /* f079074: 3c09800a */ lui $t1,%hi(g_Vars) /* f079078: 25299fc0 */ addiu $t1,$t1,%lo(g_Vars) /* f07907c: 8d390318 */ lw $t9,0x318($t1) -/* f079080: 3c05800b */ lui $a1,%hi(g_MpNumPlayers) +/* f079080: 3c05800b */ lui $a1,%hi(g_MpNumChrs) /* f079084: 13200003 */ beqz $t9,.L0f079094 /* f079088: 00000000 */ nop /* f07908c: 10000007 */ b .L0f0790ac -/* f079090: 8ca5c530 */ lw $a1,%lo(g_MpNumPlayers)($a1) +/* f079090: 8ca5c530 */ lw $a1,%lo(g_MpNumChrs)($a1) .L0f079094: /* f079094: 0fc07934 */ jal chrsGetNumSlots /* f079098: afa800ac */ sw $t0,0xac($sp) @@ -36881,9 +36881,9 @@ glabel var7f1aa580 /* f0790fc: 00417024 */ and $t6,$v0,$at /* f079100: 000e7f02 */ srl $t7,$t6,0x1c /* f079104: 11e3ffea */ beq $t7,$v1,.L0f0790b0 -/* f079108: 3c04800b */ lui $a0,%hi(g_MpPlayerChrs) +/* f079108: 3c04800b */ lui $a0,%hi(g_MpAllChrPtrs) /* f07910c: 00982021 */ addu $a0,$a0,$t8 -/* f079110: 8c84c4d0 */ lw $a0,%lo(g_MpPlayerChrs)($a0) +/* f079110: 8c84c4d0 */ lw $a0,%lo(g_MpAllChrPtrs)($a0) /* f079114: 8c99001c */ lw $t9,0x1c($a0) /* f079118: 5320ffe6 */ beqzl $t9,.L0f0790b4 /* f07911c: 246a0001 */ addiu $t2,$v1,0x1 @@ -65939,7 +65939,7 @@ struct autogunobj *laptopDeploy(s32 modelnum, struct gset *gset, struct chrdata laptop->shotbondsum = 0; if (chr->aibot) { - laptop->ammoquantity = aibotTryRemoveAmmoFromReserve(chr->aibot, WEAPON_LAPTOPGUN, FUNC_PRIMARY, 200); + laptop->ammoquantity = botactTryRemoveAmmoFromReserve(chr->aibot, WEAPON_LAPTOPGUN, FUNC_PRIMARY, 200); } else if (chr->prop->type == PROPTYPE_PLAYER) { s32 qty; s32 prevplayernum = g_Vars.currentplayernum; diff --git a/src/game/radar.c b/src/game/radar.c index 04e145e24..1b0187424 100644 --- a/src/game/radar.c +++ b/src/game/radar.c @@ -261,7 +261,7 @@ Gfx *radarRender(Gfx *gdl) return gdl; } - if ((g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.displayoptions & 0x00000004) == 0) { + if ((g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].base.displayoptions & 0x00000004) == 0) { return gdl; } } else if ((g_Vars.currentplayer->devicesactive & ~g_Vars.currentplayer->devicesinhibit & DEVICE_RTRACKER) == 0) { @@ -340,7 +340,7 @@ Gfx *radarRender(Gfx *gdl) pos.z = g_Vars.players[i]->prop->pos.z - g_Vars.currentplayer->prop->pos.z; if (g_Vars.normmplayerisrunning && (g_MpSetup.options & MPOPTION_TEAMSENABLED)) { - s32 index = g_MpPlayers[g_Vars.playerstats[i].mpindex].base.team; + s32 index = g_PlayerConfigsArray[g_Vars.playerstats[i].mpindex].base.team; colour = g_TeamColours[index]; } else { colour = 0x00ff0000; @@ -372,21 +372,21 @@ Gfx *radarRender(Gfx *gdl) // Draw dots for MP simulants if (g_Vars.normmplayerisrunning != 0) { - for (i = 0; i < g_NumMpSimulantChrs; i++) { - if (!chrIsDead(g_MpSimulantChrs[i]) - && (g_MpSimulantChrs[i]->hidden & CHRHFLAG_CLOAKED) == 0 - && scenarioRadar2(&gdl, g_MpSimulantChrs[i]->prop) == false) { - pos.x = g_MpSimulantChrs[i]->prop->pos.x - g_Vars.currentplayer->prop->pos.x; - pos.y = g_MpSimulantChrs[i]->prop->pos.y - g_Vars.currentplayer->prop->pos.y; - pos.z = g_MpSimulantChrs[i]->prop->pos.z - g_Vars.currentplayer->prop->pos.z; + for (i = 0; i < g_BotCount; i++) { + if (!chrIsDead(g_MpBotChrPtrs[i]) + && (g_MpBotChrPtrs[i]->hidden & CHRHFLAG_CLOAKED) == 0 + && scenarioRadar2(&gdl, g_MpBotChrPtrs[i]->prop) == false) { + pos.x = g_MpBotChrPtrs[i]->prop->pos.x - g_Vars.currentplayer->prop->pos.x; + pos.y = g_MpBotChrPtrs[i]->prop->pos.y - g_Vars.currentplayer->prop->pos.y; + pos.z = g_MpBotChrPtrs[i]->prop->pos.z - g_Vars.currentplayer->prop->pos.z; if (g_Vars.normmplayerisrunning && (g_MpSetup.options & MPOPTION_TEAMSENABLED)) { - colour = g_TeamColours[radarGetTeamIndex(g_MpSimulantChrs[i]->team)]; + colour = g_TeamColours[radarGetTeamIndex(g_MpBotChrPtrs[i]->team)]; } else { colour = 0x00ff0000; } - gdl = radarDrawDot(gdl, g_MpSimulantChrs[i]->prop, &pos, colour, 0, 0); + gdl = radarDrawDot(gdl, g_MpBotChrPtrs[i]->prop, &pos, colour, 0, 0); } } } @@ -405,7 +405,7 @@ Gfx *radarRender(Gfx *gdl) pos.z = 0; if (g_Vars.normmplayerisrunning && (g_MpSetup.options & MPOPTION_TEAMSENABLED)) { - s32 index = g_MpPlayers[g_Vars.playerstats[playernum].mpindex].base.team; + s32 index = g_PlayerConfigsArray[g_Vars.playerstats[playernum].mpindex].base.team; colour = g_TeamColours[index]; } else { colour = 0x00ff0000; diff --git a/src/game/title.c b/src/game/title.c index e6e8a91bd..fb83f5381 100644 --- a/src/game/title.c +++ b/src/game/title.c @@ -6975,12 +6975,12 @@ void setNumPlayers(s32 numplayers) s32 playerGetTeam(s32 playernum) { - return g_MpPlayers[g_Vars.playerstats[playernum].mpindex].base.team; + return g_PlayerConfigsArray[g_Vars.playerstats[playernum].mpindex].base.team; } void playerSetTeam(s32 playernum, s32 team) { - g_MpPlayers[g_Vars.playerstats[playernum].mpindex].base.team = team; + g_PlayerConfigsArray[g_Vars.playerstats[playernum].mpindex].base.team = team; } void titleInitSkip(void) diff --git a/src/include/bss.h b/src/include/bss.h index 565e8f299..7c611cdf5 100644 --- a/src/include/bss.h +++ b/src/include/bss.h @@ -281,15 +281,15 @@ extern struct textureconfig *var800ab5a8; extern struct textureconfig *var800ab5ac; extern struct scenariodata g_ScenarioData; extern u32 var800ac4cc; -extern struct chrdata *g_MpPlayerChrs[MAX_MPCHRS]; -extern struct mpchr *var800ac500[MAX_MPCHRS]; -extern s32 g_MpNumPlayers; -extern struct mpsim g_MpSimulants[MAX_SIMULANTS]; +extern struct chrdata *g_MpAllChrPtrs[MAX_MPCHRS]; +extern struct mpchrconfig *g_MpAllChrConfigPtrs[MAX_MPCHRS]; +extern s32 g_MpNumChrs; +extern struct mpbotconfig g_BotConfigsArray[MAX_SIMULANTS]; extern u8 g_MpSimulantDifficultiesPerNumPlayers[32]; -extern struct mpplayer g_MpPlayers[6]; +extern struct mpplayerconfig g_PlayerConfigsArray[6]; extern u8 g_AmBotCommands[16]; extern struct mpsetup g_MpSetup; extern struct bossfile g_BossFile; -extern struct chrdata *g_MpSimulantChrs[MAX_SIMULANTS]; +extern struct chrdata *g_MpBotChrPtrs[MAX_SIMULANTS]; #endif diff --git a/src/include/constants.h b/src/include/constants.h index ab2137117..516dbc6b0 100644 --- a/src/include/constants.h +++ b/src/include/constants.h @@ -264,6 +264,43 @@ #define BANK_0 0 #define BANK_1 1 +#define BOTDIFF_MEAT 0 +#define BOTDIFF_EASY 1 +#define BOTDIFF_NORMAL 2 +#define BOTDIFF_HARD 3 +#define BOTDIFF_PERFECT 4 +#define BOTDIFF_DARK 5 +#define BOTDIFF_DISABLED 6 + +#define BOTDISTCFG_CLOSE 0 +#define BOTDISTCFG_PISTOL 1 +#define BOTDISTCFG_DEFAULT 2 +#define BOTDISTCFG_SHOOTEXPLOSIVE 3 +#define BOTDISTCFG_KAZE 4 +#define BOTDISTCFG_FARSIGHT 5 +#define BOTDISTCFG_FOLLOW 6 +#define BOTDISTCFG_THROWEXPLOSIVE 7 + +// Bot distance modes +#define BOTDISTMODE_BACKUP 1 +#define BOTDISTMODE_OK 2 +#define BOTDISTMODE_ADVANCE 3 +#define BOTDISTMODE_GOTO 4 + +#define BOTTYPE_GENERAL 0 +#define BOTTYPE_PEACE 1 // Collects weapons but doesn't engage in combat +#define BOTTYPE_SHIELD 2 // Prioritises full shield before combat +#define BOTTYPE_ROCKET 3 // Prefers explosive weapons +#define BOTTYPE_KAZE 4 // Does not keep distance +#define BOTTYPE_FIST 5 // Uses fists only +#define BOTTYPE_PREY 6 // Target players who are newly spawned, have inferior weapons or are low on health +#define BOTTYPE_COWARD 7 // Runs away, only attacks if opponent's weapon is inferior +#define BOTTYPE_JUDGE 8 // Targets the winning player +#define BOTTYPE_FEUD 9 // Targets a single player for the whole match +#define BOTTYPE_SPEED 10 // Runs faster +#define BOTTYPE_TURTLE 11 // Moves slower and has double shield +#define BOTTYPE_VENGE 12 // Targets the last player who killed it + #define BRIEFINGTYPE_LOCATION 0 #define BRIEFINGTYPE_TEXT_PA 1 #define BRIEFINGTYPE_TEXT_SA 2 @@ -2457,10 +2494,10 @@ #define MPFEATURE_WEAPON_SHIELD 0x16 #define MPFEATURE_WEAPON_CLOAKINGDEVICE 0x17 #define MPFEATURE_WEAPON_COMBATBOOST 0x18 -#define MPFEATURE_SIMDIFF_HARD 0x19 -#define MPFEATURE_SIMDIFF_PERFECT 0x1a +#define MPFEATURE_BOTDIFF_HARD 0x19 +#define MPFEATURE_BOTDIFF_PERFECT 0x1a #define MPFEATURE_1B 0x1b -#define MPFEATURE_SIMDIFF_DARK 0x1c +#define MPFEATURE_BOTDIFF_DARK 0x1c #define MPFEATURE_SLOWMOTION 0x1d #define MPFEATURE_ONEHITKILLS 0x1e #define MPFEATURE_1F 0x1f @@ -3323,28 +3360,6 @@ #define SIGHTTARGET_4 4 #define SIGHTTARGET_5 5 -#define SIMDIFF_MEAT 0 -#define SIMDIFF_EASY 1 -#define SIMDIFF_NORMAL 2 -#define SIMDIFF_HARD 3 -#define SIMDIFF_PERFECT 4 -#define SIMDIFF_DARK 5 -#define SIMDIFF_DISABLED 6 - -#define SIMTYPE_GENERAL 0 -#define SIMTYPE_PEACE 1 -#define SIMTYPE_SHIELD 2 -#define SIMTYPE_ROCKET 3 -#define SIMTYPE_KAZE 4 -#define SIMTYPE_FIST 5 -#define SIMTYPE_PREY 6 -#define SIMTYPE_COWARD 7 -#define SIMTYPE_JUDGE 8 -#define SIMTYPE_FEUD 9 -#define SIMTYPE_SPEED 10 -#define SIMTYPE_TURTLE 11 -#define SIMTYPE_VENGE 12 - #define SKEL_BASIC 0x02 #define SKEL_CHRGUN 0x03 #define SKEL_JOYPAD 0x04 diff --git a/src/include/data.h b/src/include/data.h index 08339fc4f..1a7f35733 100644 --- a/src/include/data.h +++ b/src/include/data.h @@ -501,12 +501,12 @@ extern s32 var80087260; extern bool g_MpEnableMusicSwitching; extern struct mpweapon g_MpWeapons[0x27]; extern struct mphead g_MpHeads[75]; -extern struct mpsimulanttype g_MpSimulantTypes[]; +extern struct botprofile g_BotProfiles[]; extern struct mpbody g_MpBodies[NUM_MPBODIES]; extern struct mppreset g_MpPresets[NUM_MPPRESETS]; extern u32 g_TeamColours[]; extern u16 var80087ce4[]; -extern u8 g_NumMpSimulantChrs; +extern u8 g_BotCount; extern struct aibotweaponpreference g_AibotWeaponPreferences[]; extern u32 var80087eb4; extern struct challenge g_MpChallenges[NUM_CHALLENGES]; diff --git a/src/include/game/bot.h b/src/include/game/bot.h new file mode 100644 index 000000000..704dbbe2c --- /dev/null +++ b/src/include/game/bot.h @@ -0,0 +1,55 @@ +#ifndef _IN_GAME_BOT_H +#define _IN_GAME_BOT_H +#include +#include "data.h" +#include "types.h" + +bool bot0f190260(struct chrdata *chr); +void botReset(struct chrdata *chr, u8 respawning); +void botSpawn(struct chrdata *chr, u8 full); +void botSpawnAll(void); +u32 add87654321(u32 value); +u32 botPickupProp(struct prop *prop, struct chrdata *chr); +bool botTestPropForPickup(struct prop *prop, struct chrdata *chr); +void botCheckPickups(struct chrdata *chr); +s32 botGuessCrouchPos(struct chrdata *chr); +bool botApplyMovement(struct chrdata *chr); +bool bot0f191638(struct chrdata *chr, bool arg1); +s32 botTick(struct prop *prop); +f32 botCalculateMaxSpeed(struct chrdata *chr); +void bot0f1921f8(struct chrdata *chr, f32 *arg1, s32 arg2, f32 arg3); +void botLoseGun(struct chrdata *chr, struct prop *attacker); +void bot0f19277c(struct chrdata *chr, s32 propnum); +bool bot0f19294c(struct chrdata *botchr, struct chrdata *otherchr); +bool botHasGround(struct chrdata *chr); +void bot0f192a74(struct chrdata *chr); +bool botPassesPeaceCheck(struct chrdata *botchr, struct chrdata *otherchr); +bool botPassesCowardCheck(struct chrdata *botchr, struct chrdata *otherchr); +u32 bot0f192e90(void); +void bot0f19369c(struct chrdata *chr, s32 arg1); +s32 bot0f1937a4(struct chrdata *chr, s32 arg1); +s32 botGetNumOpponentsInHill(struct chrdata *chr); +void botTickUnpaused(struct chrdata *chr); +s32 botIsObjCollectable(struct defaultobj *obj); +s32 botGetWeaponNum(struct chrdata *chr); +u8 botGetTargetsWeaponNum(struct chrdata *chr); +char *botGetCommandName(s32 command); +void botApplyAttack(struct chrdata *chr, struct prop *prop); +void botApplyFollow(struct chrdata *chr, struct prop *prop); +void botApplyProtect(struct chrdata *chr, struct prop *prop); +void botApplyDefend(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3); +void botApplyHold(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3); +void botApplyScenarioCommand(struct chrdata *chr, u32 arg1); +bool botIsFollowing(struct chrdata *leader, struct chrdata *follower); +s32 bot0f193530(struct chrdata *chr, f32 range); +bool bot0f194670(struct chrdata *chr); +s32 bot0f194694(struct chrdata *chr); +s32 bot0f1946b4(struct chrdata *chr); +s32 botGetNumPlayerTeammates(struct chrdata *chr); +s32 botCountByCommand(struct chrdata *self, u32 command, bool includeself); +s32 botIsChrsTokenHeld(struct chrdata *chr); +bool bot0f19489c(struct chrdata *chr); +s32 botGetNumTeammatesDefendingHill(struct chrdata *bot); +void botCheckFetch(struct chrdata *chr); + +#endif diff --git a/src/include/game/botact.h b/src/include/game/botact.h new file mode 100644 index 000000000..3f80c84ae --- /dev/null +++ b/src/include/game/botact.h @@ -0,0 +1,25 @@ +#ifndef IN_GAME_BOTACT_H +#define IN_GAME_BOTACT_H +#include +#include "data.h" +#include "types.h" + +s32 botactGetAmmoTypeByFunction(s32 weaponnum, u32 funcnum); +s32 botactGetClipCapacityByFunction(s32 weaponnum, u32 funcnum); +void botactReload(struct chrdata *chr, s32 handnum, bool withsound); +s32 botactGetAmmoQuantityByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum, bool include_equipped); +s32 botactGetAmmoQuantityByType(struct aibot *aibot, s32 ammotype, bool include_equipped); +s32 botactTryRemoveAmmoFromReserve(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 qty); +void botactGiveAmmoByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 qty); +void botactGiveAmmoByType(struct aibot *aibot, u32 ammotype, s32 quantity); +bool botactShootFarsight(struct chrdata *chr, s32 arg1, struct coord *arg2, struct coord *arg3); +bool botactIsWeaponThrowable(u32 weaponnum, bool is_secondary); +u32 botactGetProjectileThrowInterval(u32 weapon); +u32 botactGetWeaponByAmmoType(u32 ammotype); +void botact0f19a37c(struct chrdata *chr); +s32 botact0f19a60c(s32 weaponnum, s32 funcnum); +bool botactFindRocketRoute(struct chrdata *chr, struct coord *frompos, struct coord *topos, s16 *fromrooms, s16 *torooms, struct projectile *projectile); +void botactGetRocketSpawnPos(u16 padnum, struct coord *pos); +void botactCreateSlayerRocket(struct chrdata *chr); + +#endif diff --git a/src/include/game/botcmd.h b/src/include/game/botcmd.h new file mode 100644 index 000000000..04ff15758 --- /dev/null +++ b/src/include/game/botcmd.h @@ -0,0 +1,10 @@ +#ifndef IN_GAME_BOTCMD_H +#define IN_GAME_BOTCMD_H +#include +#include "data.h" +#include "types.h" + +void botcmdTickDistMode(struct chrdata *chr); +void botcmdApply(struct chrdata *chr, u32 command); + +#endif diff --git a/src/include/game/botinv.h b/src/include/game/botinv.h new file mode 100644 index 000000000..a302ae860 --- /dev/null +++ b/src/include/game/botinv.h @@ -0,0 +1,30 @@ +#ifndef IN_GAME_BOTINV_H +#define IN_GAME_BOTINV_H +#include +#include "data.h" +#include "types.h" + +void botinvClear(struct chrdata *chr); +struct invitem *botinvGetFreeSlot(struct chrdata *chr); +struct invitem *botinvGetItem(struct chrdata *chr, u32 weaponnum); +void botinvRemoveItem(struct chrdata *chr, s32 weaponnum); +u32 botinvGetItemType(struct chrdata *chr, u32 weaponnum); +bool botinvGiveSingleWeapon(struct chrdata *chr, u32 weaponnum); +void botinvGiveDualWeapon(struct chrdata *chr, u32 weaponnum); +s16 botinvGetWeaponPad(struct chrdata *chr, u32 weaponnum); +bool botinvGiveProp(struct chrdata *chr, struct prop *prop); +void botinvScoreAllWeapons(struct chrdata *chr, s32 *weaponnums, s32 *scores1, s32 *scores2); +bool mpHasShield(void); +s32 mpGetWeaponSlotByWeaponNum(s32 weaponnum); +void botinvScoreWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3, bool arg4, s32 *dst1, s32 *dst2, bool arg7, bool arg8); +void botinvScoreWeaponAgainstTarget(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3, bool arg4, s32 *dst1, s32 *dst2); +void botinvScoreWeaponByItself(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3, bool arg4, s32 *dst1, s32 *dst2); +s32 botinvGetDistConfig(s32 weaponnum, s32 funcnum); +bool botinvAllowsWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum); +void botinvTick(struct chrdata *chr); +bool botinvSwitchToWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum); +void botinvDrop(struct chrdata *chr, s32 weaponnum, u8 dropall); +void botinvDropAll(struct chrdata *chr, u32 weaponnum); +void botinvDropOne(struct chrdata *chr, u32 weaponnum); + +#endif diff --git a/src/include/game/botinvinit.h b/src/include/game/botinvinit.h new file mode 100644 index 000000000..be927242c --- /dev/null +++ b/src/include/game/botinvinit.h @@ -0,0 +1,9 @@ +#ifndef _IN_GAME_BOTINVINIT_H +#define _IN_GAME_BOTINVINIT_H +#include +#include "data.h" +#include "types.h" + +void botinvInit(struct chrdata *chr, s32 maxitems); + +#endif diff --git a/src/include/game/game_0147d0.h b/src/include/game/game_0147d0.h index 470f65b94..46562358d 100644 --- a/src/include/game/game_0147d0.h +++ b/src/include/game/game_0147d0.h @@ -6,7 +6,7 @@ void func0f0147d0(void); void lasersightsReset(void); -void mpRemoveAllSimulants(void); -void aibotAllocate(s32 chrnum, s32 aibotnum); +void botmgrRemoveAll(void); +void botmgrAllocateBot(s32 chrnum, s32 aibotnum); #endif diff --git a/src/include/game/game_014e90.h b/src/include/game/game_014e90.h deleted file mode 100644 index 4bb370523..000000000 --- a/src/include/game/game_014e90.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _IN_GAME_GAME_014E90_H -#define _IN_GAME_GAME_014E90_H -#include -#include "data.h" -#include "types.h" - -void aibotAllocateInventory(struct chrdata *chr, s32 maxitems); - -#endif diff --git a/src/include/game/game_190260.h b/src/include/game/game_190260.h deleted file mode 100644 index 55f7fb74d..000000000 --- a/src/include/game/game_190260.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef _IN_GAME_GAME_190260_H -#define _IN_GAME_GAME_190260_H -#include -#include "data.h" -#include "types.h" - -bool func0f190260(struct chrdata *chr); -void mpChrReset(struct chrdata *chr, u8 full); -void mpInitSimulant(struct chrdata *chr, u8 full); -void mpInitSimulants(void); -u32 add87654321(u32 value); -u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr); -bool func0f190be4(struct prop *prop, struct chrdata *chr); -void func0f19124c(struct chrdata *chr); -s32 chrGuessCrouchPos(struct chrdata *chr); -bool func0f191448(struct chrdata *chr); -bool func0f191638(struct chrdata *chr, bool arg1); -s32 aibotTick(struct prop *prop); -f32 aibotCalculateMaxSpeed(struct chrdata *chr); -void func0f1921f8(struct chrdata *chr, f32 *arg1, s32 arg2, f32 arg3); -void aibotLoseGun(struct chrdata *chr, struct prop *attacker); -void func0f19277c(struct chrdata *chr, s32 propnum); -bool func0f19294c(struct chrdata *botchr, struct chrdata *otherchr); -bool chrHasGround(struct chrdata *chr); -void func0f192a74(struct chrdata *chr); -bool func0f192d64(struct chrdata *botchr, struct chrdata *otherchr); -bool func0f192dc0(struct chrdata *botchr, struct chrdata *chr); -u32 func0f192e90(void); -void func0f19369c(struct chrdata *chr, s32 arg1); -s32 func0f1937a4(struct chrdata *chr, s32 arg1); -s32 mpGetNumOpponentsInHill(struct chrdata *chr); -void func0f194b40(struct chrdata *chr); -s32 mpObjIsSafe(struct defaultobj *obj); -s32 mpchrGetWeaponNum(struct chrdata *chr); -u8 mpchrGetTargetsWeaponNum(struct chrdata *chr); -char *mpGetBotCommandName(s32 command); -void mpAibotApplyAttack(struct chrdata *chr, struct prop *prop); -void mpAibotApplyFollow(struct chrdata *chr, struct prop *prop); -void mpAibotApplyProtect(struct chrdata *chr, struct prop *prop); -void mpAibotApplyDefend(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3); -void mpAibotApplyHold(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3); -void mpAibotApplyScenarioCommand(struct chrdata *chr, u32 arg1); -bool mpIsChrFollowedByChr(struct chrdata *leader, struct chrdata *follower); -s32 func0f193530(struct chrdata *chr, f32 range); -bool func0f194670(struct chrdata *chr); -s32 func0f194694(struct chrdata *chr); -s32 func0f1946b4(struct chrdata *chr); -s32 mpGetNumPlayerTeammates(struct chrdata *chr); -s32 mpCountAibotsWithCommand(struct chrdata *self, u32 command, bool includeself); -s32 scenarioCtcIsChrsTokenHeld(struct chrdata *chr); -bool func0f19489c(struct chrdata *chr); -s32 mpGetNumTeammatesDefendingHill(struct chrdata *bot); -void func0f197544(struct chrdata *chr); - -#endif diff --git a/src/include/game/game_197600.h b/src/include/game/game_197600.h deleted file mode 100644 index 818664c83..000000000 --- a/src/include/game/game_197600.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef IN_GAME_GAME_197600_H -#define IN_GAME_GAME_197600_H -#include -#include "data.h" -#include "types.h" - -void func0f197600(struct chrdata *chr); -void mpAibotApplyCommand(struct chrdata *chr, u32 command); -void aibotClearInventory(struct chrdata *chr); -struct invitem *aibotGetFreeInvSlot(struct chrdata *chr); -struct invitem *aibotGetInvItem(struct chrdata *chr, u32 weaponnum); -void aibotRemoveInvItem(struct chrdata *chr, s32 weaponnum); -u32 aibotGetInvItemType(struct chrdata *chr, u32 weaponnum); -bool aibotGiveSingleWeapon(struct chrdata *chr, u32 weaponnum); -void aibotGiveDualWeapon(struct chrdata *chr, u32 weaponnum); -s16 aibotGetWeaponPad(struct chrdata *chr, u32 weaponnum); -bool aibotGiveProp(struct chrdata *chr, struct prop *prop); -void func0f198068(struct chrdata *chr, s32 *weaponnums, s32 *scores1, s32 *scores2); -bool mpHasShield(void); -s32 mpGetWeaponIndexByWeaponNum(s32 weaponnum); -void aibotScoreWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3, bool arg4, s32 *dst1, s32 *dst2, bool arg7, bool arg8); -void func0f198db4(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3, bool arg4, s32 *dst1, s32 *dst2); -void func0f198df8(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3, bool arg4, s32 *dst1, s32 *dst2); -s32 func0f198e38(s32 weaponnum, s32 funcnum); -bool func0f198e78(struct chrdata *chr, s32 weaponnum, s32 funcnum); -void aibotTickInventory(struct chrdata *chr); -bool aibotSwitchToWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum); -void func0f19978c(struct chrdata *chr, s32 weaponnum, u8 arg2); -void func0f199964(struct chrdata *chr, u32 weaponnum); -void func0f199984(struct chrdata *chr, u32 weaponnum); - -#endif diff --git a/src/include/game/game_1999b0.h b/src/include/game/game_1999b0.h deleted file mode 100644 index 12aeafc67..000000000 --- a/src/include/game/game_1999b0.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef IN_GAME_GAME_1999B0_H -#define IN_GAME_GAME_1999B0_H -#include -#include "data.h" -#include "types.h" - -s32 weaponGetAmmoTypeByFunction(s32 weaponnum, u32 funcnum); -s32 weaponGetClipCapacityByFunction(s32 weaponnum, u32 funcnum); -void aibotReloadWeapon(struct chrdata *chr, s32 handnum, bool withsound); -s32 aibotGetAmmoQuantityByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum, bool include_equipped); -s32 aibotGetAmmoQuantityByType(struct aibot *aibot, s32 ammotype, bool include_equipped); -s32 aibotTryRemoveAmmoFromReserve(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 qty); -void aibotGiveAmmoByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 qty); -void aibotGiveAmmoByType(struct aibot *aibot, u32 ammotype, s32 quantity); -bool aibotShootFarsightThroughWalls(struct chrdata *chr, s32 arg1, struct coord *arg2, struct coord *arg3); -bool func0f19a29c(u32 weaponnum, bool is_secondary); -u32 aibotGetProjectileThrowInterval(u32 weapon); -u32 ammotypeGetWeapon(u32 ammotype); -void func0f19a37c(struct chrdata *chr); -s32 func0f19a60c(s32 weaponnum, s32 funcnum); -bool func0f19a6d0(struct chrdata *chr, struct coord *frompos, struct coord *topos, s16 *fromrooms, s16 *torooms, struct projectile *projectile); -void func0f19a7d0(u16 padnum, struct coord *pos); -void aibotCreateSlayerRocket(struct chrdata *chr); - -#endif diff --git a/src/include/game/mplayer/mplayer.h b/src/include/game/mplayer/mplayer.h index ee305509b..18bc23278 100644 --- a/src/include/game/mplayer/mplayer.h +++ b/src/include/game/mplayer/mplayer.h @@ -5,7 +5,7 @@ #include "types.h" f32 mpHandicapToDamageScale(u8 value); -void func0f187838(struct mpchr *mpchr); +void func0f187838(struct mpchrconfig *mpchr); void mpStartMatch(void); void mpInit(void); void mpCalculateTeamIsOnlyAi(void); @@ -43,7 +43,7 @@ u32 func0f189cc0(void); u32 func0f189dc8(void); u32 func0f189ed0(void); u32 func0f18a030(void); -void mpCalculatePlayerTitle(struct mpplayer *mpplayer); +void mpCalculatePlayerTitle(struct mpplayerconfig *mpplayer); void func0f18a56c(void); void mpEndMatch(void); s32 mpGetNumHeads2(void); @@ -80,7 +80,7 @@ void mpRandomiseMultiTracks(void); void mpSetTrackToRandom(void); s32 mpGetCurrentTrackSlotNum(void); u32 mpChooseRandomTrack(void); -struct mpchr *func0f18c794(s32 index); +struct mpchrconfig *func0f18c794(s32 index); u32 func0f18c828(void); s32 mpGetNumChrs(void); u32 func0f18c8b8(void); diff --git a/src/include/game/mplayer/scenarios.h b/src/include/game/mplayer/scenarios.h index aadf6ae45..dcaeb54b4 100644 --- a/src/include/game/mplayer/scenarios.h +++ b/src/include/game/mplayer/scenarios.h @@ -12,7 +12,7 @@ s32 scenarioHtbCallback08(void); void scenarioHtbReset(void); void scenarioHtbTick(void); void scenarioHtbCallback14(struct chrdata *chr); -void scenarioHtbKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3); +void scenarioHtbKill(struct mpchrconfig *mpchr, s32 mpchrnum, s32 *score, s32 *arg3); Gfx *scenarioHtbRadar(Gfx *gdl); bool scenarioHtbRadar2(Gfx **gdl, struct prop *prop); bool scenarioHtbHighlight(struct prop *prop, u32 *colour); @@ -20,7 +20,7 @@ void scenarioCtcInit(void); s32 scenarioCtcCallback08(void); void scenarioCtcTick(void); void scenarioCtcCallback14(struct chrdata *chr); -void scenarioCtcKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3); +void scenarioCtcKill(struct mpchrconfig *mpchr, s32 mpchrnum, s32 *score, s32 *arg3); Gfx *scenarioCtcRadar(Gfx *gdl); bool scenarioCtcRadar2(Gfx **gdl, struct prop *prop); bool scenarioCtcChooseSpawnLocation(f32 arg0, struct coord *pos, s16 *rooms, struct prop *prop, f32 *arg4); @@ -31,18 +31,18 @@ void scenarioKohReadSave(struct savebuffer *buffer); void scenarioKohWriteSave(struct savebuffer *buffer); void scenarioKohInit(void); void scenarioKohReset(void); -void scenarioKohKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3); +void scenarioKohKill(struct mpchrconfig *mpchr, s32 mpchrnum, s32 *score, s32 *arg3); Gfx *scenarioKohRadar(Gfx *gdl); bool scenarioKohIsRoomHighlighted(s16 arg0); void scenarioHtmInit(void); s32 scenarioHtmCallback08(void); void scenarioHtmTick(void); -void scenarioHtmKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3); +void scenarioHtmKill(struct mpchrconfig *mpchr, s32 mpchrnum, s32 *score, s32 *arg3); bool scenarioHtmRadar2(Gfx **gdl, struct prop *prop); bool scenarioHtmHighlight(struct prop *prop, u32 *colour); void scenarioPacInit(void); void scenarioPacReset(void); -void scenarioPacKill(struct mpchr *mpchr, s32 mpchrnum, s32 *score, s32 *arg3); +void scenarioPacKill(struct mpchrconfig *mpchr, s32 mpchrnum, s32 *score, s32 *arg3); Gfx *scenarioPacRadar(Gfx *gdl); s32 menuhandlerMpOpenOptions(s32 operation, struct menuitem *item, union handlerdata *data); void scenarioReadSave(struct savebuffer *buffer); diff --git a/src/include/types.h b/src/include/types.h index c6c18bab5..5467af4bc 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -832,7 +832,7 @@ struct waypoint { struct aibot { /*0x000*/ u8 unk000; /*0x002*/ s16 aibotnum; - /*0x004*/ struct mpsim *simulant; + /*0x004*/ struct mpbotconfig *config; /*0x008*/ s16 attackingplayernum; /*0x00a*/ s16 followingplayernum; /*0x00c*/ s16 dangerouspropnum; // index into g_DangerousProps @@ -886,7 +886,7 @@ struct aibot { /*0x068*/ struct attackanimconfig *unk068; /*0x06c*/ f32 unk06c; /*0x070*/ f32 unk070; - /*0x074*/ s8 unk074; + /*0x074*/ s8 distmode; /*0x075*/ s8 unk075; /*0x076*/ s16 lastkilledbyplayernum; /*0x078*/ u8 unk078; @@ -918,7 +918,7 @@ struct aibot { /*0x0c0*/ s32 attackpropnum; /*0x0c4*/ u32 unk0c4[2]; /*0x0cc*/ u32 unk0cc; // Timer? Related to weapon switching - /*0x0d0*/ s32 unk0d0; + /*0x0d0*/ s32 distmodettl60; /*0x0d4*/ s32 followprotectpropnum; /*0x0d8*/ s32 unk0d8; /*0x0dc*/ u32 unk0dc; @@ -3258,7 +3258,7 @@ struct mphead { u8 requirefeature; }; -struct mpsimulanttype { +struct botprofile { /*0x00*/ u8 type; /*0x01*/ u8 difficulty; /*0x02*/ u16 name; @@ -4565,7 +4565,7 @@ struct gamefile { /*0xb5*/ u8 weaponsfound[6]; }; -struct mpchr { +struct mpchrconfig { /*0x00*/ char name[12]; // up to 10 visible chars plus line break plus null byte /*0x0c*/ u8 unk0c; /*0x0d*/ u8 unk0d; @@ -4583,15 +4583,13 @@ struct mpchr { /*0x3c*/ s16 numdeaths; /*0x3e*/ s16 unk3e; /*0x40*/ s16 unk40; - /*0x42*/ u16 unk42; +}; + +struct mpplayerconfig { + /*0x00*/ struct mpchrconfig base; /*0x44*/ u8 controlmode; /*0x45*/ s8 contpad1; /*0x46*/ s8 contpad2; - /*0x47*/ u8 simtype; -}; - -struct mpplayer { - /*0x00*/ struct mpchr base; /*0x48*/ u16 options; /*0x4c*/ struct fileguid fileguid; /*0x54*/ u32 kills; @@ -4618,8 +4616,10 @@ struct mpplayer { /*0x9d*/ u8 handicap; }; -struct mpsim { - /*0x00*/ struct mpchr base; +struct mpbotconfig { + /*0x00*/ struct mpchrconfig base; + /*0x44*/ u8 unk44[3]; + /*0x47*/ u8 type; /*0x48*/ u8 difficulty; }; @@ -4688,7 +4688,7 @@ struct mpscenario { void (*tickfunc)(void); void (*unk14)(struct chrdata *chr); void *unk18; - void (*killfunc)(struct mpchr *mpchr, s32 arg1, s32 *score, s32 *arg3); + void (*killfunc)(struct mpchrconfig *mpchr, s32 arg1, s32 *score, s32 *arg3); Gfx *(*radarfunc)(Gfx *gdl); bool (*radar2func)(Gfx **gdl, struct prop *prop); bool (*highlightfunc)(struct prop *prop, u32 *colour); @@ -4762,7 +4762,7 @@ struct scenariodata_cbt { u32 unk04; u32 unk08; u16 unk0c; - s16 unk0e[1]; // possibly for a different scenario - see mpGetNumTeammatesDefendingHill + s16 unk0e[1]; // possibly for a different scenario - see botGetNumTeammatesDefendingHill }; struct scenariodata_htb { @@ -5232,7 +5232,7 @@ struct chrbio { }; struct mpteaminfo { - struct mpchr *mpchr; + struct mpchrconfig *mpchr; u32 teamnum; u32 positionindex; u8 unk0c; @@ -6945,8 +6945,8 @@ struct aibotweaponpreference { u8 unk03; u16 unk04_00 : 1; u16 unk04_01 : 1; - u16 unk04_02 : 4; - u16 unk04_06 : 4; + u16 pridistconfig : 4; + u16 secdistconfig : 4; u16 unk06; u16 unk08; u16 unk0a; diff --git a/src/lib/gvars.c b/src/lib/gvars.c index eac51af4f..c84cd599d 100644 --- a/src/lib/gvars.c +++ b/src/lib/gvars.c @@ -63,7 +63,7 @@ void gvarsInit(void) g_Vars.unk00049c = 0; g_Vars.unk0004a0 = 1; g_Vars.mpquickteamnumsims = 1; - g_Vars.mpsimdifficulty = SIMDIFF_NORMAL; + g_Vars.mpsimdifficulty = BOTDIFF_NORMAL; g_Vars.mpplayerteams[0] = 0; g_Vars.mpplayerteams[1] = 1; g_Vars.mpplayerteams[2] = 2; diff --git a/src/lib/joy.c b/src/lib/joy.c index b3c96d383..753c6e42e 100644 --- a/src/lib/joy.c +++ b/src/lib/joy.c @@ -1344,7 +1344,7 @@ void joyGetContpadNumsForPlayer(s8 playernum, s32 *pad1, s32 *pad2) *pad1 = playernum; - if (g_MpPlayers[g_Vars.playerstats[playernum].mpindex].base.controlmode >= CONTROLMODE_21) { + if (g_PlayerConfigsArray[g_Vars.playerstats[playernum].mpindex].controlmode >= CONTROLMODE_21) { *pad2 = PLAYERCOUNT() + playernum; return; } diff --git a/src/mpconfigs.c b/src/mpconfigs.c index fff7ef832..eec58df81 100644 --- a/src/mpconfigs.c +++ b/src/mpconfigs.c @@ -22,14 +22,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_PISTOLS @@ -50,14 +50,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_FARSIGHT @@ -78,14 +78,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_DRUGGUN @@ -106,14 +106,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_SLAYER @@ -134,14 +134,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CLOAKING @@ -162,14 +162,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_CLOAKINGDEVICE, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_SLOWMO @@ -190,14 +190,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_NOSHIELD @@ -218,14 +218,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_BRIEFCASE @@ -246,14 +246,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_SKEDARKING @@ -278,14 +278,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_FLAGS @@ -306,14 +306,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_SIMULANTS @@ -334,14 +334,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_JON, MPBODY_DD_SECGUARD, MPTEAM_1, { SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_DARLING, MPBODY_DD_SECGUARD, MPTEAM_1, { SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_JON, MPBODY_DD_SECGUARD, MPTEAM_1, { BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_DARLING, MPBODY_DD_SECGUARD, MPTEAM_1, { BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_AUTOMATICS @@ -362,14 +362,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_ROCKETS @@ -390,14 +390,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE01 @@ -418,14 +418,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_JON, MPBODY_DD_SECGUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_BEAU1, MPBODY_DD_SECGUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARLING, MPBODY_DD_SECGUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_MARK2, MPBODY_DD_SECGUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_JON, MPBODY_DD_SECGUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_BEAU1, MPBODY_DD_SECGUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARLING, MPBODY_DD_SECGUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_MARK2, MPBODY_DD_SECGUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE02 @@ -446,14 +446,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE03 @@ -474,14 +474,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARLING, MPBODY_CILABTECH, MPTEAM_1, { SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_CIFEMTECH, MPTEAM_1, { SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_MARK2, MPBODY_CILABTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_CIFEMTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_RUSS, MPBODY_CILABTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_CIFEMTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_CILABTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_CIFEMTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARLING, MPBODY_CILABTECH, MPTEAM_1, { BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_CIFEMTECH, MPTEAM_1, { BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_MARK2, MPBODY_CILABTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_CIFEMTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_RUSS, MPBODY_CILABTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_CIFEMTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_CILABTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_CIFEMTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE04 @@ -502,14 +502,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_MARK2, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_RUSS, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_ROSS, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_MARK2, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_RUSS, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_ROSS, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE05 @@ -530,14 +530,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_CASSANDRA, MPBODY_CASSANDRA, MPTEAM_1, { SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_CASSANDRA, MPBODY_CASSANDRA, MPTEAM_1, { BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE06 @@ -558,14 +558,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_RUSS, MPBODY_OFFICEWORKER, MPTEAM_1, { SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_OFFICEWORKER2, MPTEAM_1, { SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_ROSS, MPBODY_OFFICEWORKER, MPTEAM_1, { SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_OFFICEWORKER2, MPTEAM_1, { SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_OFFICEWORKER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_GRANT, MPBODY_OFFICEWORKER2, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_OFFICEWORKER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_GRANT, MPBODY_OFFICEWORKER2, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_RUSS, MPBODY_OFFICEWORKER, MPTEAM_1, { BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_OFFICEWORKER2, MPTEAM_1, { BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_ROSS, MPBODY_OFFICEWORKER, MPTEAM_1, { BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_OFFICEWORKER2, MPTEAM_1, { BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_OFFICEWORKER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_GRANT, MPBODY_OFFICEWORKER2, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_OFFICEWORKER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_GRANT, MPBODY_OFFICEWORKER2, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE07 @@ -586,14 +586,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE08 @@ -614,14 +614,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE09 @@ -642,14 +642,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_TRENT, MPBODY_TRENT, MPTEAM_1, { SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_NSA_LACKEY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_ROSS, MPBODY_NSA_LACKEY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_NSA_LACKEY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_NSA_LACKEY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_GRANT, MPBODY_NSA_LACKEY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_NSA_LACKEY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_GRANT, MPBODY_NSA_LACKEY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_TRENT, MPBODY_TRENT, MPTEAM_1, { BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_NSA_LACKEY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_ROSS, MPBODY_NSA_LACKEY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_NSA_LACKEY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_NSA_LACKEY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_GRANT, MPBODY_NSA_LACKEY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_NSA_LACKEY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_GRANT, MPBODY_NSA_LACKEY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE10 @@ -670,14 +670,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_ROSS, MPBODY_G5_GUARD, MPTEAM_1, { SIMDIFF_EASY, SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_G5_SWAT_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_G5_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_G5_SWAT_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_G5_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_GRANT, MPBODY_G5_SWAT_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_PENNY, MPBODY_G5_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_G5_SWAT_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_ROSS, MPBODY_G5_GUARD, MPTEAM_1, { BOTDIFF_EASY, BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_G5_SWAT_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_G5_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_G5_SWAT_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_G5_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_GRANT, MPBODY_G5_SWAT_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_PENNY, MPBODY_G5_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_G5_SWAT_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE11 @@ -698,14 +698,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_HARD, SIMDIFF_HARD } }, - { SIMTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_NORMAL, SIMDIFF_MEAT, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_HARD, BOTDIFF_HARD } }, + { BOTTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_NORMAL, BOTDIFF_MEAT, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE12 @@ -726,14 +726,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { SIMDIFF_HARD, SIMDIFF_HARD, SIMDIFF_HARD, SIMDIFF_HARD } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { BOTDIFF_HARD, BOTDIFF_HARD, BOTDIFF_HARD, BOTDIFF_HARD } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_TRENCH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE13 @@ -754,14 +754,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_CIAGUY, MPTEAM_1, { SIMDIFF_NORMAL, SIMDIFF_HARD, SIMDIFF_HARD, SIMDIFF_HARD } }, - { SIMTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_FBIGUY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_KEITH, MPBODY_CIAGUY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_FBIGUY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_GRANT, MPBODY_CIAGUY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_PENNY, MPBODY_FBIGUY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_CIAGUY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_KEITH, MPBODY_FBIGUY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_CIAGUY, MPTEAM_1, { BOTDIFF_NORMAL, BOTDIFF_HARD, BOTDIFF_HARD, BOTDIFF_HARD } }, + { BOTTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_FBIGUY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_KEITH, MPBODY_CIAGUY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_FBIGUY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_GRANT, MPBODY_CIAGUY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_PENNY, MPBODY_FBIGUY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_CIAGUY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_KEITH, MPBODY_FBIGUY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE14 @@ -782,14 +782,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_AREA51GUARD, MPTEAM_1, { SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_HARD, SIMDIFF_HARD } }, - { SIMTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_A51TROOPER, MPTEAM_1, { SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_AREA51GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_GRANT, MPBODY_A51AIRMAN, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_PENNY, MPBODY_AREA51GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_A51TROOPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_KEITH, MPBODY_AREA51GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_A51AIRMAN, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_AREA51GUARD, MPTEAM_1, { BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_HARD, BOTDIFF_HARD } }, + { BOTTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_A51TROOPER, MPTEAM_1, { BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_AREA51GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_GRANT, MPBODY_A51AIRMAN, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_PENNY, MPBODY_AREA51GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_A51TROOPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_KEITH, MPBODY_AREA51GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_A51AIRMAN, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE15 @@ -810,14 +810,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_PENNY, MPBODY_LABTECH, MPTEAM_1, { SIMDIFF_NORMAL, SIMDIFF_HARD, SIMDIFF_HARD, SIMDIFF_HARD } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEMLABTECH, MPTEAM_1, { SIMDIFF_MEAT, SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_DD_LABTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_GRANT, MPBODY_LABTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEMLABTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_PENNY, MPBODY_DD_LABTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_LABTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEMLABTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_PENNY, MPBODY_LABTECH, MPTEAM_1, { BOTDIFF_NORMAL, BOTDIFF_HARD, BOTDIFF_HARD, BOTDIFF_HARD } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEMLABTECH, MPTEAM_1, { BOTDIFF_MEAT, BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_DD_LABTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_GRANT, MPBODY_LABTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEMLABTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_PENNY, MPBODY_DD_LABTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_LABTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEMLABTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE16 @@ -838,14 +838,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_NORMAL, SIMDIFF_HARD, SIMDIFF_HARD } }, - { SIMTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_NORMAL, BOTDIFF_HARD, BOTDIFF_HARD } }, + { BOTTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_BIOTECH, MPBODY_BIOTECH, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE17 @@ -866,14 +866,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_CARRINGTON, MPBODY_CARRINGTON, MPTEAM_1, { SIMDIFF_PERFECT, SIMDIFF_HARD, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_GRANT, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_PENNY, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_DISABLED, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_KEITH, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_JON, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_CARRINGTON, MPBODY_CARRINGTON, MPTEAM_1, { BOTDIFF_PERFECT, BOTDIFF_HARD, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_CHRIST, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_GRANT, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_PENNY, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_DISABLED, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_KEITH, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_JON, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE18 @@ -894,14 +894,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_CLOAKINGDEVICE, }, }, { - { SIMTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_THEKING, MPTEAM_1, { SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_ELVIS1, MPTEAM_1, { SIMDIFF_MEAT, SIMDIFF_HARD, SIMDIFF_HARD, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_ELVIS1, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_ELVIS1, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_ELVIS1, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_ELVIS1, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_MEAT } }, - { SIMTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_ELVIS1, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_ELVIS1, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_THEKING, MPTEAM_1, { BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_ELVIS1, MPTEAM_1, { BOTDIFF_MEAT, BOTDIFF_HARD, BOTDIFF_HARD, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_ELVIS1, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_ELVIS1, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_ELVIS1, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_ELVIS1, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_MEAT } }, + { BOTTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_ELVIS1, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_ELVIS, MPBODY_ELVIS1, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE19 @@ -922,14 +922,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_COMBATBOOST, }, }, { - { SIMTYPE_GENERAL, MPHEAD_CASSANDRA, MPBODY_CASSANDRA, MPTEAM_1, { SIMDIFF_HARD, SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_TRENT, MPBODY_TRENT, MPTEAM_1, { SIMDIFF_EASY, SIMDIFF_PERFECT, SIMDIFF_HARD, SIMDIFF_HARD } }, - { SIMTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_CASSANDRA, MPBODY_CASSANDRA, MPTEAM_1, { BOTDIFF_HARD, BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_TRENT, MPBODY_TRENT, MPTEAM_1, { BOTDIFF_EASY, BOTDIFF_PERFECT, BOTDIFF_HARD, BOTDIFF_HARD } }, + { BOTTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSNIPER, MPBODY_DDSNIPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE20 @@ -950,20 +950,20 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_GRANT, MPBODY_PILOTAF1, MPTEAM_1, { SIMDIFF_HARD, SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_PENNY, MPBODY_PILOTAF1, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_HARD, SIMDIFF_HARD, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_STEWARDESS, MPTEAM_0, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_STEWARD, MPTEAM_0, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_GRANT, MPBODY_PILOTAF1, MPTEAM_1, { BOTDIFF_HARD, BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_PENNY, MPBODY_PILOTAF1, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_HARD, BOTDIFF_HARD, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_STEWARDESS, MPTEAM_0, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_STEWARD, MPTEAM_0, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, #if VERSION >= VERSION_NTSC_1_0 - { SIMTYPE_GENERAL, MPHEAD_KEITH, MPBODY_STEWARD, MPTEAM_0, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_STEWARDESS, MPTEAM_0, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_STEWARD, MPTEAM_0, { SIMDIFF_DISABLED, SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_STEWARDESS, MPTEAM_0, { SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_KEITH, MPBODY_STEWARD, MPTEAM_0, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_STEWARDESS, MPTEAM_0, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_STEWARD, MPTEAM_0, { BOTDIFF_DISABLED, BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_STEWARDESS, MPTEAM_0, { BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, #else - { SIMTYPE_GENERAL, MPHEAD_KEITH, MPBODY_STEWARD, MPTEAM_0, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_STEWARDESS, MPTEAM_0, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_STEWARD, MPTEAM_0, { SIMDIFF_DISABLED, SIMDIFF_NORMAL, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_STEWARDESS, MPTEAM_0, { SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_EASY, SIMDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_KEITH, MPBODY_STEWARD, MPTEAM_0, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_STEWARDESS, MPTEAM_0, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_STEWARD, MPTEAM_0, { BOTDIFF_DISABLED, BOTDIFF_NORMAL, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_STEWARDESS, MPTEAM_0, { BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_EASY, BOTDIFF_EASY } }, #endif }, }, @@ -985,14 +985,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARKSNOW, MPTEAM_1, { SIMDIFF_HARD, SIMDIFF_HARD, SIMDIFF_HARD, SIMDIFF_HARD } }, - { SIMTYPE_GENERAL, MPHEAD_PENNY, MPBODY_ALASKAN_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_ALASKAN_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_KEITH, MPBODY_ALASKAN_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_ALASKAN_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_JON, MPBODY_ALASKAN_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_BEAU1, MPBODY_ALASKAN_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARLING, MPBODY_ALASKAN_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARKSNOW, MPTEAM_1, { BOTDIFF_HARD, BOTDIFF_HARD, BOTDIFF_HARD, BOTDIFF_HARD } }, + { BOTTYPE_GENERAL, MPHEAD_PENNY, MPBODY_ALASKAN_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_ALASKAN_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_KEITH, MPBODY_ALASKAN_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_ALASKAN_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_JON, MPBODY_ALASKAN_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_BEAU1, MPBODY_ALASKAN_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARLING, MPBODY_ALASKAN_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE22 @@ -1013,14 +1013,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_PRESIDENT, MPBODY_PRESIDENT, MPTEAM_1, { SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_PRES_SECURITY, MPTEAM_1, { SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_HARD, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_KEITH, MPBODY_PRES_SECURITY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_PRES_SECURITY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_JON, MPBODY_PRES_SECURITY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_BEAU1, MPBODY_PRES_SECURITY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARLING, MPBODY_PRES_SECURITY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_MARK2, MPBODY_PRES_SECURITY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_PRESIDENT, MPBODY_PRESIDENT, MPTEAM_1, { BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_DAVEC, MPBODY_PRES_SECURITY, MPTEAM_1, { BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_HARD, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_KEITH, MPBODY_PRES_SECURITY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_PRES_SECURITY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_JON, MPBODY_PRES_SECURITY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_BEAU1, MPBODY_PRES_SECURITY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARLING, MPBODY_PRES_SECURITY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_MARK2, MPBODY_PRES_SECURITY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE23 @@ -1041,14 +1041,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_COMBATBOOST, }, }, { - { SIMTYPE_GENERAL, MPHEAD_PRESIDENT, MPBODY_PRESIDENT_CLONE2, MPTEAM_1, { SIMDIFF_HARD, SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_KEITH, MPBODY_STRIPES, MPTEAM_1, { SIMDIFF_HARD, SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_STRIPES, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_HARD, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_JON, MPBODY_STRIPES, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_BEAU1, MPBODY_STRIPES, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARLING, MPBODY_STRIPES, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_MARK2, MPBODY_STRIPES, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_RUSS, MPBODY_STRIPES, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_PRESIDENT, MPBODY_PRESIDENT_CLONE2, MPTEAM_1, { BOTDIFF_HARD, BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_KEITH, MPBODY_STRIPES, MPTEAM_1, { BOTDIFF_HARD, BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_STRIPES, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_HARD, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_JON, MPBODY_STRIPES, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_BEAU1, MPBODY_STRIPES, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARLING, MPBODY_STRIPES, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_MARK2, MPBODY_STRIPES, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_RUSS, MPBODY_STRIPES, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE24 @@ -1069,14 +1069,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_AREA51GUARD, MPTEAM_1, { SIMDIFF_EASY, SIMDIFF_NORMAL, SIMDIFF_HARD, SIMDIFF_HARD } }, - { SIMTYPE_GENERAL, MPHEAD_JON, MPBODY_A51TROOPER, MPTEAM_1, { SIMDIFF_EASY, SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_HARD } }, - { SIMTYPE_GENERAL, MPHEAD_BEAU1, MPBODY_A51AIRMAN, MPTEAM_1, { SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_DARLING, MPBODY_AREA51GUARD, MPTEAM_1, { SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_EASY, SIMDIFF_NORMAL } }, - { SIMTYPE_GENERAL, MPHEAD_MARK2, MPBODY_A51TROOPER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_RUSS, MPBODY_A51AIRMAN, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_PERFECT, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_AREA51GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_ROSS, MPBODY_AREA51GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_STEVEM, MPBODY_AREA51GUARD, MPTEAM_1, { BOTDIFF_EASY, BOTDIFF_NORMAL, BOTDIFF_HARD, BOTDIFF_HARD } }, + { BOTTYPE_GENERAL, MPHEAD_JON, MPBODY_A51TROOPER, MPTEAM_1, { BOTDIFF_EASY, BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_HARD } }, + { BOTTYPE_GENERAL, MPHEAD_BEAU1, MPBODY_A51AIRMAN, MPTEAM_1, { BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_DARLING, MPBODY_AREA51GUARD, MPTEAM_1, { BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_EASY, BOTDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_MARK2, MPBODY_A51TROOPER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_RUSS, MPBODY_A51AIRMAN, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_PERFECT, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_AREA51GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_ROSS, MPBODY_AREA51GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE25 @@ -1097,14 +1097,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { SIMDIFF_HARD, SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_HARD, SIMDIFF_HARD, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_NORMAL, SIMDIFF_HARD } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_EASY } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { BOTDIFF_HARD, BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_HARD, BOTDIFF_HARD, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_NORMAL, BOTDIFF_HARD } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_EASY } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DDSHOCK, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DDSHOCK, MPBODY_DD_SHOCK_INF, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE26 @@ -1125,14 +1125,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_JON, MPBODY_CILABTECH, MPTEAM_1, { SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_CIFEMTECH, MPTEAM_1, { SIMDIFF_HARD, SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_BEAU1, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_HARD, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_DARLING, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_EASY, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_MARK2, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_RUSS, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_ROSS, MPBODY_CISOLDIER, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_JON, MPBODY_CILABTECH, MPTEAM_1, { BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_CIFEMTECH, MPTEAM_1, { BOTDIFF_HARD, BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_BEAU1, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_HARD, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_DARLING, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_EASY, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_MARK2, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_RUSS, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_ROSS, MPBODY_CISOLDIER, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE27 @@ -1153,14 +1153,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_BEAU1, MPBODY_CIAGUY, MPTEAM_1, { SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_DARLING, MPBODY_FBIGUY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_PERFECT, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_MARK2, MPBODY_CIAGUY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_PERFECT, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_RUSS, MPBODY_FBIGUY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_PERFECT } }, - { SIMTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_CIAGUY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_ROSS, MPBODY_FBIGUY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_CIAGUY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_FBIGUY, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_BEAU1, MPBODY_CIAGUY, MPTEAM_1, { BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_DARLING, MPBODY_FBIGUY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_PERFECT, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_MARK2, MPBODY_CIAGUY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_PERFECT, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_RUSS, MPBODY_FBIGUY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_PERFECT } }, + { BOTTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_CIAGUY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_ROSS, MPBODY_FBIGUY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_CIAGUY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_FBIGUY, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE28 @@ -1181,14 +1181,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_DARLING, MPBODY_PELAGIC_GUARD, MPTEAM_1, { SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_MARK2, MPBODY_PELAGIC_GUARD, MPTEAM_1, { SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_RUSS, MPBODY_PELAGIC_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_PELAGIC_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DARK, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_ROSS, MPBODY_PELAGIC_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_PELAGIC_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_PELAGIC_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_PELAGIC_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARLING, MPBODY_PELAGIC_GUARD, MPTEAM_1, { BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_MARK2, MPBODY_PELAGIC_GUARD, MPTEAM_1, { BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_RUSS, MPBODY_PELAGIC_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_BRIAN, MPBODY_PELAGIC_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DARK, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_ROSS, MPBODY_PELAGIC_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_PELAGIC_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DUNCAN2, MPBODY_PELAGIC_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_JAMIE, MPBODY_PELAGIC_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE29 @@ -1209,14 +1209,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_MARK2, MPBODY_OFFICEWORKER, MPTEAM_1, { SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_RUSS, MPBODY_OFFICEWORKER2, MPTEAM_1, { SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DARK, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_MARK2, MPBODY_OFFICEWORKER, MPTEAM_1, { BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_RUSS, MPBODY_OFFICEWORKER2, MPTEAM_1, { BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DARK, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_VD, MPBODY_FEM_GUARD, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, }, }, // MPCONFIG_CHALLENGE30 @@ -1237,14 +1237,14 @@ struct mpconfig g_MpConfigs[] = { MPWEAPON_DISABLED, }, }, { - { SIMTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_CASSANDRA, MPBODY_CASSANDRA, MPTEAM_1, { SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_TRENT, MPBODY_TRENT, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DARK, SIMDIFF_DARK, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DARK, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DARK } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_0, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_0, { SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED, SIMDIFF_DISABLED } }, - { SIMTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_0, { SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL, SIMDIFF_NORMAL } }, + { BOTTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_CASSANDRA, MPBODY_CASSANDRA, MPTEAM_1, { BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_TRENT, MPBODY_TRENT, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DARK, BOTDIFF_DARK, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DARK, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_MRBLONDE, MPBODY_MRBLONDE, MPTEAM_1, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DARK } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_0, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_0, { BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED, BOTDIFF_DISABLED } }, + { BOTTYPE_GENERAL, MPHEAD_DARK_COMBAT, MPBODY_DARK_COMBAT, MPTEAM_0, { BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL, BOTDIFF_NORMAL } }, }, }, }; diff --git a/tools/mkrom/piracy.c b/tools/mkrom/piracy.c index 4f4141dea..55380f3e3 100644 --- a/tools/mkrom/piracy.c +++ b/tools/mkrom/piracy.c @@ -157,8 +157,8 @@ void piracy_patch(void) // algorithm, patch function, sum function patch(algo01, "__scHandleTasks", "bootPhase1"); patch(algo02, "cheatMenuHandleDialog", "__scHandleTasks"); - patch(algo03, "propobjHandlePickupByAibot", "doorFinishClose"); - patch(algo04, "chrUncloak", "propobjHandlePickupByAibot"); + patch(algo03, "botPickupProp", "doorFinishClose"); + patch(algo04, "chrUncloak", "botPickupProp"); patch(algo05, "chrsCheckForNoise", "__scHandleRetrace"); patch(algo06, "lvInit", "lvGetSlowMotionType"); patch(algo07, "propAllocateEyespy", "lvInit");