Cleanup
This commit is contained in:
parent
cfcac2f121
commit
55e5fefd48
3 changed files with 21 additions and 11 deletions
src
|
@ -466,13 +466,13 @@ local int CalculateDamageStats(const UnitStats* attacker_stats,
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -519,12 +519,12 @@ local SCM CclDefineUnitType(SCM list)
|
|||
}
|
||||
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;
|
||||
|
|
|
@ -381,10 +381,12 @@ global void ParsePudUDTA(const char* udta, int length __attribute__((unused)))
|
|||
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 @@ global void ParsePudUDTA(const char* udta, int length __attribute__((unused)))
|
|||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue