Commit Graph

86 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
Per Inge Mathisen eb3ac2e356 Fix bug #11911: two patrol buttons. Patrol now has a new icon, drawn by
elio. Circle now has correct tooltip and uses old patrol icon. Some
spelling issues also fixed.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5565 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-16 12:06:26 +00:00
Per Inge Mathisen ef7a4044e9 Fix bug that made droids seemingly explode randomly during the game. The cause
was that they would pursue the enemy on another person's computer, but not on
yours. Now your droids only decide to pursue on your computer, and sends updates
to other people about such decisions over the network. WARNING: Increases network
usage by unknown amount. Network sync rates could be lowered.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5507 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 17:57:25 +00:00
Per Inge Mathisen 9e57d0b4ce Cosmetic improvement
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5489 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 09:42:00 +00:00
Giel van Schijndel 66bfab9dcf Prefix all propulsion types (from enum PROPULSION_TYPE) with `PROPULSION_TYPE_` to qualify these names more fully
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5474 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 17:59:35 +00:00
Giel van Schijndel e8c9f8a0ec Rename function vtolDroid to isVtolDroid:
* This name more clearly describes what it does: determine whether the given droid has VTOL propulsion

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5404 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 10:15:00 +00:00
Dennis Schridde d3ad12ff6f Cleanup visibleObject & Co, and use new data ptr to transfer data to callback.
Still has a little global hole in it to transfer wall-locations out of the callback without cluttering the helper struct or the visibleObject() API.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5272 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-18 22:23:47 +00:00
Dennis Schridde 0d61fb663f Use direct initialisation, since this is easier here.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5151 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-23 11:03:03 +00:00
Dennis Schridde fd577efb39 Move penetration code fragments from SendProjectile to Inflight*Func
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5110 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 17:24:51 +00:00
Dennis Schridde 202ebc32fb Step one towards vector based projectiles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5106 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 23:32:07 +00:00
Per Inge Mathisen 22d10c80aa Allow VTOL to uncover fog of war and land-move to unseen areas in distance fog mode.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5048 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 15:20:34 +00:00
Per Inge Mathisen ce1ebb31cb Remove some dead code, and cosmetic cleanup.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5046 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 13:45:37 +00:00
Per Inge Mathisen 1fc9453cf5 Cosmetic cleanup to order.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5045 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 12:42:42 +00:00
Per Inge Mathisen f3a5558e21 Pass propulsion type as a parameter to raycasting, path-finding and tile
blocking functions so that we do not have to set global state to know 
which kind of propulsion we are testing. This change is experimental, 
and may break VTOL behaviour subtly, please do not backport.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4960 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-07 16:37:46 +00:00
Roman C 307694d9d0 Holding down SHIFT while giving unit an order doesn't queue a waypoint anymore (holding down CTRL still does this), instead it gives a unit a scout command instead of a move command. This will make a unit stop when it encounters an enemy on its way to the destination.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4770 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-25 19:11:51 +00:00
Giel van Schijndel 21b3597284 * Formations work purely, and only with DROIDs, so rather than casting back and forth to BASE_OBJECT* pointers, just stick to using DROID* pointers only
* Huge simplification due to not needing to handle other derivatives of BASE_OBJECT than DROID anymore (also a huge reduction in the amount of casting)
 * Don't check whether a DROID has -> type == OBJ_DROID anymore (fpath.c left-over)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4652 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-16 00:01:41 +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
Giel van Schijndel 7fa6ce0c65 Restructure function visGetBlockingWall:
* return a pointer instead of a BOOL (will be a NULL pointer on failure)
 * don't `goto` the end of the function when we've found a blocking wall, just return the pointer instead


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4569 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-12 13:26:08 +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
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
Roman C 81de4a1622 Fix a commander-related crash.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4155 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-19 15:58:36 +00:00
Freddie Witherden c473294251 Cleanup the buildModule function in droid.c. There should be no functional changes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4078 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-15 18:27:59 +00:00
Giel van Schijndel fde3dff8ff Modify function `orderStateObj`:
* return a pointer instead of writing it to an output parameter
 * return NULL on failure instead of FALSE (and as such the above pointer on success)

This removes some type-punning warnings


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4009 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-11 14:44:03 +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
Giel van Schijndel b3a3cecaed Rename fractions.h to math-help.h and remove most junk from it
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3584 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:01:37 +00:00
Per Inge Mathisen aba1b1fa04 Fix crash when we used a dead target for fire support. Bug reported by SmokyTGA1.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3475 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-14 22:08:40 +00:00
Giel van Schijndel 96e737fb03 - Bring command.bjo to tagged format (and rename it to firesupport.tag).
- Use new NULL_ID instead of UDWORD_MAX to indicate invalid ids.
- Fix if-complication


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3323 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-03 00:30:51 +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
Per Inge Mathisen 8d875c28ab Workaround for bug #10602. When AI sends a group order for VTOLs, sometimes a
dead droid is references as a target. We check the order for a dead target,
and ignore it. Should fix properly later.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3231 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-29 23:07:13 +00:00
Per Inge Mathisen 3550e701f6 Fix indentation and remove some dead code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3228 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-29 19:39:31 +00:00
Per Inge Mathisen 393dc79a05 Fix crash when combat units are assigned to commanders. See bug #10536.
Patch #891 by Thomas Frauendorfer <caotic>.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3113 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-21 18:28:46 +00:00
Per Inge Mathisen 53aa930d6e Turn IMD min and max dimensions into vectors.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3111 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-21 17:34:23 +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 2431ee7165 Remove dead code and improve indentation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2813 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-12 21:31:14 +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 8f9d1b640b We do not give droids orders to attack multiple targets with multiple weapons, so there
is no need to store multiple targets in order code. Reverting this addition.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2795 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 16:52:50 +00:00
Per Inge Mathisen 8b14087c3a Remove multiweapon orders. Multiple weapons do not need separate orders.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2782 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 17:31:37 +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
Per Inge Mathisen a189581a0c Fix crash where rearming VTOL would try to set a dead target.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2651 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-27 23:45:13 +00:00
Giel van Schijndel 75f820d1b1 * Replace the last of "<< TILE_SHIFT" and ">> TILE_SHIFT" usage with world_coord and map_coord respectively
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2490 4a71c877-e1ca-e34f-864e-861f7616d084
2007-09-28 19:25:21 +00:00
Roman C e80301537f Allow scripts to set DORDER_DROIDREPAIR order to make repair droids repair some droid.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2440 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-26 11:53:20 +00:00
Per Inge Mathisen 8d0c71e472 Fix bug where we would oppose the worth of attacking a target with the worth of
attacking ourselves, since when auto-repair is researched, we will have ourselves
as a repair target. The result was that droids on guard or idle would not attack
at all. This fixes bug #9665. Also remove unused function orderGroupHealthCheck().


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2369 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-11 21:18:38 +00:00
Per Inge Mathisen 4e86088118 Remove a ton of unused movement code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2087 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 11:25:08 +00:00
Giel van Schijndel 6e23e99afc * #include "lib/sound/audio.h" in the implementation files that need it rather than in a header file which doesn't use it at all
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2077 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 22:14:47 +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 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 b620f3f25f Remove all mention of non-existent type iVector
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1664 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 14:18:14 +00:00