The Watermelon schreef:
> On 1/23/07, *Per Inge Mathisen* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>> The patch sounds awesome!
>>
>> On 1/22/07, The Watermelon <[EMAIL PROTECTED]
>> <mailto:[EMAIL PROTECTED]>> wrote:
>>> Changes:(wz28b.patch)
>>> 4.Fixed a bug which prevents the droids from removing 'died' targets
>>> for auxiliary weapons.
>>> 5.Fixed some net message size count problems with vtol I made when
>>> adding multiple weapons to vtol
>>> 6.Changed sinf/cosf to trig sin/cos lookup access functions trigSin
>>> and trigCos for better performance
>>> 7.Changed vectorToAngle in move.c a bit to improve its
>>> efficiency('+= 360/4' is weird and 'somevalue/180/2' is pointless
>>> too imo...)
>>> 8.Changed establishTargetHeight in projectile.c to use pIMD rather
>>> than displayImd for structures to fix some weird height
>>> problems(hopefully)
>> Surely these can be split out into separate patches? It is amazing how
>> many hours of bughunting you can save with a properly annotated change
>> history in the repository. We are not asking for small patches just to
>> save time right now, but mostly to save time in the future when
>> someone desperately needs to figure out why line 543 of
>> src/obscurity.c was changed to do something really odd. That does
>> happen every so often.
>>
>> So please try to separate out as many of the smaller changes as
>> possible, and _especially_ bugfixes.
> separated 4,5,7,8 from the 500KB patch,6 is not a bugfix and
> it involved many files,so I didnt separate it from the big one.
I assume ai.c's changes belong to 4?

Anyway, on line 74-86 of your patch you modify the droid's target update
code to make sure all targets are updated.

I'm just wondering as to why you wrap it in an if-statement (not the
existing one, but the one you've created). Since even if
`psDroid->numWeaps =< 1' (the else condition), the for loop would still
do exactly the same as your one-time function call. And yes I know this
piece of code probably saves us some CPU instructions, about 4 or so.

This however isn't good enough a reason for making the code that much
harder to read, that simple 3-line for-loop iteration is better to read
and will most certainly have no exponential performance hit, nor linear,
only static (which is negligible).

Well, since that's all my comments on that part of the patch (i.e.
change 4), I've committed it without the if-wrap around the
for-iteration in r683.

-- 
Giel

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to