Giel van Schijndel
ef72bf0a43
* "Upgrade" the function comments for NETsendGAMESTRUCT and NETrecvGAMESTRUCT to Doxygen comments
...
* Restore the empty lines removed in r5732
* Add a note to GAMESTRUCT containing a list of elements that need to be updated when GAMESTRUCT's definition changes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5770 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 21:34:18 +00:00
Per Inge Mathisen
98bd943cc3
patch #1092 : Remove some warnings reported by gcc when compiling lib/netplay/netplay.c by Bertrand Coconnier
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5747 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-02 20:23:37 +00:00
Buginator
1578d9ade8
*no code changes* Just adding a note to some functions that can use the master server to transfer the data to/from.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5732 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-02 03:58:26 +00:00
Per Inge Mathisen
c2fe7de339
The fix to bug #11829 : When three players join mp dialog, one drops, in r5258
...
had a little bug of its own, that made player 3, 5, and 7 drop instead. Fixed!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5521 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 20:36:59 +00:00
Per Inge Mathisen
58792b6df1
Fix erronous error reporting
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5517 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 16:21:00 +00:00
Per Inge Mathisen
e2064a4927
Add error check in NETsendGAMESTRUCT - dump warning to log if fails.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5516 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 11:50:18 +00:00
Per Inge Mathisen
a2ca8dedaf
Improve logging in NETbcast. Change parameter type of NETBroadcastPlayerInfo so
...
that it takes unsigned like all its users.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5515 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 11:20:47 +00:00
Per Inge Mathisen
117fa9e961
Cosmetic improvements to netplay debug log calls.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5514 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 11:02:55 +00:00
Dennis Schridde
022315eef0
Hardcode top_srcdir to make building from non-topdir possible, dont depend on the touch command, fix LDFLAGS to not depend on the removed TARGET variable
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5476 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 20:10:16 +00:00
Dennis Schridde
302a557478
Rename "raw" Makefiles to "win32" Makefiles
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5402 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 14:29:04 +00:00
Dennis Schridde
45f23a4926
Merge commit 'HEAD@{3}'
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5347 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 22:32:44 +00:00
Dennis Schridde
9343c485b0
Revert "Some endianness swaping, as found in tags/2.1_beta3. Apparently was forgotten to port back..."
...
This reverts commit r5335.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5337 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-26 12:57:16 +00:00
Dennis Schridde
b524a3f8bd
Some endianness swaping, as found in tags/2.1_beta3. Apparently was forgotten to port back...
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5335 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-26 12:47:36 +00:00
Dennis Schridde
050ec39c11
Use the (also new in this commit) relative variants of the directories almost everywhere.
...
Exception is when generating the .wz files, where we need the path to the build directory and building a reverse relative path to $(srcdir) will be messy.
Also silence submake.mk a great deal.
Bug #11883 should be fixed now for the most part.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5325 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 23:41:52 +00:00
Dennis Schridde
fd2bfb0e0f
Prepare for another fix for parts of bug #11883 : Issues with the improved raw Makefiles
...
- Rename Makefile.raw to lowercase
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5321 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 22:48:45 +00:00
Dennis Schridde
73b35ab8d6
Rename top_srcdir/top_builddir to abs_top_srcdir/abs_top_builddir, to make this more obvious.
...
Their use is currently flawed, since it will not work in directories with spaces in them... (
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5319 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 20:19:54 +00:00
Dennis Schridde
9bd8b24921
Boost raw Makefiles
...
- Use PACKAGE, PACKAGE_VERSION, remove VERSION
- Allow out-of-source-dir builds (mkdir build && cd build && make -f ../Makefile.raw)
- Move config.mk from $(top_srcdir)/makerules/config.mk to $(top_builddir)/config.mk
When keeping current behaviour (srcdir=builddir), this means: Move it from makerules into the main directory
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5308 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-23 13:54:47 +00:00
Per Inge Mathisen
4c73e82896
Fix --selftest check in nettypes.c
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5273 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-19 16:44:38 +00:00
Per Inge Mathisen
94f523d9ef
Fix bug #11829 : When three players join mp dialog, one drops
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5258 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-16 19:39:42 +00:00
Giel van Schijndel
f9171b825f
Use sizeof instead of magic numbers
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5245 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-12 13:51:31 +00:00
Per Inge Mathisen
14460d938a
Make sure that packet size is turned into big endian before we send it.
...
This breaks network compatibility with everything older than this commit.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5234 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-08 14:22:44 +00:00
Per Inge Mathisen
a05859644a
Fix two mistakes in r5176 (static string cleanup) that made us copy far
...
less from two strings than we should.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5233 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-08 13:30:05 +00:00
Giel van Schijndel
855ec725d4
Use sstrcpy|sstrcat instead of strlcpy|strlcat for manipulation of statically sized strings
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5176 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 13:46:49 +00:00
Per Inge Mathisen
1819c503c6
Make difficulty work when you start the campaign with the --game parameter.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5076 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:50:10 +00:00
Dennis Schridde
c67a3ef1be
More comments on previous patch, which was by Buginator.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5051 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 19:53:27 +00:00
Dennis Schridde
25c53e1c48
commandline argument --join <host> to join into a lobby directly from the commandline ((needs ChangeLog addition!))
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5050 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 19:09:29 +00:00
Dennis Schridde
0e21488f74
Last commit to solve bug #11656 , fix by Paul Wise <pabs>.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4954 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-07 10:09:20 +00:00
Dennis Schridde
7655a44069
Fix issue where hosting a game and then exiting before it starts would not stop warzone from listening on its port.
...
Signed-off-by: Dennis Schridde <devurandom@gna.org>
- Also seems to fix other issues, like weird number of AIs after host-stophost-hostagain.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4953 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-07 10:06:49 +00:00
Giel van Schijndel
510b633251
* Utilise ARRAY_SIZE to determine the amount of elements in a statically sized array
...
* Use sizeof(*ptr) instead of sizeof(type) in malloc & memset calls
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4892 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 21:19:15 +00:00
Giel van Schijndel
61c8bbc4b9
* Don't "Guarantee nul-termination" after snprintf as snprintf does that itself already (per the C99 spec)
...
* Use strlcpy for copying strings instead of snprintf "%s"
* Don't cast the return value from vsnprintf to (void)
* When we use va_start make sure to use va_end as well...
* Fix indentation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4785 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 14:21:41 +00:00
Per Inge Mathisen
9da6c7eb96
Netplay bugfixes from Buginator, with changes by me.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4560 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-11 18:35:53 +00:00
Roman C
78f4b01231
Implemented 'Ready' button for the lobby. The game starts when all players have clicked on it.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4555 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-09 20:05:09 +00:00
Roman C
674db841fa
Fix a bug in whosResponsible() which caused execution of AI scripts on a client instead of the host in some cases.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4540 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-07 17:31:57 +00:00
Per Inge Mathisen
274ae7c9a4
Enforce strict function prototypes for autoconf builds, and fix function prototype problems.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4487 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 15:34:55 +00:00
Roman C
49903f9593
Get rid of unnecessary warnings when compiling release build using MSVC.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4462 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-01 15:56:39 +00:00
Per Inge Mathisen
3ee8a3ed7f
Add beginnings of a game self-test. Start with --selftest command line option.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4433 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-30 14:36:11 +00:00
Per Inge Mathisen
be566a7d6d
Add -Wcast-align and -Wmissing-declarations to autoconf debug builds, and fix warnings.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4403 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 23:28:44 +00:00
Per Inge Mathisen
3dd337b73f
Fix variable that might be read unset. Reported by Valgrind.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4318 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 19:24:07 +00:00
Dennis Schridde
1c4901ce29
GCC says: "suggest parentheses around assignment used as truth value"
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4313 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:58:26 +00:00
Dennis Schridde
10f2ccfd56
TRUE->true, FALSE->false (except in scripts)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4311 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:51:17 +00:00
Per Inge Mathisen
775637ef95
Fix some -Wextra warnings
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4307 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:02:11 +00:00
Giel van Schijndel
dcc1536f58
Backport r4221 from the 2.1 branch to trunk:
...
* Fix warning regarding array bounds
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4304 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 15:40:13 +00:00
Roman C
a1008c093d
Reduce amount of junk in the MSVC compilation output by about 70%.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4279 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 22:15:28 +00:00
Giel van Schijndel
7785437073
return the success/failure status from the NETenum template
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4244 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 14:00:30 +00:00
Giel van Schijndel
cf6ea01b4a
* In NETstring use memcpy to copy the string and guarantee NUL-termination manually
...
* strlcpy() is unsafe if we cannot trust the source string to be NUL-terminated (as strlcpy does "return strlen(src);")
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4242 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 13:50:54 +00:00
Giel van Schijndel
6cd8e03773
Document NETstring (Doxygen documentation) and use strlcpy instead of memcpy to guarantee NUL-termination
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4241 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 13:48:25 +00:00
Giel van Schijndel
fbf0395b7e
Also test NETenum in the nettypes unit test
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4240 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 13:35:01 +00:00
Giel van Schijndel
f26ccb421d
Wrap function-macro NETenum in a do{}while(0) loop
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4239 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 13:33:27 +00:00
Giel van Schijndel
6aa9b6fa35
* Declare static string constants as `static const char string[]` rather than `char* string` (guarantees both constness and that we won't accidentily change the pointer)
...
* In NETcoder declare string str the same size as original (using sizeof), use sizeof() instead of magic numbers
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4237 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 13:12:58 +00:00
Christian Ohm
3dbd10b277
Add newlines to two files to shut up gcc.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4109 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-16 14:23:44 +00:00