ball.effects |= EF_NOSHADOW;
ball.scale = 1; // scale down.
- WaypointSprite_AttachCarrier("nb-ball", plyr, RADARICON_FLAGCARRIER, BALL_SPRITECOLOR);
+ WaypointSprite_AttachCarrier(WP_NbBall, plyr, RADARICON_FLAGCARRIER);
WaypointSprite_UpdateRule(plyr.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
if(autocvar_g_nexball_basketball_delay_hold)
self.weaponentity.weapons = self.weapons;
self.weaponentity.switchweapon = self.weapon;
self.weapons = WEPSET_PORTO;
- WEP_ACTION(WEP_PORTO, WR_RESETPLAYER);
- self.switchweapon = WEP_PORTO;
- W_SwitchWeapon(WEP_PORTO);
+ WEP_ACTION(WEP_PORTO.m_id, WR_RESETPLAYER);
+ self.switchweapon = WEP_PORTO.m_id;
+ W_SwitchWeapon(WEP_PORTO.m_id);
self = ownr;
}
}
WaypointSprite_Kill(ball.owner.waypointsprite_attachedforcarrier);
- WaypointSprite_Spawn("nb-ball", 0, 0, ball, '0 0 64', world, ball.team, ball, waypointsprite_attachedforcarrier, false, RADARICON_FLAGCARRIER, BALL_SPRITECOLOR); // no health bar please
+ WaypointSprite_Spawn(WP_NbBall, 0, 0, ball, '0 0 64', world, ball.team, ball, waypointsprite_attachedforcarrier, false, RADARICON_FLAGCARRIER); // no health bar please
WaypointSprite_UpdateRule(ball.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
ball.owner.ballcarried = world;
precache_sound(self.noise1);
precache_sound(self.noise2);
- WaypointSprite_AttachCarrier("nb-ball", self, RADARICON_FLAGCARRIER, BALL_SPRITECOLOR); // the ball's team is not set yet, no rule update needed
+ WaypointSprite_AttachCarrier(WP_NbBall, self, RADARICON_FLAGCARRIER); // the ball's team is not set yet, no rule update needed
self.reset = ball_restart;
self.think = InitBall;
if(self.team != GOAL_OUT && Team_TeamToNumber(self.team) != -1)
{
- WaypointSprite_SpawnFixed("goal", (self.absmin + self.absmax) * 0.5, self, sprite, RADARICON_NONE, ((self.team) ? Team_ColorRGB(self.team) : '1 0.5 0'));
+ entity wp = WaypointSprite_SpawnFixed(WP_NbGoal, (self.absmin + self.absmax) * 0.5, self, sprite, RADARICON_NONE);
+ wp.colormod = ((self.team) ? Team_ColorRGB(self.team) : '1 0.5 0');
self.sprite.customizeentityforclient = nb_Goal_Customize;
}
if(!(balls & BALL_BASKET))
return;
W_SetupShot(self, false, 2, "nexball/shoot2.wav", CH_WEAPON_A, 0);
-// pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+// Send_Effect("grenadelauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
missile = spawn();
missile.owner = self;
}
else if(req == WR_INIT)
{
- precache_model("models/weapons/g_porto.md3");
- precache_model("models/weapons/v_porto.md3");
- precache_model("models/weapons/h_porto.iqm");
+ precache_model(W_Model("g_porto.md3"));
+ precache_model(W_Model("v_porto.md3"));
+ precache_model(W_Model("h_porto.iqm"));
precache_model("models/elaser.mdl");
precache_sound("nexball/shoot1.wav");
precache_sound("nexball/shoot2.wav");
}
else if(req == WR_SETUP)
{
- //weapon_setup(WEP_PORTO);
+ //weapon_setup(WEP_PORTO.m_id);
}
// No need to check WR_CHECKAMMO* or WR_AIM, it should always return true
return true;
if(self.weaponentity.weapons)
{
self.weapons = self.weaponentity.weapons;
- WEP_ACTION(WEP_PORTO, WR_RESETPLAYER);
+ WEP_ACTION(WEP_PORTO.m_id, WR_RESETPLAYER);
self.switchweapon = self.weaponentity.switchweapon;
W_SwitchWeapon(self.switchweapon);
MUTATOR_HOOKFUNCTION(nexball_ForbidThrowing)
{
- if(self.weapon == WEP_MORTAR)
+ if(self.weapon == WEP_MORTAR.m_id)
return true;
return false;
MUTATOR_HOOKFUNCTION(nexball_FilterItem)
{
if(self.classname == "droppedweapon")
- if(self.weapon == WEP_MORTAR)
+ if(self.weapon == WEP_MORTAR.m_id)
return true;
return false;