[CF-Devel] RE: [Crossfire-cvs] CVS commit: crossfire/server
Tim Rightnour
root at garbled.net
Fri Dec 14 09:49:51 CST 2001
On 14-Dec-01
crossfire-cvs-admin at lists.sourceforge.net
wrote:
>
Basic code clean, using switch instead of repeated else if's
>
Hashed some code which was nop (didn't seem to do anything)
>
changed over to using ATNR_SLOW etc, instead of AT_SLOW.
>
>
Has been tested, all those interested in attack.c please read through this
>
code
>
again and make sure everything is in order. Mail problems to
>
njh at hawthorn.csse.monash.edu.au
!
Ok.. I haven't had time to read most of this yet.. but one thing did catch my
eye here:
/* AT_INTERNAL is supposed to do exactly dam. Put a case here so
- * people can't mess with that or it otherwise get confused.
- */
- if (attacktype & AT_INTERNAL) return dam;
-
+ * people can't mess with that or it otherwise get confused. */
+ if (attacknum == ATNR_INTERNAL) return dam;
+
Now.. I semm to remember from the style guide that we weren't supposed to do
this to comments.. weren't we? And that & vs == modifies the intent of that
function IIRC.
I'm about to leave for work.. so I won't have time to really read it and
analize it.. but I hope someone else can.
Ok.. also this:
- if (op->resist[attacknum] || 1) {
+ if(1) { // if (op->resist[attacknum] || 1) { // This is a nop!
no // comments. aigh.. this is C, not C++.
---
Tim Rightnour <
root at garbled.net
>
NetBSD: Free multi-architecture OS
http://www.netbsd.org/
NetBSD supported hardware database:
http://mail-index.netbsd.org/cgi-bin/hw.cgi
More information about the crossfire
mailing list