• R/O
  • SSH

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

This is a fork of Zandronum Beta for Mac Os (Silicon and Intel)


Commit MetaInfo

修訂f885ca50ff29597d78b782e45adcbb046133cd7c (tree)
時間2022-10-09 23:44:38
作者Adam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

Moved the sv_maxlives definition from survival.cpp into gamemode.cpp, survival isn't the only game mode that uses this CVar.

Change Summary

差異

diff -r 420ac83eb02f -r f885ca50ff29 src/gamemode.cpp
--- a/src/gamemode.cpp Thu Oct 06 23:22:08 2022 -0400
+++ b/src/gamemode.cpp Sun Oct 09 10:44:38 2022 -0400
@@ -77,6 +77,17 @@
7777
7878 CVAR( Bool, sv_suddendeath, true, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEPLAYSETTING );
7979
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+
8091 //*****************************************************************************
8192 // VARIABLES
8293
diff -r 420ac83eb02f -r f885ca50ff29 src/gamemode.h
--- a/src/gamemode.h Thu Oct 06 23:22:08 2022 -0400
+++ b/src/gamemode.h Sun Oct 09 10:44:38 2022 -0400
@@ -74,6 +74,7 @@
7474 EXTERN_CVAR( Bool, instagib )
7575 EXTERN_CVAR( Bool, buckshot )
7676 EXTERN_CVAR( Bool, sv_suddendeath )
77+EXTERN_CVAR( Int, sv_maxlives )
7778
7879 //*****************************************************************************
7980 typedef enum
diff -r 420ac83eb02f -r f885ca50ff29 src/survival.cpp
--- a/src/survival.cpp Thu Oct 06 23:22:08 2022 -0400
+++ b/src/survival.cpp Sun Oct 09 10:44:38 2022 -0400
@@ -68,17 +68,6 @@
6868 #include "sv_commands.h"
6969 #include "v_video.h"
7070
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-
8271 //*****************************************************************************
8372 // VARIABLES
8473
diff -r 420ac83eb02f -r f885ca50ff29 src/survival.h
--- a/src/survival.h Thu Oct 06 23:22:08 2022 -0400
+++ b/src/survival.h Sun Oct 09 10:44:38 2022 -0400
@@ -87,6 +87,5 @@
8787 // EXTERNAL CONSOLE VARIABLES
8888
8989 EXTERN_CVAR( Int, sv_survivalcountdowntime )
90-EXTERN_CVAR( Int, sv_maxlives )
9190
9291 #endif // __SURVIVAL_H__