Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Simplify usage of version_getVersionString().

Suggested by cybersphinx.
  • Loading branch information...
commit 0e61944a718da0c943809643819ca621b76bd14c 1 parent 0063e28
Cyp Cyp authored

Showing 2 changed files with 2 additions and 6 deletions. Show diff stats Hide diff stats

  1. +1 5 lib/netplay/netplay.cpp
  2. +1 1  releaseBranch
6 lib/netplay/netplay.cpp
@@ -158,7 +158,7 @@ unsigned NET_PlayerConnectionStatus[CONNECTIONSTATUS_NORMAL][MAX_PLAYERS];
158 158 ** ie ("trunk", "2.1.3", "3.0", ...)
159 159 ************************************************************************************
160 160 **/
161   -static char const *versionString = "version_getVersionString()";
  161 +static char const *versionString = version_getVersionString();
162 162 static int NETCODE_VERSION_MAJOR = 6;
163 163 static int NETCODE_VERSION_MINOR = 2;
164 164
@@ -2491,10 +2491,6 @@ bool NEThostGame(const char* SessionName, const char* PlayerName,
2491 2491 sstrcpy(gamestruct.mapname, game.map); // map we are hosting
2492 2492 sstrcpy(gamestruct.hostname, PlayerName);
2493 2493 sstrcpy(gamestruct.versionstring, versionString); // version (string)
2494   - if (strcmp(gamestruct.versionstring, "version_getVersionString()") == 0)
2495   - {
2496   - sstrcpy(gamestruct.versionstring, version_getVersionString());
2497   - }
2498 2494 sstrcpy(gamestruct.modlist, getModList()); // List of mods
2499 2495 gamestruct.GAMESTRUCT_VERSION = 3; // version of this structure
2500 2496 gamestruct.game_version_major = NETCODE_VERSION_MAJOR; // Netcode Major version
2  releaseBranch
@@ -75,7 +75,7 @@ echo "${A}Bumping version strings to ${FULLVERSTR} and netcode version to ${DATE
75 75 sed -i 's/\(AC_INIT(\[Warzone 2100\],\[\)'"${BASE}"'\(\],\[http:\/\/wz2100.net\/\],\[warzone2100\])\)/\1'"${FULLVERSTR}"'\2/;
76 76 s/\(\[ enable_debug=${enableval} \], \[ enable_debug=\)yes\( \])\)/\1no\2/
77 77 ' "${GITROOT}"configure.ac
78   -sed -i 's/\(static char const \*versionString = "\).*\(";\)/\1'"${FULLVERSTR}"'\2/;
  78 +sed -i 's/\(static char const \*versionString = \).*\(;\)/\1"'"${FULLVERSTR}"'"\2/;
79 79 s/\(static int NETCODE_VERSION_MINOR = \)[0-9]*\(;\)/\1'"${DATENUM}"'\2/
80 80 ' "${GITROOT}"lib/netplay/netplay.c*
81 81 sed -i 's/\(VALUE "FileVersion", "\)'"${BASE}"'\("\)/\1'"${FULLVERSTR}"'\2/;

0 comments on commit 0e61944

Please sign in to comment.
Something went wrong with that request. Please try again.