Commit Graph

66 Commits (34e4246bd4936ffc04bd1975670093e1c9aefd37)

Author SHA1 Message Date
Buginator 807549b8e2 Fixes bug #12116
Cyborg transports now can load/unload correctly.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5838 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-18 03:28:03 +00:00
Roman C 24e128b5dc - units get effectiveness boost (equal to the promotion to the next rank) just by being assigned to a commander
- commander-related cleanups

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4630 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 15:15:19 +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 6db69592ed Fix illegal order check to correctly process UNKNOWN orders.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4324 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 21:35:04 +00:00
Per Inge Mathisen d7136d8290 Reject droid move packets containing illegal movement coordinates.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4321 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 20:55:23 +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 95bd262c7a Fix overzealous order sanity test.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4291 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 12:03:43 +00:00
Per Inge Mathisen a8145dd7d6 Add assert to catch sending of bad group orders.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4290 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 10:29:30 +00:00
Per Inge Mathisen bed974ab67 Make sure we do not act on bad orders received over the network. Should workaround
bug #11358: another crash in multiplayer, reported by Paul Wise (pabs). There is still
probably a problem in the code, which sends out bad orders.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4257 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 16:57:49 +00:00
Dennis Schridde cd14124c47 Fix a few strict-aliasing warnings and 2 types NETenum warnings (in multibot)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3993 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-10 13:31:08 +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
Per Inge Mathisen 8a38943349 Remove the code to send and receive whole droids if they are missing. Since we
are now using TCP, we should not be missing any droids. See patch #927 for
discussion.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3745 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 21:01:57 +00:00
Per Inge Mathisen a1879f5818 Add new function droidOnMap() which checks if a droid is on the map, but also
takes into account the possibility of being off-world, in a transport, or being
a transport. This should close patch #958.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3709 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-07 13:22:28 +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 57b35e9eac * Rework the receiving and processing of GroupOrders
* Don't terminate processing of droid orders as soon as we found a single droid we don't have yet (and need to request from another player/host)
  * First retrieve all droid IDs (in a stack allocated array: alloca)
  * Only __then__ process these IDs;
   * When we encounter a droid ID for which we don't have the droid, request it to be sent and __continue__ processing the next droids

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3262 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 23:54:47 +00:00
Per Inge Mathisen 4c239b47ac Fix crash caused by not checking return value from IdToDroid.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3257 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 21:33:08 +00:00
Giel van Schijndel 2f50ee2495 * Fix a bug introduced in r3238 as a result of an incomplete conversion of the send/recv-DroidInfo functions
* Make sure to now also handle "special" droid orders (whatever a "special" order may be...)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3253 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 19:56:34 +00:00
Giel van Schijndel 927aa2c39d * Don't send packets when we're not in multiplayer mode (!bMultiPlayer)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3245 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 18:05:27 +00:00
Giel van Schijndel b5e426a66b * Move the send/recv-RequestDroid functions over to the new net primitives API (patch #905 by myself)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3244 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 17:14:52 +00:00
Giel van Schijndel 05d14b995a * Move the send/recv-HappyVtol functions over to the new net primitives API (patch #905 by myself)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3243 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 17:13:23 +00:00
Giel van Schijndel 6d19aa6473 * Move the send/recv-GroupOrder functions over to the new net primitives API (patch #905 by myself)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3242 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 17:11:39 +00:00
Giel van Schijndel 352246e652 * Move the send/recv-DroidSecondaryAll functions over to the new net primitives API (patch #905 by myself)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3241 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 17:10:01 +00:00
Giel van Schijndel 204611ba6b * Move the send/recv-DroidSecondary functions over to the new net primitives API (patch #905 by myself)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3240 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 17:08:13 +00:00
Giel van Schijndel 8e1536d867 * Move the send/recv-DroidMove functions over to the new net primitives API (patch #905 by myself)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3239 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 17:07:11 +00:00
Giel van Schijndel ed2ac88c21 * Move the send/recv-DroidInfo functions over to the new net primitives API (patch #905 by myself)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3238 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 17:05:15 +00:00
Giel van Schijndel 498b6c4660 * Move the send/recv-DroidEmbark functions over to the new net primitives API (patch #905 by myself)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3237 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 17:02:53 +00:00
Giel van Schijndel 28f5f74aba * Move the send/recv-DroidDisEmbark functions over to the new net primitives API (patch #905 by myself)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3236 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 17:01:17 +00:00
Giel van Schijndel 7a0be7c719 * Move the send/recv-Droid functions over to the new net primitives API (patch #905 by myself)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3235 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 16:59:20 +00:00
Giel van Schijndel 66e3517354 * Move the send/recv-DestroyDroid functions over to the new net primitives API (patch #905 by myself)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3234 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 16:57:14 +00:00
Giel van Schijndel 7f528c37d0 * Remove empty lines (to reduce diff size)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3174 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-25 13:00:09 +00:00
Freddie Witherden c4fe7ad919 Update BASE_OBJECT and friends to use Vector3i.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3065 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-15 15:39:29 +00:00
Per Inge Mathisen c3f5cd3183 Only psDroid->psActionTarget is actually used for multiweapon targetting.
psDroid->psTarget is only used for orders, where multiweapon has no meaning.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2797 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 17:20:25 +00:00
Per Inge Mathisen caa5e02217 A droid never has more than one target stats type, so revert the addition of
multiple target stats for droids from r857.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2780 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 15:26:10 +00:00
Giel van Schijndel bd37e62cb2 * Replace a lot of strncat(dst, src, sizeof(dst) - strlen(dst) - 1) calls with the less bloated strlcat(dst, src, sizeof(dst)) form
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2637 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-27 15:47:17 +00:00
Dennis Schridde dba5fa6408 More formating and structural parts from Freddie's netprimitives14.patch
- Addition by me: Add NET_ORDER_SUBTYPE enum, which stores the targettype of movement orders and turn associated checks into switches for safety. (Original code had hardcoded numbers and if chains.)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2464 4a71c877-e1ca-e34f-864e-861f7616d084
2007-09-22 01:15:40 +00:00
Per Inge Mathisen 59768447c6 Remove some overzealous asserts
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2163 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-23 10:47:26 +00:00
Per Inge Mathisen 451c5fdd8b Fix network bug that would send truncated float on the network, because
the network expected uint16. Introduced in r1524.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2114 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 15:52:44 +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 851cd03367 Remove unused packet vtolrearm
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2107 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 13:08:59 +00:00
Per Inge Mathisen 2e99433ad0 Rename a few files for consistent naming. base.h -> basedef.h.
bulletdef.h -> projectiledef.h. weapons.h -> weapondef.h.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2063 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-12 19:56:16 +00:00
Per Inge Mathisen b69de06264 Rename PROJ_OBJECT -> PROJECTILE and OBJ_BULLET -> OBJ_PROJECTILE for consistency
with other objects. To quickly adapt your patches and avoid conflict noise, run this 
on the revision prior to this one:

  sed -i s/OBJ_BULLET/OBJ_PROJECTILE/g src/*.c src/*.h src/*.l src/*.y
  sed -i s/PROJ_OBJECT/PROJECTILE/g src/*.c src/*.h src/*.l src/*.y


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2061 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-12 19:32:26 +00:00
Per Inge Mathisen cd8cf1090b Implement the bulk API changes required for reference counting. Also fix some
missing checks for dead targets. Patch by me and Watermelon.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1995 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-01 12:27:25 +00:00
Per Inge Mathisen a4bf9eea4e Remove unused network code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1987 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-27 18:40:41 +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
Per Inge Mathisen 0fedc728ce The receiveWholeDroid net packet function added object ID into a psDroid->psTarget[i]
pointer field. This would not only not work if the two players with different pointer 
bit length were communicating, it would also crash if psDroid->psTarget[i] was not 
overwritten before use. Fixed!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1938 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-23 13:14:33 +00:00
Per Inge Mathisen bfc1e200f4 Add assert to see if some code is actually in use or not...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1933 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-23 11:34:04 +00:00
Per Inge Mathisen 5aa373e5b2 Misc cleanup forward ported from reference counting work. Adds new checking
macro CHECK_STRUCTURE().


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1912 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-21 17:43:50 +00:00
Giel van Schijndel 2d85204f13 Cleanup:
* remove commented out functions (which where only used by commented out code if they where used at all, removed that code as well)
 * movement stuff:
  - moveShuffleInit (// Initialize a droid for a shuffle move)
  - moveCalcVector (// Calculate the normalised vector between a droid and a point)
 * waypoint stuff:
  - orderAddWayPoint (// Append a new waypoint to a droid's list)
  - orderSelectedWaypoint (// Add a new waypoint to selected droid set)
  - SendSingleDroidWaypoint (// Occasionally need to send non selected waypoints ??)
  - recvDroidWayPoint (// recv)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1738 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 09:50:45 +00:00
Per Inge Mathisen fc3d29124d Weed out some deadwood from the multiplayer code, and fix a warning.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1653 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-17 14:00:15 +00:00
Dennis Schridde 5bd6e84852 - Change droid->direction to float, this should fix issues with vtols entering a loop around the target
- Make trigonometry tables static and remove usage of FRACT macros (trig.c)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1542 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-27 10:21:17 +00:00