Merge pull request #623 from rafccq/port-max-explosions

Maximum number of explosions now can be changed from the .ini file
This commit is contained in:
fgsfds authored and GitHub committed 2025-06-11 12:23:31 +02:00
commit eabd7a438f
5 files changed
+3 -9

No files matched your search

+1
View File
@@ -169,6 +169,7 @@ PD_CONSTRUCTOR static void gameConfigInit(void)
configRegisterInt("Game.SkipIntro", &g_SkipIntro, 0, 1); configRegisterInt("Game.SkipIntro", &g_SkipIntro, 0, 1);
configRegisterInt("Game.DisableMpDeathMusic", &g_MusicDisableMpDeath, 0, 1); configRegisterInt("Game.DisableMpDeathMusic", &g_MusicDisableMpDeath, 0, 1);
configRegisterInt("Game.GEMuzzleFlashes", &g_BgunGeMuzzleFlashes, 0, 1); configRegisterInt("Game.GEMuzzleFlashes", &g_BgunGeMuzzleFlashes, 0, 1);
configRegisterInt("Game.MaxExplosions", &g_MaxExplosions, 6, 96);
for (s32 j = 0; j < MAX_PLAYERS; ++j) { for (s32 j = 0; j < MAX_PLAYERS; ++j) {
const s32 i = j + 1; const s32 i = j + 1;
configRegisterFloat(strFmt("Game.Player%d.FovY", i), &g_PlayerExtCfg[j].fovy, 5.f, 175.f); configRegisterFloat(strFmt("Game.Player%d.FovY", i), &g_PlayerExtCfg[j].fovy, 5.f, 175.f);
-6
View File
@@ -14,12 +14,6 @@ void explosionsReset(void)
g_ExplosionShakeIntensityTimer = 0; g_ExplosionShakeIntensityTimer = 0;
g_ExplosionDamageTxScale = 1; g_ExplosionDamageTxScale = 1;
g_MaxExplosions = MAX_EXPLOSIONS;
if (g_Vars.stagenum >= STAGE_TITLE) {
g_MaxExplosions = 0;
}
if (g_MaxExplosions == 0) { if (g_MaxExplosions == 0) {
g_Explosions = NULL; g_Explosions = NULL;
} else { } else {
+1 -1
View File
@@ -14,7 +14,7 @@ void explosionsStop(void)
viShake(0); viShake(0);
if (g_Explosions) { if (g_Explosions) {
for (i = 0; i < MAX_EXPLOSIONS; i++) { for (i = 0; i < g_MaxExplosions; i++) {
if (g_Explosions[i].prop) { if (g_Explosions[i].prop) {
propDelist(g_Explosions[i].prop); propDelist(g_Explosions[i].prop);
propDisable(g_Explosions[i].prop); propDisable(g_Explosions[i].prop);
+1 -1
View File
@@ -1544,7 +1544,7 @@ bool frIsAmmoWasted(void)
} }
// Check if there are any explosions // Check if there are any explosions
for (i = 0; i != MAX_EXPLOSIONS; i++) { for (i = 0; i != g_MaxExplosions; i++) {
if (g_Explosions[i].prop) { if (g_Explosions[i].prop) {
return false; return false;
} }
-1
View File
@@ -18,7 +18,6 @@
#define MAX_CHRSPERSQUADRON 16 #define MAX_CHRSPERSQUADRON 16
#define MAX_CHRSPERTEAM 32 #define MAX_CHRSPERTEAM 32
#define MAX_CHRWAYPOINTS 6 #define MAX_CHRWAYPOINTS 6
#define MAX_EXPLOSIONS 6
#define MAX_EYESPYDARTS 8 #define MAX_EYESPYDARTS 8
#define MAX_MPCHRS (MAX_PLAYERS + MAX_BOTS) #define MAX_MPCHRS (MAX_PLAYERS + MAX_BOTS)
#define MAX_MPPLAYERCONFIGS (MAX_PLAYERS + 2) #define MAX_MPPLAYERCONFIGS (MAX_PLAYERS + 2)