Commit Graph

43 Commits (f3fd0e6fe4dc3939eb2e6451ee057ee3ecc5e5c6)

Author SHA1 Message Date
Per Inge Mathisen 0fbcf9399b Fix another NetMsg vs duplicate buffer bug. Also assert corect packet type
when decoding them.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3774 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-13 20:25:12 +00:00
Per Inge Mathisen afb59e5e99 Clean up declaration of NETsetupTCPIP
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3771 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-13 17:22:43 +00:00
Per Inge Mathisen 917187ca7d Clean out some excess global defines.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3753 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 16:23:20 +00:00
Per Inge Mathisen 907f684f8a Remove remains of old external launcher program lobby.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3752 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 16:00:17 +00:00
Per Inge Mathisen b8ecac8f77 Remove the final remains of the old ugly network code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3746 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 21:03:00 +00:00
Per Inge Mathisen 160afd4e7a Remove some unused code from netplay.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3744 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 20:08:39 +00:00
Giel van Schijndel 0c7ade394d * Remove message type MSG_PLAYER_DATA as it sends/receives void* data chuncks which is __not__ endian safe (not to mention struct padding)
* Don't maintain player stats in lib/netplay/netplay.c; instead maintain them in src/multistat.c
 * Add a new net message type (NET_PLAYER_STATS) to exchange player stats


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3661 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 14:39:31 +00:00
Giel van Schijndel b76b958bb7 Move sending & receiving of MSG_PLAYER_DATA over to the new netcode API
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3645 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 14:45:08 +00:00
Per Inge Mathisen 15a22f8724 Remove unused netplay macros
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3558 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 13:45:03 +00:00
Per Inge Mathisen f246839359 patch #928 ported map send/rev to new netAPI by Buginator with style fixes by me
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3431 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-11 21:39:41 +00:00
Freddie Witherden 9a312a7991 Commit the second part of patch #913 which removes (the defunct) AUDIOMSG system.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3335 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 13:38:19 +00:00
Per Inge Mathisen dc7a84da62 Log droid death and packet source. Beware: This will make net games incompatible
between before and after this commit.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3311 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-02 17:08:29 +00:00
Giel van Schijndel c51bd8ae10 * Get rid of a large quantity of unused parameters
* Turn some signed integers ("int" or "SDWORD") into unsigned integers where it made more sence (and signed integers caused warnings about comparing signed with unsigned integers)
 * At some places cast to an unsigned integer (where the type of the expression is a signed integer but the result of it logically _always_ is an absolute value)
 * Remove unused struct-type EVENT_INIT
 * Convert use of malloc->memcpy->free to one single realloc call (and now make sure to actually check realloc's return value, which wasn't done with the malloc call)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3037 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-10 23:15:46 +00:00
Giel van Schijndel 74e64738fa * Add network primitives by Freddie Witherden <EvilGuru>
* Modify them slighly to use get/set functions for the package direction (instead of a global accessable to all files which forward declare it)
 * Add a NETfloat to the set of primitives
 * Modify NETstring to use strnlen1 instead of strnlen which is a GNU extension to the C library (strnlen1 has been copied from gettext 0.16.1 which is GPLv2+)
NB: rerun your buildsystems
NB2: Xcode requires an update

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2358 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 18:50:28 +00:00
Per Inge Mathisen 1df2199ce8 Remove final pieces of encryption code. Warning: This touches some seriously
unstable code. Bugs may follow!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2184 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 18:22:04 +00:00
Per Inge Mathisen 6a25589a62 Add network statistics logging, to figure out which parts of the code consume
the most network bandwidth. Look in in the netplay.log file for this info.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2113 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 15:26:23 +00:00
Per Inge Mathisen e509767d23 Clean out some unused code from netplay.c|h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2109 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 13:48:22 +00:00
Per Inge Mathisen d3271aa386 Remove now quite useless encryption and anti-cheat code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1953 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-24 13:38:22 +00:00
Giel van Schijndel dcb2c3350f * turn some usages of WinAPI types (*WORD) into their native C counterparts (e.g. int, unsigned int, etc.)
* make integers unsigned at places where we never, ever use signed values for their values
 * move some variables into a more local scope (i.e. the only scope where they're used)
 * turn some mixed tab/spaces indentation usage into tabs-only
 * remove unused (and commented out) conditional compilation macro USE_DIRECTPLAY_PROTOCOL


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1798 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-03 15:51:56 +00:00
Dennis Schridde 6fa36aa0e9 + const, - unused
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1795 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-03 13:46:50 +00:00
Giel van Schijndel 856830a0e4 Cleanup:
* Remove some forward declarations of deprecated, unused and undefined functions
 * Remove some unused functions which only said: "return TRUE;"

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1692 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 19:36:21 +00:00
Giel van Schijndel b22dbc7fe5 * Remove netusers_stub.c. Its only contained function was NETuseNetwork, which granted direct write access to global var NetPlay.bComms. This was camouflaged as a nice function call, so instead we now use it directly as it is: accessing/modifying a global variable.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1690 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 18:48:36 +00:00
Giel van Schijndel 6e5038d237 use (u)intX_t types for structs send accross the network (for the size guarantees)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1672 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 22:55:12 +00:00
Giel van Schijndel 7b025ea3e1 * Make our lobby protocol code endian safe (response of a "list" command now always is preceded by a 32bit long, unsigned, little endian integer)
* Remove parameter `BOOL async` of NETfindGame since it wasn't used

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1628 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 17:31:12 +00:00
Giel van Schijndel 70c07901ae * Remove unused spectator functions: NETspectate and NETisSpectator
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1626 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 11:36:46 +00:00
Giel van Schijndel a2d13bc53c * remove lib/netplay/netaudio_stub.c (only had empty functions)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1625 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 11:33:44 +00:00
Giel van Schijndel 1689bd9dc9 * Remove unused function NEThashFile
(This function was only used to generate a hash from the compiled Warzone executable, this hash was then used as a security value across the network. This method won't work when using different compilers, OSes, etc.)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1624 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 10:57:08 +00:00
Dennis Schridde 49b314f6a2 - Fix masterserver disconnect (patch by Gerard)
- Show hostname:port on connection errors
- Make gameserver and masterserver port configurable (as well as the masterserver name)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1512 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-21 13:46:28 +00:00
Stefan Huehner aa1cb2ec14 Remove references to already removed header files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1431 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 18:29:58 +00:00
Giel van Schijndel 7250eff5b6 * Remove yet another set of unused (or empty) functions
* Remove an unused, local, function-variable
 * Remove some file-global, static variables

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1051 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-29 23:17:46 +00:00
Dennis Schridde 49ceba7503 Add GPL notices to all sourcecode files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1014 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-15 20:09:25 +00:00
Dennis Schridde fafa69842f x86_64 fixes by Pseudonym404. (Incl. some minor other changes, eg in src/game.c)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@854 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-25 01:26:05 +00:00
Dennis Schridde 770af57c20 Remove more extra types
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@812 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-04 23:16:51 +00:00
Dennis Schridde 67056c8d24 - Droped a lot of (nearly) unused types from lib/framework/types.h
- Remove lots of unused functions (Windows/DDraw related)
- Now store the used bitdepth in the config and thus make it configurable without having to modify the sourcecode


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@808 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-04 01:11:26 +00:00
Dennis Schridde 3261a09baf BIG cleanup of headers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@749 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-23 17:24:55 +00:00
Dennis Schridde 728b9a9913 - Commit patches "code cleanup: void" and "code cleanup: const" by Stefan Huehner
- Replace every occurence of VOID with void (and LPVOID with void*)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@703 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-13 09:09:05 +00:00
Per Inge Mathisen 2149739999 Almost all strings and buffers are now of type char. This fixes
more than half the warnings on gcc4, and makes sure we do not
get signedness problems between platforms where char is defined
with different signedness. Also set line-ending properites for
some bison/flex files that did not have it set.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@563 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-12 16:52:37 +00:00
Per Inge Mathisen ecb223924a Remove DirectX types
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@553 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-10 16:05:52 +00:00
Dennis Schridde 07dcf43518 Fix deprecated function declaration
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@489 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-21 21:46:23 +00:00
Per Inge Mathisen b8e4ca782f Remove security hole-in-a-function NetGetSt(), which was thankfully not used
anywhere in the code.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@487 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-21 20:01:01 +00:00
Dennis Schridde 40090410ac - Cleaned up stubs
- Removed unused/outdated ivis02/Ivis02.dsp/.vcproj and  src/mpdpxtra.[ch]
- Replaced src/mplayer.c with a stub, containing only mplayerSubmit()
- Added DEPRECATED warnings
- Added documentation for WZ_DEPRECATED
One commit follows, to finish the move from ivis02/v4101_stub.c to ivis02/v4101.c



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@415 4a71c877-e1ca-e34f-864e-861f7616d084
2006-04-08 19:14:30 +00:00
Rodolphe Suescun 9b001a7131 Integrated master server patch from Henri Valta.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@370 4a71c877-e1ca-e34f-864e-861f7616d084
2005-12-02 21:45:42 +00:00
No Author 5ba7ddac6b Create final repository structure.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@362 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-28 17:47:08 +00:00