mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-23 15:52:41 +02:00
Merge branch 'port' into port-net
This commit is contained in:
commit
0e2de3b746
3 files changed
+85
No files matched your search
@@ -210,6 +210,14 @@ void mpStartMatch(void)
|
||||
if (g_NetMode != NETMODE_CLIENT)
|
||||
#endif
|
||||
{
|
||||
#ifndef PLATFORM_N64
|
||||
if (g_MpSetup.options & MPOPTION_AUTORANDOMWEAPON_START) {
|
||||
if (g_MpWeaponSetNum == WEAPONSET_RANDOM || g_MpWeaponSetNum == WEAPONSET_RANDOMFIVE) {
|
||||
mpApplyWeaponSet();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
mpConfigureQuickTeamSimulants();
|
||||
|
||||
if (!challengeIsFeatureUnlocked(MPFEATURE_ONEHITKILLS)) {
|
||||
@@ -2493,6 +2501,17 @@ void mpEndMatch(void)
|
||||
challengeConsiderMarkingComplete();
|
||||
}
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
if (g_NetMode != NETMODE_CLIENT) {
|
||||
if (g_MpSetup.options & MPOPTION_AUTORANDOMWEAPON_END) {
|
||||
if (g_MpWeaponSetNum == WEAPONSET_RANDOM
|
||||
|| g_MpWeaponSetNum == WEAPONSET_RANDOMFIVE) {
|
||||
mpApplyWeaponSet();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
func0f0f820c(NULL, -6);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,10 @@ struct menudialogdef g_MpChangeTeamNameMenuDialog;
|
||||
struct menudialogdef g_MpEditSimulantMenuDialog;
|
||||
struct menudialogdef g_MpSaveSetupNameMenuDialog;
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
extern s32 g_MpWeaponSetNum;
|
||||
#endif
|
||||
|
||||
MenuItemHandlerResult menuhandlerMpDropOut(s32 operation, struct menuitem *item, union handlerdata *data)
|
||||
{
|
||||
if (operation == MENUOP_SET) {
|
||||
@@ -1163,6 +1167,52 @@ struct menudialogdef g_MpSaveSetupExistsMenuDialog = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
MenuItemHandlerResult menuhandlerMpAutoRandomWeapon(s32 operation, struct menuitem *item, union handlerdata *data)
|
||||
{
|
||||
static const char *labels[] = {
|
||||
"Off",
|
||||
"Start",
|
||||
"End",
|
||||
};
|
||||
|
||||
switch (operation) {
|
||||
case MENUOP_CHECKDISABLED:
|
||||
case MENUOP_CHECKHIDDEN:
|
||||
if (g_MpWeaponSetNum == WEAPONSET_RANDOM
|
||||
|| g_MpWeaponSetNum == WEAPONSET_RANDOMFIVE) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
case MENUOP_GETOPTIONCOUNT:
|
||||
data->dropdown.value = ARRAYCOUNT(labels);
|
||||
break;
|
||||
case MENUOP_GETOPTIONTEXT:
|
||||
return (intptr_t)labels[data->dropdown.value];
|
||||
case MENUOP_SET:
|
||||
g_MpSetup.options &= ~(MPOPTION_AUTORANDOMWEAPON_START | MPOPTION_AUTORANDOMWEAPON_END);
|
||||
|
||||
if (data->dropdown.value == AUTORANDOMWEAPON_START) {
|
||||
g_MpSetup.options |= MPOPTION_AUTORANDOMWEAPON_START;
|
||||
} else if (data->dropdown.value == AUTORANDOMWEAPON_END) {
|
||||
g_MpSetup.options |= MPOPTION_AUTORANDOMWEAPON_END;
|
||||
}
|
||||
break;
|
||||
case MENUOP_GETSELECTEDINDEX:
|
||||
if (g_MpSetup.options & MPOPTION_AUTORANDOMWEAPON_END) {
|
||||
data->dropdown.value = AUTORANDOMWEAPON_END;
|
||||
} else if (g_MpSetup.options & MPOPTION_AUTORANDOMWEAPON_START) {
|
||||
data->dropdown.value = AUTORANDOMWEAPON_START;
|
||||
} else {
|
||||
data->dropdown.value = AUTORANDOMWEAPON_OFF;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct menuitem g_MpWeaponsMenuItems[] = {
|
||||
{
|
||||
MENUITEMTYPE_DROPDOWN,
|
||||
@@ -1172,6 +1222,16 @@ struct menuitem g_MpWeaponsMenuItems[] = {
|
||||
0,
|
||||
menuhandlerMpWeaponSetDropdown,
|
||||
},
|
||||
#ifndef PLATFORM_N64
|
||||
{
|
||||
MENUITEMTYPE_DROPDOWN,
|
||||
0,
|
||||
MENUITEMFLAG_LITERAL_TEXT,
|
||||
(uintptr_t)"Auto Random\n",
|
||||
0,
|
||||
menuhandlerMpAutoRandomWeapon,
|
||||
},
|
||||
#endif
|
||||
{
|
||||
MENUITEMTYPE_SEPARATOR,
|
||||
0,
|
||||
|
||||
@@ -2916,6 +2916,8 @@
|
||||
#define MPOPTION_PAC_SHOWONRADAR 0x00100000
|
||||
#define MPOPTION_SPAWNWITHWEAPON 0x00200000
|
||||
#define MPOPTION_NODRUGBLUR 0x00400000
|
||||
#define MPOPTION_AUTORANDOMWEAPON_START 0x00800000
|
||||
#define MPOPTION_AUTORANDOMWEAPON_END 0x01000000
|
||||
|
||||
#define MPPAUSEMODE_UNPAUSED 0
|
||||
#define MPPAUSEMODE_PAUSED 1
|
||||
@@ -3828,6 +3830,10 @@
|
||||
#define SLOWMOTION_ON 1
|
||||
#define SLOWMOTION_SMART 2
|
||||
|
||||
#define AUTORANDOMWEAPON_OFF 0
|
||||
#define AUTORANDOMWEAPON_START 1
|
||||
#define AUTORANDOMWEAPON_END 2
|
||||
|
||||
#define SMOKETYPE_NONE 0
|
||||
#define SMOKETYPE_ELECTRICAL 1 // Dr Caroll, mainframes in Infiltration bunker
|
||||
#define SMOKETYPE_MINI 2 // Phoenix, Laptop sentry
|
||||
|
||||
Reference in new issue
Block a user