Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplify usage of version_getVersionString().

Suggested by cybersphinx.
  • Loading branch information...
commit 0e61944a718da0c943809643819ca621b76bd14c 1 parent 0063e28
@Cyp Cyp authored
Showing with 2 additions and 6 deletions.
  1. +1 −5 lib/netplay/netplay.cpp
  2. +1 −1  releaseBranch
View
6 lib/netplay/netplay.cpp
@@ -158,7 +158,7 @@ unsigned NET_PlayerConnectionStatus[CONNECTIONSTATUS_NORMAL][MAX_PLAYERS];
** ie ("trunk", "2.1.3", "3.0", ...)
************************************************************************************
**/
-static char const *versionString = "version_getVersionString()";
+static char const *versionString = version_getVersionString();
static int NETCODE_VERSION_MAJOR = 6;
static int NETCODE_VERSION_MINOR = 2;
@@ -2491,10 +2491,6 @@ bool NEThostGame(const char* SessionName, const char* PlayerName,
sstrcpy(gamestruct.mapname, game.map); // map we are hosting
sstrcpy(gamestruct.hostname, PlayerName);
sstrcpy(gamestruct.versionstring, versionString); // version (string)
- if (strcmp(gamestruct.versionstring, "version_getVersionString()") == 0)
- {
- sstrcpy(gamestruct.versionstring, version_getVersionString());
- }
sstrcpy(gamestruct.modlist, getModList()); // List of mods
gamestruct.GAMESTRUCT_VERSION = 3; // version of this structure
gamestruct.game_version_major = NETCODE_VERSION_MAJOR; // Netcode Major version
View
2  releaseBranch
@@ -75,7 +75,7 @@ echo "${A}Bumping version strings to ${FULLVERSTR} and netcode version to ${DATE
sed -i 's/\(AC_INIT(\[Warzone 2100\],\[\)'"${BASE}"'\(\],\[http:\/\/wz2100.net\/\],\[warzone2100\])\)/\1'"${FULLVERSTR}"'\2/;
s/\(\[ enable_debug=${enableval} \], \[ enable_debug=\)yes\( \])\)/\1no\2/
' "${GITROOT}"configure.ac
-sed -i 's/\(static char const \*versionString = "\).*\(";\)/\1'"${FULLVERSTR}"'\2/;
+sed -i 's/\(static char const \*versionString = \).*\(;\)/\1"'"${FULLVERSTR}"'"\2/;
s/\(static int NETCODE_VERSION_MINOR = \)[0-9]*\(;\)/\1'"${DATENUM}"'\2/
' "${GITROOT}"lib/netplay/netplay.c*
sed -i 's/\(VALUE "FileVersion", "\)'"${BASE}"'\("\)/\1'"${FULLVERSTR}"'\2/;
Please sign in to comment.
Something went wrong with that request. Please try again.