You can always do the cheap rectangular hit box check first, and then only
do the radius check if that indicates a possible hit - should be fairly
cheap since most objects are going to be clear misses (until you start
lobbing nukes from your 3 turret mega-units). Basic clipping-style tests.
(And of course you compare squares of the distance, rather than bothering
to
squareroot each side of the equation)
--
- Gus
yea that is what wz projectiles use to test hits,I just changed the
'constant' tile/4 radius to imd (xmax + ymax)/2 and added zdiff check to fix
ground to ground weapon projectiles hitting air units bug with the new 'hit'
system.(the old 'hit' system is similar to warcraft III's or generals's(all
homing except few large ballistic weapon),the new 'hit' system is similar to
total annihilation's(all 'real' except homing ones))
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev