forked from Ports/perfect_dark
Merge branch 'port' of https://github.com/fgsfdsfgs/perfect_dark into port-net
This commit is contained in:
commit
c5a088e7b8
1 file changed
+7
-20
+7
-20
@@ -90,19 +90,8 @@ MenuItemHandlerResult amPickTargetMenuList(s32 operation, struct menuitem *item,
|
|||||||
switch (operation) {
|
switch (operation) {
|
||||||
case MENUOP_GETOPTIONCOUNT:
|
case MENUOP_GETOPTIONCOUNT:
|
||||||
if (g_AmMenus[g_AmIndex].prevallbots) {
|
if (g_AmMenus[g_AmIndex].prevallbots) {
|
||||||
// All bots: num bot opponents + all human players
|
// All bots
|
||||||
s32 count = 0;
|
data->list.value = g_MpNumChrs;
|
||||||
s32 i;
|
|
||||||
struct chrdata *playerchr = g_Vars.currentplayer->prop->chr;
|
|
||||||
|
|
||||||
for (i = PLAYERCOUNT(); i < g_MpNumChrs; i++) {
|
|
||||||
if (g_MpAllChrPtrs[i]->team != playerchr->team) {
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
count += PLAYERCOUNT();
|
|
||||||
data->list.value = count;
|
|
||||||
} else {
|
} else {
|
||||||
// Single bot: All except the bot itself
|
// Single bot: All except the bot itself
|
||||||
data->list.value = g_MpNumChrs - 1;
|
data->list.value = g_MpNumChrs - 1;
|
||||||
@@ -125,9 +114,7 @@ MenuItemHandlerResult amPickTargetMenuList(s32 operation, struct menuitem *item,
|
|||||||
chrindex++;
|
chrindex++;
|
||||||
|
|
||||||
if (g_AmMenus[g_AmIndex].prevallbots) {
|
if (g_AmMenus[g_AmIndex].prevallbots) {
|
||||||
if (playerchr == g_MpAllChrPtrs[chrindex] || playerchr->team != g_MpAllChrPtrs[chrindex]->team) {
|
numremaining--;
|
||||||
numremaining--;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (botchr != g_MpAllChrPtrs[chrindex]) {
|
if (botchr != g_MpAllChrPtrs[chrindex]) {
|
||||||
numremaining--;
|
numremaining--;
|
||||||
@@ -139,7 +126,9 @@ MenuItemHandlerResult amPickTargetMenuList(s32 operation, struct menuitem *item,
|
|||||||
g_AmMenus[g_AmIndex].prevallbots = false;
|
g_AmMenus[g_AmIndex].prevallbots = false;
|
||||||
|
|
||||||
for (i = 0; i < g_Vars.currentplayer->numaibuddies; i++) {
|
for (i = 0; i < g_Vars.currentplayer->numaibuddies; i++) {
|
||||||
botApplyAttack(g_MpAllChrPtrs[g_Vars.currentplayer->aibuddynums[i]], g_MpAllChrPtrs[chrindex]->prop);
|
if (g_Vars.currentplayer->aibuddynums[i] != chrindex) {
|
||||||
|
botApplyAttack(g_MpAllChrPtrs[g_Vars.currentplayer->aibuddynums[i]], g_MpAllChrPtrs[chrindex]->prop);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
botApplyAttack(botchr, g_MpAllChrPtrs[chrindex]->prop);
|
botApplyAttack(botchr, g_MpAllChrPtrs[chrindex]->prop);
|
||||||
@@ -167,9 +156,7 @@ MenuItemHandlerResult amPickTargetMenuList(s32 operation, struct menuitem *item,
|
|||||||
chrindex++;
|
chrindex++;
|
||||||
|
|
||||||
if (g_AmMenus[g_AmIndex].prevallbots) {
|
if (g_AmMenus[g_AmIndex].prevallbots) {
|
||||||
if (playerchr == g_MpAllChrPtrs[chrindex] || playerchr->team != g_MpAllChrPtrs[chrindex]->team) {
|
numremaining--;
|
||||||
numremaining--;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (botchr != g_MpAllChrPtrs[chrindex]) {
|
if (botchr != g_MpAllChrPtrs[chrindex]) {
|
||||||
numremaining--;
|
numremaining--;
|
||||||
|
|||||||
Reference in new issue
Block a user