Author: muggenhor
Date: Tue Jul 8 13:51:50 2008
New Revision: 5420
URL: http://svn.gna.org/viewcvs/warzone?rev=5420&view=rev
Log:
Merged revisions r5313:5314 and r5403:5411 into the 2.1 branch via svnmerge
from trunk
........
r5313 | muggenhor | 2008-06-23 23:15:58 +0200 (ma, 23 jun 2008) | 3 lines
* Get rid of "delayed return" in vtolHappy; just return false as soon as
we've determined a VTOL isn't happy
* Use return (val == expected); instead of if (val == expected) return true;
else return false;
........
r5314 | muggenhor | 2008-06-23 23:16:23 +0200 (ma, 23 jun 2008) | 4 lines
* Add an ASSERT to trap a corner case which I don't think ever occurs.
The info from this ASSERT is needed for a proper (and fully educated) fix of
bug #11865. Thus please attach a backtrace to bug #11865 when this ASSERT gets
triggered, and if possible add which VTOL type you ordered to or from a
rearming pad at the time.
........
r5403 | muggenhor | 2008-07-07 11:38:55 +0200 (ma, 07 jul 2008) | 1 line
Proper constness: make vtolDroid and vtolHappy take their DROID* parameter as
const
........
r5404 | muggenhor | 2008-07-07 12:15:00 +0200 (ma, 07 jul 2008) | 2 lines
Rename function vtolDroid to isVtolDroid:
* This name more clearly describes what it does: determine whether the given
droid has VTOL propulsion
........
r5405 | muggenhor | 2008-07-07 14:21:26 +0200 (ma, 07 jul 2008) | 1 line
vtolHappy (what IDIOT wrote this btw??): only construct a bitmask once to
increase readability/maintainability
........
r5406 | muggenhor | 2008-07-07 14:31:06 +0200 (ma, 07 jul 2008) | 1 line
vtolHappy: move the body-health check outside of the weapon check
........
r5407 | muggenhor | 2008-07-07 14:44:00 +0200 (ma, 07 jul 2008) | 3 lines
Fix a bug introduced in r5406:
* VTOLs didn't ever become "happy" again (i.e. where marked as fully armed
and healed)
........
r5408 | muggenhor | 2008-07-07 14:47:04 +0200 (ma, 07 jul 2008) | 1 line
Improve readability/maintainability of function vtolHappy by using an array
of bools instead of abusing a bitmask
........
r5409 | muggenhor | 2008-07-07 14:51:57 +0200 (ma, 07 jul 2008) | 4 lines
Further cleanup/refactor vtolHappy:
* Trash the bool-array (previously bitmask) code
* Simply return false as soon as we've determined a VTOL isn't "happy" (i.e.
marked as fully armed and healed)
........
r5410 | muggenhor | 2008-07-07 14:58:18 +0200 (ma, 07 jul 2008) | 4 lines
Did I say vtolHappy was somewhat error prone?
* Fix a bug in r5409 where I accidentily reversed the weapon-reloaded logic
* Merge two nested if-statements
........
r5411 | muggenhor | 2008-07-07 15:11:27 +0200 (ma, 07 jul 2008) | 2 lines
* ASSERT that VTOL weapon droids have more than zero weapons
* Allow non-weapon VTOL droids to be passed into vtolHappy (e.g. sensor,
construction, etc.): this should fix bug #11865
........
Modified:
branches/2.1/ (props changed)
branches/2.1/src/action.c
branches/2.1/src/ai.c
branches/2.1/src/combat.c
branches/2.1/src/display.c
branches/2.1/src/display3d.c
branches/2.1/src/droid.c
branches/2.1/src/droid.h
branches/2.1/src/fpath.c
branches/2.1/src/geometry.c
branches/2.1/src/move.c
branches/2.1/src/multisync.c
branches/2.1/src/order.c
branches/2.1/src/projectile.c
branches/2.1/src/scriptfuncs.c
branches/2.1/src/structure.c
_______________________________________________
Warzone-commits mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-commits