ball.effects |= EF_NOSHADOW;
ball.scale = 1; // scale down.
- WaypointSprite_AttachCarrier("nb-ball", plyr);
+ WaypointSprite_AttachCarrier("nb-ball", plyr, RADARICON_FLAGCARRIER, BALL_SPRITECOLOR);
WaypointSprite_UpdateRule(plyr.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
- WaypointSprite_UpdateTeamRadar(plyr.waypointsprite_attachedforcarrier, RADARICON_FLAGCARRIER, BALL_SPRITECOLOR);
if (g_nexball_basketball_delay_hold)
{
}
WaypointSprite_Kill(ball.owner.waypointsprite_attachedforcarrier);
- //WaypointSprite_AttachCarrier("nb-ball", ball);
- WaypointSprite_Spawn("nb-ball", 0, 0, ball, '0 0 64', world, ball.team, ball, waypointsprite_attachedforcarrier, FALSE); // no health bar please
+ 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_UpdateRule(ball.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
- WaypointSprite_UpdateTeamRadar(ball.waypointsprite_attachedforcarrier, RADARICON_FLAGCARRIER, BALL_SPRITECOLOR);
ball.owner.ballcarried = world;
ball.owner = world;
self.teamtime = 0;
self.pusher = world;
self.team = FALSE;
- sound (self, CHAN_PROJECTILE, self.noise1, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
WaypointSprite_Ping(self.waypointsprite_attachedforcarrier);
LogNB("init", world);
}
if (other.solid == SOLID_BSP) {
if (time > self.lastground + 0.1)
{
- sound (self, CHAN_PROJECTILE, self.noise, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
self.lastground = time;
}
if (vlen(self.velocity) && !self.cnt)
LogNB("caught", other);
GiveBall(other, self);
} else if (other.solid == SOLID_BSP) {
- sound (self, CHAN_PROJECTILE, self.noise, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
if (vlen(self.velocity) && !self.cnt)
self.nextthink = min(time + g_nexball_delay_idle, self.teamtime);
}
pscore = 1;
}
- sound (ball, CHAN_AUTO, self.noise, VOL_BASE, ATTN_NONE);
+ sound (ball, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NONE);
if(ball.team && pscore)
{
precache_sound (self.noise1);
precache_sound (self.noise2);
- WaypointSprite_AttachCarrier("nb-ball", self); // the ball's team is not set yet, no rule update needed
- WaypointSprite_UpdateTeamRadar(self.waypointsprite_attachedforcarrier, RADARICON_FLAGCARRIER, BALL_SPRITECOLOR);
+ WaypointSprite_AttachCarrier("nb-ball", self, RADARICON_FLAGCARRIER, BALL_SPRITECOLOR); // the ball's team is not set yet, no rule update needed
self.reset = ball_restart;
self.think = InitBall;
PROJECTILE_TOUCH;
if(attacker.team != other.team || g_nexball_basketball_teamsteal)
- if((ball = other.ballcarried) && (attacker.classname == "player" || attacker.classname == "gib"))
+ if((ball = other.ballcarried) && (attacker.classname == "player"))
{
other.velocity = other.velocity + normalize(self.velocity) * other.damageforcescale * autocvar_g_balance_nexball_secondary_force;
other.flags &~= FL_ONGROUND;
if(!attacker.ballcarried)
{
LogNB("stole", attacker);
- sound (other, CHAN_AUTO, ball.noise2, VOL_BASE, ATTN_NORM);
+ sound (other, CH_TRIGGER, ball.noise2, VOL_BASE, ATTN_NORM);
if(attacker.team == other.team && time > attacker.teamkill_complain)
{
if (!(ball = self.ballcarried))
return;
- W_SetupShot (self, FALSE, 4, "nexball/shoot1.wav", CHAN_WEAPON, 0);
+ W_SetupShot (self, FALSE, 4, "nexball/shoot1.wav", CH_WEAPON_A, 0);
tracebox(w_shotorg, BALL_MINS, BALL_MAXS, w_shotorg, MOVE_WORLDONLY, world);
if(trace_startsolid)
{
local entity missile;
if (!(balls & BALL_BASKET))
return;
- W_SetupShot (self, FALSE, 2, "nexball/shoot2.wav", CHAN_WEAPON, 0);
+ W_SetupShot (self, FALSE, 2, "nexball/shoot2.wav", CH_WEAPON_A, 0);
// pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
missile = spawn ();
precache_model ("models/elaser.mdl");
precache_sound ("nexball/shoot1.wav");
precache_sound ("nexball/shoot2.wav");
+ precache_sound ("misc/typehit.wav");
}
else if (req == WR_SETUP)
weapon_setup(WEP_PORTO);