Per Inge Mathisen
f1a62097bf
Netcode: Make NetDir static, and remove some unnecessary function parameters.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3798 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-16 13:39:23 +00:00
Per Inge Mathisen
c2de082bee
More doxygen comments.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3797 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-16 13:12:58 +00:00
Per Inge Mathisen
ce473ed9fe
Add some more doxygen comments.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3796 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-16 13:05:34 +00:00
Giel van Schijndel
33759c07c4
Don't use `strnlen` in debug.c as it's a GNU extension (and as such isn't always available), instead use `strnlen1 - 1`
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3795 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-16 11:53:25 +00:00
Giel van Schijndel
7acbd09ec0
Detect failure to load images when loading texture pages and act on it by failing the texpage loading
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3794 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-16 11:30:11 +00:00
Per Inge Mathisen
f98f19d38f
Doxygenize power.h
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3793 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 21:59:53 +00:00
Per Inge Mathisen
a07da6772c
Wrap several access to asPower with getPower().
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3792 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 21:48:51 +00:00
Per Inge Mathisen
f2098a60ee
Stylistic improvements to some functions in droid.c
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3791 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 21:43:51 +00:00
Per Inge Mathisen
aa12b3b9e8
Add several sanity checks for network packets received.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3790 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 21:31:23 +00:00
Per Inge Mathisen
4c64fcfe8e
Sanity check power sync packets, and add net log if power is changed. Add getPower()
...
function to avoid direct access to asPower array.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3789 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 21:18:13 +00:00
Roman C
00fa218b5d
Get rid of the ugly-looking ammo trails some weapon types had, that were not there in the original game and don't belong there.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3788 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 21:04:46 +00:00
Per Inge Mathisen
c614aabe31
Reorganize the packet definitions to avoid duplication and scatter of data.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3787 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 20:55:38 +00:00
Per Inge Mathisen
f3fd0e6fe4
Fix bug in the sending of research gifts. We cannot delay the NETend() call for long,
...
because other codes like to use the netcode, too.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3786 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 20:25:31 +00:00
Giel van Schijndel
22844d16a6
Undo the (accidental) exceptionhandler disabling of r3784
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3785 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 19:44:40 +00:00
Giel van Schijndel
2322fe0920
Undo my "fix" in r3782, as it wasn't a fix but a breakage
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3784 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 19:43:53 +00:00
Giel van Schijndel
e2e3044f48
* ASSERT(asPower != NULL) since that'll show some output in the debugging output, even in case of a release build
...
* Add the player id to assertion messages where the player id is out of range
* Fix an assert that had all the conditions inversed
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3783 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 19:13:00 +00:00
Per Inge Mathisen
c561c73cd8
Relax droid assert about being on the map. Patch by Buginator in bug #958 .
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3782 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 18:49:43 +00:00
Per Inge Mathisen
b92c8c5a33
Dumpt the last two log message calls into the exception handler report.
...
This way we get to see the message given by asserts in the dump file.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3781 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-14 22:07:53 +00:00
Roman C
cc6e90ce0d
Weapon balance:
...
-light flamers are now allowed to shoot while moving
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3780 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-14 21:40:44 +00:00
Roman C
1030962761
Stock AI Update:
...
-fixed a bug which prevented AI from building more than 2 different cyborg types
-added more different templates (flamers, hpv etc)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3779 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-14 21:39:27 +00:00
Per Inge Mathisen
79d13e4d14
Fix typo in exceptionhandler giving noise (at best) in exception output.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3778 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-14 20:50:39 +00:00
Per Inge Mathisen
e239f8ca40
Cleanup of message code again. Sprinkle more asserts, doxygenize header.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3777 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-14 19:25:31 +00:00
Per Inge Mathisen
1e1ae6ac0f
Sprinkle several asserts over power.c to attempt to catch memory problems.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3776 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-14 18:26:18 +00:00
Per Inge Mathisen
b02de0a9b4
Fix bad asserts added to debug another assert failure...
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3775 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-13 20:31:38 +00:00
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
Roman C
d7c09c4878
Prevent stock AI attack units from idling in the base, make it use them more aggressively.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3773 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-13 19:31:23 +00:00
Roman C
0aac170265
Removed some unused cyborg templates, this also fixed a bug which prevented skirmish AI from building cyborg flamer, heavy gunners and lancer cyborgs.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3772 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-13 19:29:37 +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
Giel van Schijndel
7132f86193
Check (yet some) more correctly for skirmish games
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3770 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-12 20:48:13 +00:00
Giel van Schijndel
54aad3026a
Check more correctly for skirmish games
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3769 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-12 19:40:27 +00:00
Per Inge Mathisen
b306f93fb6
Remove old force editor defines
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3768 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-12 19:32:13 +00:00
Giel van Schijndel
986d1dff97
When selecting a droid (in debug mode) don't display the order and action numbers, instead display their textual representation; part of patch #977 by Buginator, slightly changed by me (wrapped the string-arrays in functions)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3767 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-12 19:16:46 +00:00
Per Inge Mathisen
683d9deb2e
Replace check_extension with one that does not anger valgrind.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3766 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-12 18:57:20 +00:00
Giel van Schijndel
21927c7e74
Add a hack to allow receiving and processing of MSG_PLAYER_STATS in the right place
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3765 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-12 18:56:58 +00:00
Giel van Schijndel
6de67c3fc7
Allow joining of the same amount of players a map is intended for (rather than one less); patch #976 by Buginator, slightly trimmed by me
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3764 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-12 18:14:18 +00:00
Per Inge Mathisen
4c3a85762b
Cosmetic cleanup of power code
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3763 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-12 17:56:43 +00:00
Giel van Schijndel
84a36281a5
When retrieving games from the lobby abort on failure to prevent an infinite loop
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3762 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 21:20:25 +00:00
Per Inge Mathisen
49f2292bf8
Clean up the place beacon code a little.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3761 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 21:01:47 +00:00
Per Inge Mathisen
54dc6ee955
Clean up message code. Remove dead code, improve style, and improve error messages and asserts.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3760 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 20:47:56 +00:00
Giel van Schijndel
81fe501660
Bail out when we fail to receive the game count in the lobby code
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3759 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 19:51:24 +00:00
Per Inge Mathisen
ffc6d739a1
Improve some net debug log calls.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3758 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 19:26:23 +00:00
Per Inge Mathisen
29153d8fe4
Do not use two separate packet globals. Fixes problems with corrupted network data.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3757 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 19:22:42 +00:00
Giel van Schijndel
7493e9ea3f
Replace some magic numbers with HOST_DPID; patch by Buginator
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3756 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 18:25:35 +00:00
Per Inge Mathisen
d484e2bc98
Fix infinite loop when joining a game. An encode was supposed to be a decode.
...
Also remove some excess logging calls.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3755 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 17:19:12 +00:00
Per Inge Mathisen
eead0d470a
Clean out some old unused stuff from multiplay.h
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3754 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 16:36:18 +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
538765c59e
Cleanup beacon code. Remove unused code, move variables into smallest scope,
...
and fix crash if you place a beacon in the radar outside the map view.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3751 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 13:59:10 +00:00
Per Inge Mathisen
4cff4f49fe
Dump some dead code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3750 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 11:47:07 +00:00
Per Inge Mathisen
eda4c3a0f8
Try to fix bug #10956 by making sure the tab fields are initialized, and
...
add several new asserts to help track down the bug if this does not help.
Please post a new backtrace if this bug happens again.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3749 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 11:28:45 +00:00