#include <common/physics/movetypes/movetypes.qh>
#include <common/physics/player.qh>
#include <common/playerstats.qh>
+#include <common/resources/sv_resources.qh>
#include <common/state.qh>
#include <common/teams.qh>
#include <common/util.qh>
#include <server/items/items.qh>
#include <server/main.qh>
#include <server/mutators/_mod.qh>
-#include <server/resources.qh>
#include <server/scores.qh>
#include <server/spawnpoints.qh>
#include <server/teamplay.qh>
if(w != 0 || slot == 0)
s = strcat(s, ftos(w));
}
- if(StatusEffects_active(STATUSEFFECT_Strength, player))
- s = strcat(s, "S");
- if(StatusEffects_active(STATUSEFFECT_Shield, player))
- s = strcat(s, "I");
if(PHYS_INPUT_BUTTON_CHAT(player))
s = strcat(s, "T");
// TODO: include these codes as a flag on the item itself
SetResourceExplicit(targ, RES_ARMOR, 0);
SetResourceExplicit(targ, RES_HEALTH, 0.9); // this is < 1
}
- targ.spawnshieldtime = 0;
+ StatusEffects_remove(STATUSEFFECT_SpawnShield, targ, STATUSEFFECT_REMOVE_CLEAR);
targ.flags -= targ.flags & FL_GODMODE;
damage = 100000;
}
}
}
- if(!MUTATOR_IS_ENABLED(mutator_instagib))
- {
- // apply strength multiplier
- if (attacker.items & ITEM_Strength.m_itemid)
- {
- if(targ == attacker)
- {
- damage = damage * autocvar_g_balance_powerup_strength_selfdamage;
- force = force * autocvar_g_balance_powerup_strength_selfforce;
- }
- else
- {
- damage = damage * autocvar_g_balance_powerup_strength_damage;
- force = force * autocvar_g_balance_powerup_strength_force;
- }
- }
-
- // apply invincibility multiplier
- if (targ.items & ITEM_Shield.m_itemid)
- {
- damage = damage * autocvar_g_balance_powerup_invincible_takedamage;
- if (targ != attacker)
- {
- force = force * autocvar_g_balance_powerup_invincible_takeforce;
- }
- }
- }
-
if (targ == attacker)
damage = damage * autocvar_g_balance_selfdamagepercent; // Partial damage if the attacker hits himself
if(PHYS_INPUT_BUTTON_CHAT(victim))
attacker.typehitsound += 1;
else
- attacker.damage_dealt += damage;
+ attacker.hitsound_damage_dealt += damage;
}
impressive_hits += 1;
// apply push
if (targ.damageforcescale)
if (force)
- if (!IS_PLAYER(targ) || time >= targ.spawnshieldtime || targ == attacker)
+ if (!IS_PLAYER(targ) || !StatusEffects_active(STATUSEFFECT_SpawnShield, targ) || targ == attacker)
{
vector farce = damage_explosion_calcpush(targ.damageforcescale * force, targ.velocity, autocvar_g_balance_damagepush_speedfactor);
if(targ.move_movetype == MOVETYPE_PHYSICS)
t = min(frametime, fireendtime - time);
d = e.fire_damagepersec * t;
- hi = e.fire_owner.damage_dealt;
+ hi = e.fire_owner.hitsound_damage_dealt;
ty = e.fire_owner.typehitsound;
Damage(e, e, e.fire_owner, d, e.fire_deathtype, DMG_NOWEP, e.origin, '0 0 0');
if(e.fire_hitsound && e.fire_owner)
{
- e.fire_owner.damage_dealt = hi;
+ e.fire_owner.hitsound_damage_dealt = hi;
e.fire_owner.typehitsound = ty;
}
e.fire_hitsound = true;