if (IS_PLAYER(this)) {
if(this.death_time == time && IS_DEAD(this))
{
+ // player's bbox gets resized now, instead of in the damage event that killed the player,
+ // once all the damage events of this frame have been processed with normal size
this.maxs.z = 5;
setsize(this, this.mins, this.maxs);
}
else
animdecide_setstate(this, this.anim_state | ANIMSTATE_DEAD2, true);
- /* // postpone resize until frame end so that dead player can still
- // properly get hit by all the projectiles fired in this frame (shotgun)
- if (this.maxs.z > 5)
- {
- this.maxs_z = 5;
- setsize(this, this.mins, this.maxs);
- }
- */
-
// set damage function to corpse damage
this.event_damage = PlayerCorpseDamage;
// call the corpse damage function just in case it wants to gib
int mutator_check = MUTATOR_CALLHOOK(AccuracyTargetValid, attacker, targ);
if (warmup_stage) return false;
+
+ // damage to dead/frozen players is good only if it happens in the frame they get killed / frozen
+ // so that stats for weapons that shoot multiple projectiles per shot are properly counted
if (IS_DEAD(targ) && time > targ.death_time) return false;
if (STAT(FROZEN, targ) && time > targ.freeze_time) return false;
if (SAME_TEAM(attacker, targ)) return false;