On 1/28/07, Giel van Schijndel <[EMAIL PROTECTED]> wrote:

I'm assuming all changes to projectile.c only are change 8? Because I
see no mention of the removal of extendRad and it being replaced by iRad
(I find both of these names rather non-descriptive btw).

So a question, what is extendRad's purpose in the first place, and why
did you remove it?

Then as for the changes to establishTargetHeight. Changing the
initialization of height to =0, and as such making the switch return 0
upon reaching the default case seems logically, although it is hard to
read from the code that height is in fact the return value. So instead
of breaking from all of the switch's cases it might be better to return
from then with height's value, and if it's a constant use that constant
rather than assigning it to a variable and returning the variable. (e.g.
`default: return 0;').

Plus one very strange thing I've noticed there.
In `case OBJ_DROID:'  -> `switch (psDroid->droidType)'. It seems that
within that switch statement the total target height gets increased by
the weapon or utility's height. The way how this is done however is hard
to read (the original code comes from your projectile fix 7 I believe
btw), since it first adds the highest point then substracts the lowest.
Something like this would probably be much easier to understand:
> utilityHeight = ymax - ymin;
> height += subHeight;

or:
> height += ymax - ymin;
Which would be a little less easier to understand because of the length
of the ymax and ymin parts. So using a temporary as above would be my
way. This will optimized away by the compiler anyway.

This would probably have prevented the error your fixing here from
occurring in the first place (since it would have been more obvious that
it's there).

PS I'm just trying to explain my point of view on this, not trying to
attack your person.

--
Giel

extendRad is the extendRad travel distance of a projectile,actually the iRad
was there in projectile.c for ages,imo it stands for integer radius or
integer distance.It's removed because it causes a miss problem for indirect
weapons.

feel free to fix/tweak the establishTargetHeight,since it's merely a rip of
establishTargetRadius.

ymax+ymin is not really the thing the patch tried to fix,the sum
of ymax/ymin was a bit too high for z hitbox radius,so I changed it to
ymax-ymin.What the patch fixes is the imd shape to use when accquiring ymax
and ymin values for structure.(changed to pIMD from displayImd)
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to