}
}
-bool buffs_BuffModel_Customize()
-{SELFPARAM();
+bool buffs_BuffModel_Customize(entity this)
+{
entity player, myowner;
bool same_team;
player.buff_model.scale = 0.7;
player.buff_model.pflags = PFLAGS_FULLDYNAMIC;
player.buff_model.light_lev = 200;
- player.buff_model.customizeentityforclient = buffs_BuffModel_Customize;
+ setcefc(player.buff_model, buffs_BuffModel_Customize);
}
vector buff_GlowColor(entity buff)
sound(this, CH_TRIGGER, SND_KA_RESPAWN, VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere)
}
-void buff_Touch()
-{SELFPARAM();
+void buff_Touch(entity this)
+{
if(gameover) { return; }
if(ITEM_TOUCH_NEEDKILL())
ent.buffs = RandomSelection_chosen_float;
}
-void buff_Think()
-{SELFPARAM();
+void buff_Think(entity this)
+{
if(this.buffs != this.oldbuffs)
{
entity buff = buff_FirstFromFlags(this.buffs);
buff_Respawn(this);
}
-float buff_Customize()
-{SELFPARAM();
+float buff_Customize(entity this)
+{
entity player = WaypointSprite_getviewentity(other);
if(!this.buff_active || (this.team && DIFF_TEAM(player, this)))
{
this.skin = buff.m_skin;
this.effects = EF_FULLBRIGHT | EF_STARDUST | EF_NOSHADOW;
this.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY;
- this.customizeentityforclient = buff_Customize;
+ setcefc(this, buff_Customize);
//this.gravity = 100;
this.color = buff.m_color;
this.glowmod = buff_GlowColor(this);
buff_Init(ent);
}
-void buff_Vengeance_DelayedDamage()
-{SELFPARAM();
+void buff_Vengeance_DelayedDamage(entity this)
+{
if(this.enemy)
Damage(this.enemy, this.owner, this.owner, this.dmg, DEATH_BUFF.m_id, this.enemy.origin, '0 0 0');
MUTATOR_HOOKFUNCTION(buffs, PlayerDamage_Calculate)
{
+ entity frag_attacker = M_ARGV(1, entity);
+ entity frag_target = M_ARGV(2, entity);
+ float frag_deathtype = M_ARGV(3, float);
+ float frag_damage = M_ARGV(4, float);
+ vector frag_force = M_ARGV(6, vector);
+
if(frag_deathtype == DEATH_BUFF.m_id) { return false; }
if(frag_target.buffs & BUFF_SPEED.m_itemid)
frag_attacker.armorvalue = bound(0, frag_attacker.armorvalue + bound(0, frag_damage * autocvar_g_buffs_vampire_damage_steal, frag_target.armorvalue), g_pickup_armorsmall_max);
}
+ M_ARGV(4, float) = frag_damage;
+ M_ARGV(6, vector) = frag_force;
+
return false;
}
-MUTATOR_HOOKFUNCTION(buffs,PlayerSpawn)
-{SELFPARAM();
- self.buffs = 0;
+MUTATOR_HOOKFUNCTION(buffs, PlayerSpawn)
+{
+ entity player = M_ARGV(0, entity);
+
+ player.buffs = 0;
// reset timers here to prevent them continuing after re-spawn
- self.buff_disability_time = 0;
- self.buff_disability_effect_time = 0;
+ player.buff_disability_time = 0;
+ player.buff_disability_effect_time = 0;
return false;
}
{
entity oldother = other;
other = self;
- WITHSELF(it, gettouch(it)());
+ WITHSELF(it, gettouch(it)(it));
other = oldother;
}
}