}
void GiveFrags (entity attacker, entity targ, float f, int deathtype)
-{SELFPARAM();
+{
// TODO route through PlayerScores instead
if(gameover) return;
}
// FIXME fix the mess this is (we have REAL points now!)
- if(MUTATOR_CALLHOOK(GiveFragsForKill, self, attacker, targ, f))
- {
- f = frag_score;
- }
+ if(MUTATOR_CALLHOOK(GiveFragsForKill, attacker, targ, f))
+ f = M_ARGV(2, float);
attacker.totalfrags += f;
void Ice_Think(entity this)
{
- if(!STAT(FROZEN, self.owner) || self.owner.iceblock != self)
+ if(!STAT(FROZEN, this.owner) || this.owner.iceblock != this)
{
- remove(self);
+ remove(this);
return;
}
- setorigin(self, self.owner.origin - '0 0 16');
- self.nextthink = time;
+ setorigin(this, this.owner.origin - '0 0 16');
+ this.nextthink = time;
}
void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypoint)
-{SELFPARAM();
+{
if(!IS_PLAYER(targ) && !IS_MONSTER(targ)) // only specified entities can be freezed
return;
targ.revive_progress = ((frozen_type == 3) ? 1 : 0);
targ.health = ((frozen_type == 3) ? targ_maxhealth : 1);
targ.revive_speed = freeze_time;
- self.bot_attack = false;
+ targ.bot_attack = false;
entity ice = new(ice);
ice.owner = targ;
void Unfreeze (entity targ)
{
- SELFPARAM();
if(!STAT(FROZEN, targ))
return;
STAT(FROZEN, targ) = 0;
targ.revive_progress = 0;
targ.revival_time = time;
- self.bot_attack = true;
+ targ.bot_attack = true;
WaypointSprite_Kill(targ.waypointsprite_attached);
{
// exit the vehicle before killing (fixes a crash)
if(IS_PLAYER(targ) && targ.vehicle)
- WITHSELF(targ, vehicles_exit(VHEF_RELEASE));
+ vehicles_exit(targ.vehicle, VHEF_RELEASE);
// These are ALWAYS lethal
// No damage modification here
// should this be changed at all? If so, in what way?
MUTATOR_CALLHOOK(PlayerDamage_Calculate, inflictor, attacker, targ, deathtype, damage, mirrordamage, force);
- damage = frag_damage;
- mirrordamage = frag_mirrordamage;
- force = frag_force;
+ damage = M_ARGV(4, float);
+ mirrordamage = M_ARGV(5, float);
+ force = M_ARGV(6, vector);
if(STAT(FROZEN, targ))
if(deathtype != DEATH_HURTTRIGGER.m_id && deathtype != DEATH_TEAMCHANGE.m_id && deathtype != DEATH_AUTOTEAMCHANGE.m_id)