return MUTATOR_CALLHOOK(FragCenterMessage, attacker, targ, deathtype, kill_count_to_attacker, kill_count_to_target);
}
-.int buffs = _STAT(BUFFS); // TODO: remove
entity buff_FirstFromFlags(int _buffs);
void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .entity weaponentity)
{
int f3 = 0;
if(deathtype == DEATH_BUFF.m_id)
- f3 = buff_FirstFromFlags(attacker.buffs).m_id;
+ f3 = buff_FirstFromFlags(STAT(BUFFS, attacker)).m_id;
if (!Obituary_WeaponDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, CS(targ).killcount, kill_count_to_attacker))
Obituary_SpecialDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, CS(targ).killcount, kill_count_to_attacker, f3);
this.nextthink = time;
}
-void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypoint)
+void Freeze (entity targ, float revivespeed, float frozen_type, float show_waypoint)
{
if(!IS_PLAYER(targ) && !IS_MONSTER(targ)) // only specified entities can be freezed
return;
float targ_maxhealth = ((IS_MONSTER(targ)) ? targ.max_health : start_health);
STAT(FROZEN, targ) = frozen_type;
- targ.revive_progress = ((frozen_type == 3) ? 1 : 0);
+ STAT(REVIVE_PROGRESS, targ) = ((frozen_type == 3) ? 1 : 0);
SetResourceAmount(targ, RESOURCE_HEALTH, ((frozen_type == 3) ? targ_maxhealth : 1));
- targ.revive_speed = freeze_time;
+ targ.revive_speed = revivespeed;
if(targ.bot_attack)
IL_REMOVE(g_bot_targets, targ);
targ.bot_attack = false;
+ targ.freeze_time = time;
entity ice = new(ice);
ice.owner = targ;
}
STAT(FROZEN, targ) = 0;
- targ.revive_progress = 0;
+ STAT(REVIVE_PROGRESS, targ) = 0;
targ.revival_time = time;
if(!targ.bot_attack)
IL_PUSH(g_bot_targets, targ);
}
// should this be changed at all? If so, in what way?
- MUTATOR_CALLHOOK(Damage_Calculate, inflictor, attacker, targ, deathtype, damage, mirrordamage, force);
+ MUTATOR_CALLHOOK(Damage_Calculate, inflictor, attacker, targ, deathtype, damage, mirrordamage, force, attacker.(weaponentity));
damage = M_ARGV(4, float);
mirrordamage = M_ARGV(5, float);
force = M_ARGV(6, vector);
}
}
- if(!g_instagib)
+ if(!autocvar_g_instagib)
{
// apply strength multiplier
if (attacker.items & ITEM_Strength.m_itemid)
}
}
-float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe,
+float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe,
float inflictorselfdamage, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity)
// Returns total damage applies to creatures
{