[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src missile/missile.c unit/ccl_unitty...
From: |
Jimmy Salmon |
Subject: |
[Stratagus-CVS] stratagus/src missile/missile.c unit/ccl_unitty... |
Date: |
Thu, 09 Oct 2003 16:04:31 -0400 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Jimmy Salmon <address@hidden> 03/10/09 16:04:30
Modified files:
src/missile : missile.c
src/unit : ccl_unittype.c unittype.c
Log message:
Cleanup
Patches:
Index: stratagus/src/missile/missile.c
diff -u stratagus/src/missile/missile.c:1.86
stratagus/src/missile/missile.c:1.87
--- stratagus/src/missile/missile.c:1.86 Thu Oct 9 13:59:29 2003
+++ stratagus/src/missile/missile.c Thu Oct 9 16:04:29 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: missile.c,v 1.86 2003/10/09 17:59:29 n0body Exp $
+// $Id: missile.c,v 1.87 2003/10/09 20:04:29 jsalmon3 Exp $
//@{
@@ -466,13 +466,13 @@
damage -= SyncRand() % ((damage + 2) / 2);
}
#else
- damage = max(basic_damage-goal_stats->Armor,1)+piercing_damage;
- damage -= SyncRand() % ((damage+2)/2);
- DebugCheck(damage<0);
+ damage = max(basic_damage - goal_stats->Armor, 1) + piercing_damage;
+ damage -= SyncRand() % ((damage + 2) / 2);
+ DebugCheck(damage < 0);
#endif
DebugLevel3Fn("\nDamage done [%d] %d %d ->%d\n" _C_ goal_stats->Armor _C_
- basic_damage _C_ piercing_damage _C_ damage);
+ basic_damage _C_ piercing_damage _C_ damage);
return damage;
}
@@ -1708,7 +1708,7 @@
int i;
CLprintf(file,"\n;;; -----------------------------------------\n");
- CLprintf(file,";;; MODULE: missile-types $Id: missile.c,v 1.86 2003/10/09
17:59:29 n0body Exp $\n\n");
+ CLprintf(file,";;; MODULE: missile-types $Id: missile.c,v 1.87 2003/10/09
20:04:29 jsalmon3 Exp $\n\n");
//
// Original number to internal missile-type name.
@@ -1803,7 +1803,7 @@
Missile* const* missiles;
CLprintf(file,"\n;;; -----------------------------------------\n");
- CLprintf(file,";;; MODULE: missiles $Id: missile.c,v 1.86 2003/10/09
17:59:29 n0body Exp $\n\n");
+ CLprintf(file,";;; MODULE: missiles $Id: missile.c,v 1.87 2003/10/09
20:04:29 jsalmon3 Exp $\n\n");
for (missiles = GlobalMissiles; *missiles; ++missiles) {
SaveMissile(*missiles, file);
Index: stratagus/src/unit/ccl_unittype.c
diff -u stratagus/src/unit/ccl_unittype.c:1.94
stratagus/src/unit/ccl_unittype.c:1.95
--- stratagus/src/unit/ccl_unittype.c:1.94 Thu Oct 9 07:31:47 2003
+++ stratagus/src/unit/ccl_unittype.c Thu Oct 9 16:04:30 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_unittype.c,v 1.94 2003/10/09 11:31:47 n0body Exp $
+// $Id: ccl_unittype.c,v 1.95 2003/10/09 20:04:30 jsalmon3 Exp $
//@{
@@ -519,12 +519,12 @@
}
sublist = gh_car(list);
list = gh_cdr(list);
- type->Magic=0;
+ type->Magic = 0;
while (!gh_null_p(sublist)) {
DebugLevel3Fn("%d \n" _C_ CclGetSpellByIdent(gh_car(sublist)));
type->CanCastSpell[CclGetSpellByIdent(gh_car(sublist))] = 1;
sublist = gh_cdr(sublist);
- type->Magic=1;
+ type->Magic = 1;
}
} else if (gh_eq_p(value, gh_symbol2scm("organic"))) {
type->Organic = 1;
Index: stratagus/src/unit/unittype.c
diff -u stratagus/src/unit/unittype.c:1.109 stratagus/src/unit/unittype.c:1.110
--- stratagus/src/unit/unittype.c:1.109 Thu Oct 9 07:31:48 2003
+++ stratagus/src/unit/unittype.c Thu Oct 9 16:04:30 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unittype.c,v 1.109 2003/10/09 11:31:48 n0body Exp $
+// $Id: unittype.c,v 1.110 2003/10/09 20:04:30 jsalmon3 Exp $
//@{
@@ -381,10 +381,12 @@
v = Fetch8(udta);
unittype->_PiercingDamage = v;
}
- /*
- * This is not used in stratagus. so it was simply removed.
- * We use our own upgrade methods that are a lot more flexible.
- * Maybe we could use this one day, not sure.
+ //
+ // This is not used in stratagus. so it was simply removed.
+ // We use our own upgrade methods that are a lot more flexible.
+ // Maybe we could use this one day, not sure.
+ //
+#if 0
for (i = 0; i < 110; ++i) { // Weapons upgradable
unittype = UnitTypeByWcNum(i);
v = Fetch8(udta);
@@ -394,7 +396,15 @@
unittype = UnitTypeByWcNum(i);
v = Fetch8(udta);
unittype->ArmorUpgradable = v;
- }*/
+ }
+#else
+ for (i = 0; i < 110; ++i) { // Skip weapons upgradable
+ Fetch8(udta);
+ }
+ for (i = 0; i < 110; ++i) { // Skip armor upgradable
+ Fetch8(udta);
+ }
+#endif
for (i = 0; i < 110; ++i) { // Missile Weapon
unittype = UnitTypeByWcNum(i);
v = Fetch8(udta);
@@ -1136,7 +1146,7 @@
char** sp;
CLprintf(file, "\n;;; -----------------------------------------\n");
- CLprintf(file, ";;; MODULE: unittypes $Id: unittype.c,v 1.109 2003/10/09
11:31:48 n0body Exp $\n\n");
+ CLprintf(file, ";;; MODULE: unittypes $Id: unittype.c,v 1.110 2003/10/09
20:04:30 jsalmon3 Exp $\n\n");
// Original number to internal unit-type name.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus/src missile/missile.c unit/ccl_unitty...,
Jimmy Salmon <=