mirror of
https://github.com/id-Software/quake2-rerelease-dll.git
synced 2025-03-14 12:20:45 +00:00
Removed more armor stuff
This commit is contained in:
parent
e8381743e9
commit
d99c0d04e0
2 changed files with 45 additions and 45 deletions
|
@ -242,56 +242,56 @@ dflags these flags are used to control how T_Damage works
|
|||
// return save;
|
||||
// }
|
||||
|
||||
static int CheckArmor(edict_t *ent, const vec3_t &point, const vec3_t &normal, int damage, int te_sparks,
|
||||
damageflags_t dflags)
|
||||
{
|
||||
gclient_t *client;
|
||||
int save;
|
||||
item_id_t index;
|
||||
gitem_t *armor;
|
||||
int *power;
|
||||
// static int CheckArmor(edict_t *ent, const vec3_t &point, const vec3_t &normal, int damage, int te_sparks,
|
||||
// damageflags_t dflags)
|
||||
// {
|
||||
// gclient_t *client;
|
||||
// int save;
|
||||
// item_id_t index;
|
||||
// gitem_t *armor;
|
||||
// int *power;
|
||||
|
||||
if (!damage)
|
||||
return 0;
|
||||
// if (!damage)
|
||||
// return 0;
|
||||
|
||||
// ROGUE
|
||||
if (dflags & (DAMAGE_NO_ARMOR | DAMAGE_NO_REG_ARMOR))
|
||||
// ROGUE
|
||||
return 0;
|
||||
// // ROGUE
|
||||
// if (dflags & (DAMAGE_NO_ARMOR | DAMAGE_NO_REG_ARMOR))
|
||||
// // ROGUE
|
||||
// return 0;
|
||||
|
||||
client = ent->client;
|
||||
// index = ArmorIndex(ent);
|
||||
// client = ent->client;
|
||||
// // index = ArmorIndex(ent);
|
||||
|
||||
// if (!index)
|
||||
// return 0;
|
||||
// // if (!index)
|
||||
// // return 0;
|
||||
|
||||
// armor = GetItemByIndex(index);
|
||||
// // armor = GetItemByIndex(index);
|
||||
|
||||
if (dflags & DAMAGE_ENERGY)
|
||||
save = (int) ceilf(armor->armor_info->energy_protection * damage);
|
||||
else
|
||||
save = (int) ceilf(armor->armor_info->normal_protection * damage);
|
||||
// if (dflags & DAMAGE_ENERGY)
|
||||
// save = (int) ceilf(armor->armor_info->energy_protection * damage);
|
||||
// else
|
||||
// save = (int) ceilf(armor->armor_info->normal_protection * damage);
|
||||
|
||||
if (client)
|
||||
power = &client->pers.inventory[index];
|
||||
else
|
||||
power = &ent->monsterinfo.armor_power;
|
||||
// if (client)
|
||||
// power = &client->pers.inventory[index];
|
||||
// else
|
||||
// power = &ent->monsterinfo.armor_power;
|
||||
|
||||
if (save >= *power)
|
||||
save = *power;
|
||||
// if (save >= *power)
|
||||
// save = *power;
|
||||
|
||||
if (!save)
|
||||
return 0;
|
||||
// if (!save)
|
||||
// return 0;
|
||||
|
||||
*power -= save;
|
||||
// *power -= save;
|
||||
|
||||
if (!client && !ent->monsterinfo.armor_power)
|
||||
ent->monsterinfo.armor_type = IT_NULL;
|
||||
// if (!client && !ent->monsterinfo.armor_power)
|
||||
// ent->monsterinfo.armor_type = IT_NULL;
|
||||
|
||||
SpawnDamage(te_sparks, point, normal, save);
|
||||
// SpawnDamage(te_sparks, point, normal, save);
|
||||
|
||||
return save;
|
||||
}
|
||||
// return save;
|
||||
// }
|
||||
|
||||
void M_ReactToDamage(edict_t *targ, edict_t *attacker, edict_t *inflictor)
|
||||
{
|
||||
|
@ -655,15 +655,15 @@ void T_Damage(edict_t *targ, edict_t *inflictor, edict_t *attacker, const vec3_t
|
|||
{
|
||||
psave = asave = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
//else
|
||||
//{
|
||||
// ZOID
|
||||
// psave = CheckPowerArmor(targ, point, normal, take, dflags);
|
||||
// take -= psave;
|
||||
|
||||
asave = CheckArmor(targ, point, normal, take, te_sparks, dflags);
|
||||
take -= asave;
|
||||
}
|
||||
//asave = CheckArmor(targ, point, normal, take, te_sparks, dflags);
|
||||
//take -= asave;
|
||||
//}
|
||||
|
||||
// treat cheat/powerup savings the same as armor
|
||||
asave += save;
|
||||
|
|
|
@ -365,9 +365,9 @@ static const std::initializer_list<spawn_t> spawns = {
|
|||
|
||||
// { "monster_commander_body", SP_monster_commander_body },
|
||||
|
||||
{ "turret_breach", SP_turret_breach },
|
||||
{ "turret_base", SP_turret_base },
|
||||
{ "turret_driver", SP_turret_driver },
|
||||
//{ "turret_breach", SP_turret_breach },
|
||||
//{ "turret_base", SP_turret_base },
|
||||
//{ "turret_driver", SP_turret_driver },
|
||||
|
||||
// RAFAEL
|
||||
{ "func_object_repair", SP_object_repair },
|
||||
|
|
Loading…
Reference in a new issue