this.stat_monsters_killed = monsters_killed;
}
-void monster_dropitem(entity this)
+void monster_dropitem(entity this, entity attacker)
{
if(!this.candrop || !this.monster_loot)
return;
e.monster_loot = this.monster_loot;
- MUTATOR_CALLHOOK(MonsterDropItem, e);
- e = other;
+ MUTATOR_CALLHOOK(MonsterDropItem, this, e, attacker);
+ e = M_ARGV(1, entity);
if(e && e.monster_loot)
{
this.health = 0; // reset by Unfreeze
}
- monster_dropitem(this);
+ monster_dropitem(this, attacker);
Monster_Sound(this, monstersound_death, 0, false, CH_VOICE);
take = v_x;
save = v_y;
- damage_take = take;
- frag_attacker = attacker;
- frag_deathtype = deathtype;
Monster mon = get_monsterinfo(this.monsterid);
- mon.mr_pain(mon, this);
- take = damage_take;
+ take = mon.mr_pain(mon, this, take, attacker, deathtype);
if(take)
{
WaypointSprite_Kill(this.sprite);
- MUTATOR_CALLHOOK(MonsterDies, this, attacker);
+ MUTATOR_CALLHOOK(MonsterDies, this, attacker, deathtype);
if(this.health <= -100 || deathtype == DEATH_KILL.m_id) // check if we're already gibbed
{