Commit Graph

2332 Commits (1ed72f87abf0793051dea02837c10db91b64add7)

Author SHA1 Message Date
Buginator 46ea38f8d5 Merge r9584/9585
"Add sync counters to more accurately keep track of what is being synced and what isn't.

This information is saved in netplay.log in the config dir."


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9590 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:57 +01:00
Buginator 3a5f7d556b Use #define NOMINMAX to disable the min / max macros in windows.h
instead of r9562
The other option was to use (std::max) as in, you have ( ) around min/max



git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9589 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:57 +01:00
Buginator dc8cb98ad9 Update MSVC project file for release build and fix iniparser DebugInformationFormat.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9588 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:57 +01:00
Cyp c491a4b315 lib/netplay/netplay.c: Change don't-while loop into do-while loop.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9582 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:57 +01:00
Christian Ohm 5b3b144994 Remove a useless macro parameter.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9580 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:57 +01:00
Cyp 8f034fe834 Workaround for Microsoft bugs such as #defining random words such as min and max.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9562 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:55 +01:00
Per Inge Mathisen 8f51743062 Keep bitfields of vision knowledge for faster comparisons. This speeds up map vision updates by almost 15%. (Reviewed by Cyp_.)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9559 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:54 +01:00
Guangcong Luo 9723bbb44b 2.3: Fix bug #1444 - crash upon exit - patch provided by Safety0ff.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9527 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:51 +01:00
Per Inge Mathisen 3a783743a4 In certain corner cases, buildings could end up not being seen by sensors in true fog of war.
This makes sure that all tiles on which we have buildings are properly seen by sensors.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9501 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:47 +01:00
Guangcong Luo dbd9be9a5a 46 warnings from Xcode on the wall, 46 warnings from Xcode... take several down, make a few variables signed and cast some other "%d"s to (int), 6 warnings from Xcode on the wall!
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9493 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:45 +01:00
Christian Ohm 36acdc554b Add Croatian translation by 13KukYNexus666.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9474 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:43 +01:00
Guangcong Luo 255506d4b6 Correctly calculate frameTimeFraction2 - fix bug #482, among many other bugs.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9461 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:41 +01:00
Christian Ohm f4de16db77 Replace deprecated libpng variables.
Refs #1471.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9455 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:40 +01:00
Guangcong Luo 3579209ab4 Fix bug #1466 - release builds shouldn't assert - fixes a ton of "crashes" in Mac OS X and Linux.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9451 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:39 +01:00
Cyp 275e260a89 Fix building with PD-ksh on BSD. Reports and some patches from brad0. (svn -r9444)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9445 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:39 +01:00
Guangcong Luo d187d6fab4 Split bMultiPlayer into bMultiPlayer and bMultiMessages - fixes a ton of bugs relating to the game thinking it's not in multiplayer mode when it is, but has multi messages off.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9407 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:33 +01:00
Cyp b3c57ebb63 net: Set SO_REUSEADDR on sockets to avoid address already in use errors.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9391 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:27 +01:00
Christian Ohm 3ab1a0104d Update Spanish locale names.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9370 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:25 +01:00
Cyp 6ddb1eadb2 cpp: Add extern "C" {} in headers.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9336 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:21 +01:00
Christian Ohm 2b2a187172 Update Windows language table according to MSDN.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9326 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:20 +01:00
Per Inge Mathisen d1ca417ef2 Remove redundant code and improve asserts.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9321 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:19 +01:00
Guangcong Luo 1685f723be Fix two warnings in scrap.c in Mac OS X.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9316 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:18 +01:00
Guangcong Luo af1d9865c0 Add "Laser satellite firing" and "Incoming laser satellite strike" to the list of occasions that deserve a radar blip representing where they're occurring.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9314 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:16 +01:00
Guangcong Luo 3ac9f53bf8 Add support for Cmd/Meta keyboard shortcuts. Make keyboard shortcuts look nicer: "lctrl - f11" to "Ctrl + F11" (Warzone keyboard shortcuts accept both LCtrl and RCtrl)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9306 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:15 +01:00
Guangcong Luo 9568ac7987 Close ticket #1134 - add radar blips for events such as "structure under attack"
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9293 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:13 +01:00
Guangcong Luo 2025407222 Commit mod list patch #1415:
1. Adds a specific autoload folder, `mods/autoload/`. This is essential for a good mod community.
 2. Searches the `mods/` folder for global mods, as well as `mods/global/`. This is the first step in merging the three mod folders together, but I'm not planning on merging them completely in 2.3.
 3. Constructs a list of loaded mods, and displays the list in the VersionString (including the list of games in the lobby).
 4. Grays out games with incompatible mods in the NetPlay game list, and gives a warning in the tooltip: "Your loaded mods are incompatible with this game. (Check mods/autoload/?)"
 5. Gives a warning when a game with an incompatible mod is clicked: "You have an incompatible mod."
 6. Displays a list of mods above the Warzone logo.
 7. Lists mods in hosting screen, and warns hosts that all players need the same mods loaded.

Closes ticket:1415.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9291 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:13 +01:00
Guangcong Luo b5471fc186 Calculate gameTime2 using the correct time offset (fixes strange animations on some nonstandard game speeds).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9279 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:12 +01:00
Christian Ohm 60c4f603da Use the configured game port instead of hardcoding it.
Also make the port variables static.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9269 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:11 +01:00
Guangcong Luo bf1541a626 Fix typo in gtime.c
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9266 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:11 +01:00
Guangcong Luo 5da6588fb0 Initialize timeOffset correctly.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9258 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:09 +01:00
Guangcong Luo dabc178157 Some hacks to paper over the time travel bug.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9257 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:09 +01:00
Guangcong Luo cf8265e6c8 An assert to figure out why time travel is occurring.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9250 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:08 +01:00
Guangcong Luo 3e47b4ac89 Commit Safety0ff's audio fix.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9249 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:08 +01:00
Per Inge Mathisen 12f9218c67 Fix for compiler warning for uninitialized variable
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9188 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:26:59 +01:00
Per Inge Mathisen 9c6b55f2d6 Remove unused definitions.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9187 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:26:59 +01:00
Guangcong Luo f13676935c Fix an infinite loop in sound_UpdateStreams.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9175 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:37 +01:00
Christian Ohm b0c4e40934 Include files needed for win32 cross-building.
Building from tarball still doesn't work, since nsis wants the gmo files in the
build dir while they are in the source dir.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9146 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:34 +01:00
Per Inge Mathisen baa0ac2188 Purely stylistic changes to make it easier to read this code for mistakes.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9131 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:32 +01:00
Per Inge Mathisen 4f963349cc Fix the order audio samples are removed so that they actually are removed properly.
Patch by jovie1024. This closes ticket:1391


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9106 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:29 +01:00
Per Inge Mathisen 93f1d85e2d Add new debug log category for saving whatever was sent to console.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9102 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:29 +01:00
Guangcong Luo 357de2a6cb Apply patch #1330 provided by Cyp - Add unicode support to text boxes and game-chat
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9101 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:29 +01:00
Guangcong Luo 64e2425cf0 Update trunk VersionString.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9088 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:28 +01:00
Christian Ohm e0a74027e5 Change ASSERT to ASSERT_OR_RETURN in delSocket.
Closes #1368.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9068 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:25 +01:00
Guangcong Luo 0b4c58bd0b Commit patch #1375 - don't allow players to ignore kicks, add a kick button to the MP game setup screen, prevent spoofing a message from a different source, don't show "player left" message unless a player actually left.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9065 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:25 +01:00
Christian Ohm 4379fdcbd0 Fix possible segfault in miniupnp.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9041 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:22 +01:00
Christian Ohm cd577664ca Add Ukrainian translation.
Closes #947.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9039 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:22 +01:00
Christian Ohm b6fe392071 Add -Wdeclaration-after-statement to the default warnings.
Should help prevent breaking the build for people who have to use crappy
compilers. Exclude lib/exceptionhandler, that contains C99 non-Windows code in
places.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9035 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:10 +01:00
Guangcong Luo a815eaa82c Fix bug #1339 - trunk and 2.3-branch shouldn't be able to play with each other.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9017 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:09 +01:00
Christian Ohm c31d7e502f Do UPnP detection on "host game", not during startup.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9011 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:08 +01:00
Christian Ohm 069ab3cdbc Only forward port 2100, 9990 is not needed.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9010 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:08 +01:00
Christian Ohm 254f657427 Really fix #1338 (crash when joining IP).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8997 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:08 +01:00
Christian Ohm 0e8107e3a1 Fix grammar, typos, don't translate kickPlayer messages.
Those are only shown in the log anyway, the in-game messages are still
translated.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8993 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:06 +01:00
Guangcong Luo 36c85d7c78 Fix bug #709 - lobby server doesn't update player count when player leaves a game.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8989 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:05 +01:00
Christian Ohm 9b554a2d6e Reject differing game versions, not the same.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8981 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:05 +01:00
Christian Ohm 92f53f68ff Shorten autokick message when version differs.
Was too long to be displayed completely.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8979 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:05 +01:00
Guangcong Luo d193b397fc Meant to commit these files in r8971.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8973 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:03 +01:00
Guangcong Luo 5bb3fc6132 Compare netcode versions rather than version strings - allows updating version strings while retaining netcode compatibility. Bump netcode version to 2.31.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8971 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:03 +01:00
Guangcong Luo e42645e66b Revert r8964 - apparently increasing the maximum number of games visible in the lobby breaks savegame compatibility.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8968 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:03 +01:00
Guangcong Luo be47ec5bfa Increase max game limit from 12 to 18 - now supported by new larger lobby!
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8964 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:02 +01:00
Christian Ohm 3637a83e38 Remove stray parenthesis.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8945 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:03:59 +01:00
Guangcong Luo e372d3d44e Fix bug #1311 - typos in netplay.c
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8939 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:03:59 +01:00
Guangcong Luo f2e9a412ac I've discovered why the netcode is so unstable. Everthing just assumes it'll be successful. At one point, there's an infinite loop waiting for an accept message. No possibility of receiving a rejection message, no timeout, nothing. At another point, the host just overwrites an existing player, if the game is full. I've fixed most of the ones I came into contact with, but there are probably many more left.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8938 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:03:58 +01:00
Guangcong Luo 9b0381b14b Remove the two Warzone logo backdrops - they're really unprofessional and tacky, especially when there's already a Warzone logo at the top of the screen.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8933 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:03:57 +01:00
Guangcong Luo c10417b595 Disable some fields that should be disabled but weren't, in the multiplayer game join interface.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8929 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:03:56 +01:00
Per Inge Mathisen f2cf35f791 Enumerating devices apparently crashes PulseAudio on Fedora12, so try to do this in a more
limited way and hope that either this fixes the problem, or someone fixes the issue upstream
meanwhile. This was fixed in a different way in 2.3 branch due to different sound init code.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8861 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:27:02 +01:00
Guangcong Luo 1526b124d2 Fix a crash caused by typo in trunk netcode in r7288.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8850 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:27:02 +01:00
Guangcong Luo bbba6f6ff8 Only delSocket if it actually exists (fix assert).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8794 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:52 +01:00
Giel van Schijndel 34b50b4219 Fix the doxygen documentation for `addSocket` and `delSocket`
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8792 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:52 +01:00
Giel van Schijndel 64d8e39b38 Check for socket errors and handle them:
* Close a socket when an error occurs on it
 * Store the return values of send() and recv() in `ssize_t` instead of `int`
  - Prevents truncation of values as ssize_t is the return type specified by POSIX to use

This should prevent us from ever getting hit with SIGPIPE again.

SIGPIPE is transmitted when we try to write to a connection we've previously been told has closed.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8772 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:50 +01:00
Giel van Schijndel 46aa89779e Be more resiliant in the case of dangling pointers to a Socket
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8769 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:50 +01:00
Buginator f5b417e7d0 Remove unneeded abort that was already removed in 2.3
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8754 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:49 +01:00
Buginator 1fc98725c8 frontport r7797
"In inputLooseFocus(), we clear the keyboard/mouse to the init state (KEY_UP).

fixes ticket:515 "

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8750 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:48 +01:00
Buginator 5b2eabf0b5 Fix bad indentation on a merge that went astray
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8749 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:48 +01:00
Buginator 79037573f0 frontport r8717
"Add new flag to keep track of when Host is alive.

Add a popup window notification for when the Host drops, and also notify the host when *they* quit, that the game will be over for everyone else (because of the network model)

Fix heap corruption when the host's connection was severed in the NET_fillBuffer() function.

Fix a socket error when we tried to write to a NULL socket.

Note: added two strings that need translating"


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8743 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:47 +01:00
Buginator 38528c7524 fix typo (r8709)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8738 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:46 +01:00
Buginator 15413718c8 frontport r8672
"Update packet names for new packet types in log.


refs ticket:1185"


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8737 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:46 +01:00
Buginator d26716553b frontport r8671
"Reset flags for new people joining."

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8736 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:46 +01:00
Buginator 38f66c5f9e frontport r8667
"Rewrite the stupid file transfer routines.
* It will now only send the file to the person that needs it.

* Adds abort code to the file routines as well, and also tries to detect when the Host is using a malformed filename to host a map.

* Make sure user can't hit the 'ready' button when the map transfer is ongoing.

* Get rid of the silly delays (Much faster transfers)

NOTE: we are still capped by fps. 
fixes ticket:1128
fixes ticket:1127
refs ticket:215 (still can't transfer 'map packs')"

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8734 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:45 +01:00
Buginator 5a2509a26d frontport r8651
"Add config variable 'UPnP' to enable/disable UPnP detection / routines.  1=on, 0=off, default is ON.
"

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8732 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:45 +01:00
Buginator 098a1ea117 frontport r8650
"To prevent some confusion rename 'game' structure in netplay.c to gamestruct.

'game' is used as MULTIPLAYERGAME structure everywhere else, and it used GAMESTRUCT in netplay.c"


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8731 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:45 +01:00
Guangcong Luo ad7e87792d Use 32x32 cursors if unknown cursor type given.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8723 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:44 +01:00
Guangcong Luo bcef102074 Add small font for textdraw routines.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8720 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:44 +01:00
Christian Ohm 55f12a5d52 Hurd build fixes.
Closes #969.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8706 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:44 +01:00
Per Inge Mathisen e73697495e Forward port r8652 and r8626 (savegame fixing and breaking) from 2.3
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8696 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:42 +01:00
Christian Ohm cd36584441 Don't access UPnP device info after freeing it.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8676 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:41 +01:00
Per Inge Mathisen 5e16640ba3 Build fixes for netplay.c on OpenBSD, closes ticket:1180
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8675 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:41 +01:00
Giel van Schijndel fbec26f8e1 Improve compile time code checking:
* Use a version of STATIC_ASSERT that can be used as part of expressions
  - Taken from the Linux kernel (<linux/kernel.h>)
 * Add macro WZ_ASSERT_ARRAY which (statically) asserts that the given variable is an array
  - the given array needs to have a compile-time defined size
  - pointers will fail this assertion
 * Verify that the expression given to ARRAY_SIZE is truly an array
  - verify this using WZ_ASSERT_ARRAY_EXPR
 * Catch & fix two coding errors resulting from wrong use of some macros
  - macros: sstrcpy and ARRAY_SIZE

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8654 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:54 +01:00
Christian Ohm d808f72d8e Don't add UPnP redirects in single player skirmish.
Closes #1174.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8647 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:53 +01:00
Christian Ohm cd3ce412a3 Fix typos, reported by Paul Wise.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8646 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:53 +01:00
Guangcong Luo 9dc3cac6d6 [Having problems committing, so I'm seeing if I can commit this one file at a time] Continue fixing bug #1170: compile warning.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8643 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:53 +01:00
Guangcong Luo f6992d5719 sendTextMessage improvements - uses the position numbers again, and sends "(private to Player) message" instead of "0message". Also adds a shortcut for alliance chat: Use ".message" to send "(allies) message" to allies only.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8639 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:53 +01:00
Buginator b99b245e7f Turns out that we can't use GLee.h for all our openGL header needs, since GLee.h defines Status, and we also use that, so until we fix that either in GLee.h or our codebase, going to revert r8615/r8616
FIXME! (to be done later)

closes ticket:153

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8618 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:51 +01:00
Buginator c6747b1606 Don't use SDL_opengl.h, instead, use GLee.h to handle all our openGL needs.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8617 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:51 +01:00
Buginator 3665f20498 Use the correct header file when using openGL, instead of the more complex #if/else/endif block.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8616 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:51 +01:00
Guangcong Luo d91693afb2 Hardware-accelerated cursors work correctly in Mac OS X now.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8610 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:49 +01:00
Guangcong Luo 6519ce48e9 Use GLuint correctly (fixes build errors and warnings caused by other fixes).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8608 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:49 +01:00
Buginator 9445f60753 Actually use GLuint instead of pretending to be GLuint.
patch by stiv.
Closes ticket:1148

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8604 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:48 +01:00
Guangcong Luo aabbca68d8 Move map download progress to players list, so you can still chat while it happens. Also update players list instantly, instead of every 2 seconds (except slider changes, which are updated every 0.5 seconds). Also fix taken position detection (fixes bug #1137).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8602 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:48 +01:00
Guangcong Luo 8edc0bd26a Allow AI difficulty slider to be dragged for longer than 2 seconds.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8600 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:48 +01:00
Guangcong Luo c6e474a482 Revert r8584/r8585 since they're causing too many problems in Linux for me to deal with right now. Fixes bugs #1121 and #1123.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8590 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:47 +01:00