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
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
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
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
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
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
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
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
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
Christian Ohm
5a5e5d6510
Threaded UPnP device detection.
...
Increases the timeout to 2 seconds. Closes #1073 .
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8564 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:45 +01:00
Buginator
e8d4d378a8
Add UPnP detection results to the Crash dump.
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8557 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:45 +01:00
Buginator
25b9dc9ba6
Add more documentation about the Map issues and note in logs about map transfers (if exists / file size mismatch)
...
(r8548/r8549)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8555 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:45 +01:00
Buginator
a1ec0bd358
Clarify variables by prefix of _64 for 64bit and _32 for 32bit...
...
(r8546)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8553 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:44 +01:00
Buginator
8018d99190
Add new message of NET_HOST_DROPPED to deal with when host quits game, we should quit as well (lobby)
...
Add more debug lines when we drop/leave players
(r8538)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8550 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:44 +01:00
Buginator
b307503d56
Slightly rework when we should and shouldn't chop strings based on if the tech level is present or not.
...
Also add more debug lines to see if this issue crops up again.
Fixes ticket:1104
(r8533)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8534 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:15 +01:00
Buginator
f76f352bd0
Add error checking to socketClose()
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8532 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:15 +01:00
Buginator
cc76454b69
Fix the missing header file for the setPlayerColour() function.
...
(r8411)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8525 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:14 +01:00
Buginator
a72cb7295a
Transmit and set local color array. Fixes picking of team color bug.
...
Transmit player map position & handle picking of players correctly. fixes ticket:1075
Enable/disable AIs on maps. fixes ticket:1065
(r8410)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8524 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:14 +01:00
Buginator
06e0716a14
*Change* MaxMsgSize is now 16K
...
*Change* MAX_BYTESPERSEC is now 14K (was hitting limit in 4p games old limit was 6K)
*Change* relax timings of ping & scoreboard to alleviate the bandwidth strain a bit
(r8381)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8520 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:13 +01:00
Per Inge Mathisen
5e7c746001
Remove obsolete references to SDL_net, which is now long gone.
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8509 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:12 +01:00
Guangcong Luo
193c8d142b
Fix a segfault from a null pointer dereference in netplay.c upnp_init(). (Fixes bug #1099 )
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8497 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-23 18:13:26 +01:00
Guangcong Luo
ae16bb2aa0
Make Warzone compile and run successfully on Mac OS X again.
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8482 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:06 +01:00
i-nod
c5e16d59ce
libminiupnpc has been integrated into MinGW build process.
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8470 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:03 +01:00
Christian Ohm
a7ae06572d
Integrate miniupnpc.
...
This should bring it up to about the state of the patches and comments in
ticket #1073 , without the threaded device detection. Timeout is 500ms, that
should be enough to detect a LAN device, and doesn't delay startup too much.
Port r8447 plus the fixes for it in r8449, r8453, r8455 and r8456 to trunk.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8460 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:02 +01:00
Christian Ohm
03607b0fb8
Rename miniupnp Makefile to prepare for automake.
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8459 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:02 +01:00
Christian Ohm
1f1a95e85e
Include MiniUPnPc.
...
lib/netplay/miniupnpc now contains a completely unmodified copy of
miniupnpc-1.4.tar.gz from http://miniupnp.free.fr/ , integration with Warzone
will follow.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8458 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:02 +01:00
Guangcong Luo
c41b9da86a
More informative version string error messages.
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8418 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:58 +01:00