SpawnBall(this);
}
-float nb_Goal_Customize()
-{SELFPARAM();
+float nb_Goal_Customize(entity this)
+{
entity e, wp_owner;
e = WaypointSprite_getviewentity(other);
wp_owner = self.owner;
{
entity wp = WaypointSprite_SpawnFixed(WP_NbGoal, (this.absmin + this.absmax) * 0.5, this, sprite, RADARICON_NONE);
wp.colormod = ((this.team) ? Team_ColorRGB(this.team) : '1 0.5 0');
- this.sprite.customizeentityforclient = nb_Goal_Customize;
+ setcefc(this.sprite, nb_Goal_Customize);
}
this.classname = "nexball_goal";
CSQCProjectile(missile, true, PROJECTILE_ELECTRO, true);
}
-float ball_customize()
-{SELFPARAM();
+float ball_customize(entity this)
+{
if(!self.owner)
{
self.effects &= ~EF_FLAME;
self.scale = 1;
- self.customizeentityforclient = func_null;
+ setcefc(self, func_null);
return true;
}
MUTATOR_HOOKFUNCTION(nb, PlayerDies)
{
+ entity frag_target = M_ARGV(2, entity);
+
nb_DropBall(frag_target);
- return false;
}
MUTATOR_HOOKFUNCTION(nb, MakePlayerObserver)
{
// 'view ball'
self.ballcarried.velocity = self.velocity;
- self.ballcarried.customizeentityforclient = ball_customize;
+ setcefc(self.ballcarried, ball_customize);
vector org = self.origin + self.view_ofs +
v_forward * autocvar_g_nexball_viewmodel_offset.x +
MUTATOR_HOOKFUNCTION(nb, PlayerSpawn)
{
- SELFPARAM();
- this.metertime = 0;
+ entity player = M_ARGV(0, entity);
+
+ player.metertime = 0;
.entity weaponentity = weaponentities[0];
- this.(weaponentity).weapons = '0 0 0';
+ player.(weaponentity).weapons = '0 0 0';
if (nexball_mode & NBM_BASKETBALL)
- this.weapons |= WEPSET(NEXBALL);
+ player.weapons |= WEPSET(NEXBALL);
else
- this.weapons = '0 0 0';
+ player.weapons = '0 0 0';
return false;
}
MUTATOR_HOOKFUNCTION(nb, DropSpecialItems)
{
+ entity frag_target = M_ARGV(0, entity);
+
if(frag_target.ballcarried)
DropBall(frag_target.ballcarried, frag_target.origin, frag_target.velocity);