This is a fork of Zandronum Beta for Mac Os (Silicon and Intel)
Revision | f885ca50ff29597d78b782e45adcbb046133cd7c (tree) |
---|---|
Time | 2022-10-09 23:44:38 |
Author | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
Moved the sv_maxlives definition from survival.cpp into gamemode.cpp, survival isn't the only game mode that uses this CVar.
@@ -77,6 +77,17 @@ | ||
77 | 77 | |
78 | 78 | CVAR( Bool, sv_suddendeath, true, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEPLAYSETTING ); |
79 | 79 | |
80 | +CUSTOM_CVAR( Int, sv_maxlives, 0, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEPLAYSETTING ) | |
81 | +{ | |
82 | + if ( self >= 256 ) | |
83 | + self = 255; | |
84 | + if ( self < 0 ) | |
85 | + self = 0; | |
86 | + | |
87 | + // [AK] Notify the clients about the change. | |
88 | + SERVER_SettingChanged( self, false ); | |
89 | +} | |
90 | + | |
80 | 91 | //***************************************************************************** |
81 | 92 | // VARIABLES |
82 | 93 |
@@ -74,6 +74,7 @@ | ||
74 | 74 | EXTERN_CVAR( Bool, instagib ) |
75 | 75 | EXTERN_CVAR( Bool, buckshot ) |
76 | 76 | EXTERN_CVAR( Bool, sv_suddendeath ) |
77 | +EXTERN_CVAR( Int, sv_maxlives ) | |
77 | 78 | |
78 | 79 | //***************************************************************************** |
79 | 80 | typedef enum |
@@ -68,17 +68,6 @@ | ||
68 | 68 | #include "sv_commands.h" |
69 | 69 | #include "v_video.h" |
70 | 70 | |
71 | -CUSTOM_CVAR( Int, sv_maxlives, 0, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEPLAYSETTING ) | |
72 | -{ | |
73 | - if ( self >= 256 ) | |
74 | - self = 255; | |
75 | - if ( self < 0 ) | |
76 | - self = 0; | |
77 | - | |
78 | - // [AK] Notify the clients about the change. | |
79 | - SERVER_SettingChanged( self, false ); | |
80 | -} | |
81 | - | |
82 | 71 | //***************************************************************************** |
83 | 72 | // VARIABLES |
84 | 73 |
@@ -87,6 +87,5 @@ | ||
87 | 87 | // EXTERNAL CONSOLE VARIABLES |
88 | 88 | |
89 | 89 | EXTERN_CVAR( Int, sv_survivalcountdowntime ) |
90 | -EXTERN_CVAR( Int, sv_maxlives ) | |
91 | 90 | |
92 | 91 | #endif // __SURVIVAL_H__ |