#include "../common/effects/qc/all.qh"
#include "../common/mutators/mutator/waypoints/waypointsprites.qh"
#include "../common/triggers/include.qh"
+#include "../common/wepent.qh"
#include "weapons/weaponstats.qh"
}
if(sound_allowed(MSG_BROADCAST, attacker))
- if((this.health < 2 * WEP_CVAR_PRI(blaster, damage) * autocvar_g_balance_selfdamagepercent + 1) || !(DEATH_WEAPONOF(deathtype).spawnflags & WEP_FLAG_CANCLIMB) || attacker != this) // WEAPONTODO: create separate limit for pain notification with laser
+ if(this.health < 25 || !(DEATH_WEAPONOF(deathtype).spawnflags & WEP_FLAG_CANCLIMB) || take > 20 || attacker != this)
if(this.health > 1)
// exclude pain sounds for laserjumps as long as you aren't REALLY low on health and would die of the next two
{
valid_damage_for_weaponstats = 0;
Weapon awep = WEP_Null;
+ .entity weaponentity = weaponentities[0]; // TODO: unhardcode
if(vbot || IS_REAL_CLIENT(this))
if(abot || IS_REAL_CLIENT(attacker))
if(DIFF_TEAM(this, attacker))
{
if(DEATH_ISSPECIAL(deathtype))
- awep = PS(attacker).m_weapon;
+ awep = attacker.(weaponentity).m_weapon;
else
awep = DEATH_WEAPONOF(deathtype);
valid_damage_for_weaponstats = 1;
da = da - max(this.armorvalue, 0);
if(valid_damage_for_weaponstats)
{
- WeaponStats_LogDamage(awep.m_id, abot, PS(this).m_weapon.m_id, vbot, dh + da);
+ WeaponStats_LogDamage(awep.m_id, abot, this.(weaponentity).m_weapon.m_id, vbot, dh + da);
}
if (damage)
{
}
if(valid_damage_for_weaponstats)
- WeaponStats_LogKill(awep.m_id, abot, PS(this).m_weapon.m_id, vbot);
+ WeaponStats_LogKill(awep.m_id, abot, this.(weaponentity).m_weapon.m_id, vbot);
if(autocvar_sv_gentle < 1)
if(sound_allowed(MSG_BROADCAST, attacker))
MUTATOR_CALLHOOK(PlayerDies, inflictor, attacker, this, deathtype, damage);
excess = M_ARGV(4, float);
- Weapon wep = PS(this).m_weapon;
- /*for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+ Weapon wep = this.(weaponentity).m_weapon;
+ for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
- .entity weaponentity = weaponentities[slot];
- wep.wr_playerdeath(wep, this, weaponentity);
- }*/
- .entity weaponentity = weaponentities[0]; // TODO: unhardcode
- wep.wr_playerdeath(wep, this, weaponentity);
+ .entity went = weaponentities[slot];
+ wep.wr_playerdeath(wep, this, went);
+ }
- RemoveGrapplingHook(this);
+ RemoveGrapplingHooks(this);
Portal_ClearAllLater(this);
// clear waypoints
WaypointSprite_PlayerDead(this);
// throw a weapon
- SpawnThrownWeapon(this, this.origin + (this.mins + this.maxs) * 0.5, PS(this).m_switchweapon.m_id);
+ for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+ {
+ .entity went = weaponentities[slot];
+ SpawnThrownWeapon(this, this.origin + (this.mins + this.maxs) * 0.5, this.(went).m_weapon, went);
+ }
// become fully visible
this.alpha = default_player_alpha;
teamsay = false;
}
- if(gameover)
+ if(game_stopped)
teamsay = false;
if (!source) {
if (!privatesay && source && !IS_PLAYER(source))
{
- if (!gameover)
+ if (!game_stopped)
if (teamsay || (autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !warmup_stage))
teamsay = -1; // spectators
}