cleanup
- fix possible crash in conc (but it's still an ugly hack) - fix noob usage of strcmp - flag some memory leaks (it would be nice, if the author(s) would clean up the mess himself) - fix crash in substr - whitespace cleanup there are plenty more memory leaks in command.cpp - for example, every goto in cubescript does not clean up anything
This commit is contained in:
+4
-4
@@ -387,15 +387,15 @@ public:
|
||||
case 3: ad = (int) (4.0f/25.0f * armour) + 25; break; // 41
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
||||
//ra - reduced armor
|
||||
//rd - reduced damage
|
||||
int ra = (int) (ad * damage/100.0f);
|
||||
int rd = ra-(ra*(gi.piercing/100.0f)); //Who cares about rounding errors anyways?
|
||||
|
||||
|
||||
armour -= ra;
|
||||
damage -= rd;
|
||||
|
||||
|
||||
health -= damage;
|
||||
return damage;
|
||||
}
|
||||
@@ -672,4 +672,4 @@ struct package
|
||||
|
||||
package() : name(NULL), type(-1), number(0), pending(false), source(NULL), curl(NULL) {}
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user