• R/O
  • SSH

Commit

Tags
Aucun tag

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 used on servers hosted by The Sentinels Playground (TSPG), Euroboros (EB), and Down Under Doomers (DUD).


Commit MetaInfo

Révision4e2b0310c6f306b57a81986f15ef7984d5bd19b9 (tree)
l'heure2022-10-22 23:08:42
AuteurAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Message de Log

Added two bit mask constants of GAMEMODE flags: one for all game types (i.e. cooperative, deathmatch, teamgame), and another for all earn types (i.e. kills, frags, points, wins).

Change Summary

Modification

diff -r 32f2394fc70d -r 4e2b0310c6f3 src/gamemode.cpp
--- a/src/gamemode.cpp Sun Nov 20 20:47:43 2022 +0100
+++ b/src/gamemode.cpp Sat Oct 22 10:08:42 2022 -0400
@@ -470,12 +470,12 @@
470470 I_Error( "\"%s\" has no short name.", name.GetChars( ));
471471
472472 // [AK] Get the game mode type (cooperative, deathmatch, or team game). There shouldn't be more than one enabled or none at all.
473- ULONG ulFlags = g_GameModes[i].ulFlags & ( GMF_COOPERATIVE | GMF_DEATHMATCH | GMF_TEAMGAME );
473+ ULONG ulFlags = g_GameModes[i].ulFlags & GAMETYPE_MASK;
474474 if (( ulFlags == 0 ) || (( ulFlags & ( ulFlags - 1 )) != 0 ))
475475 I_Error( "Can't determine if \"%s\" is cooperative, deathmatch, or team-based.", name.GetChars( ));
476476
477477 // [AK] Get the type of "players earn" flag this game mode is currently using.
478- ulFlags = g_GameModes[i].ulFlags & ( GMF_PLAYERSEARNKILLS | GMF_PLAYERSEARNFRAGS | GMF_PLAYERSEARNPOINTS | GMF_PLAYERSEARNWINS );
478+ ulFlags = g_GameModes[i].ulFlags & EARNTYPE_MASK;
479479
480480 // [AK] If all of these flags were removed or if more than one was added, then throw an error.
481481 if ( ulFlags == 0 )
diff -r 32f2394fc70d -r 4e2b0310c6f3 src/gamemode.h
--- a/src/gamemode.h Sun Nov 20 20:47:43 2022 +0100
+++ b/src/gamemode.h Sat Oct 22 10:08:42 2022 -0400
@@ -63,6 +63,9 @@
6363 // to go into a separate header for technical reasons.
6464 #include "gamemode_enums.h"
6565
66+#define GAMETYPE_MASK ( GMF_COOPERATIVE | GMF_DEATHMATCH | GMF_TEAMGAME )
67+#define EARNTYPE_MASK ( GMF_PLAYERSEARNKILLS | GMF_PLAYERSEARNFRAGS | GMF_PLAYERSEARNPOINTS | GMF_PLAYERSEARNWINS )
68+
6669 // [CK] Event defines
6770 #define GAMEEVENT_CAPTURE_NOASSIST -1 // The third arg meaning no player assisted
6871 #define GAMEEVENT_RETURN_TIMEOUTRETURN 0