DropBall(self, ownr.origin, ownr.velocity);
makevectors(ownr.v_angle_y * '0 1 0');
ownr.velocity += ('0 0 0.75' - v_forward) * 1000;
DropBall(self, ownr.origin, ownr.velocity);
makevectors(ownr.v_angle_y * '0 1 0');
ownr.velocity += ('0 0 0.75' - v_forward) * 1000;
//setattachment(ball, plyr, "");
setorigin(ball, plyr.origin + plyr.view_ofs);
//setattachment(ball, plyr, "");
setorigin(ball, plyr.origin + plyr.view_ofs);
weapon_action(WEP_PORTO, WR_RESETPLAYER);
self.switchweapon = WEP_PORTO;
W_SwitchWeapon(WEP_PORTO);
weapon_action(WEP_PORTO, WR_RESETPLAYER);
self.switchweapon = WEP_PORTO;
W_SwitchWeapon(WEP_PORTO);
void DropBall(entity ball, vector org, vector vel)
{
ball.effects |= autocvar_g_nexball_basketball_effects_default;
void DropBall(entity ball, vector org, vector vel)
{
ball.effects |= autocvar_g_nexball_basketball_effects_default;
- ball.effects &~= EF_NOSHADOW;
- ball.owner.effects &~= autocvar_g_nexball_basketball_effects_default;
+ ball.effects &= ~EF_NOSHADOW;
+ ball.owner.effects &= ~autocvar_g_nexball_basketball_effects_default;
setattachment(ball, world, "");
setorigin(ball, org);
ball.movetype = MOVETYPE_BOUNCE;
setattachment(ball, world, "");
setorigin(ball, org);
ball.movetype = MOVETYPE_BOUNCE;
self.movetype = MOVETYPE_BOUNCE;
if(self.classname == "nexball_basketball")
self.touch = basketball_touch;
self.movetype = MOVETYPE_BOUNCE;
if(self.classname == "nexball_basketball")
self.touch = basketball_touch;
- sound(self, CH_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER, self.noise1, VOL_BASE, ATTEN_NORM);
- sound(self, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER, self.noise, VOL_BASE, ATTEN_NORM);
- sound(self, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER, self.noise, VOL_BASE, ATTEN_NORM);
if(vlen(self.velocity) && !self.cnt)
self.nextthink = min(time + autocvar_g_nexball_delay_idle, self.teamtime);
}
if(vlen(self.velocity) && !self.cnt)
self.nextthink = min(time + autocvar_g_nexball_delay_idle, self.teamtime);
}
- sound(ball, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NONE);
+ sound(ball, CH_TRIGGER, self.noise, VOL_BASE, ATTEN_NONE);
//dprint("W_Nexball_Think\n");
//vector new_dir = steerlib_arrive(self.enemy.origin, 2500);
vector new_dir = normalize(self.enemy.origin + '0 0 50' - self.origin);
//dprint("W_Nexball_Think\n");
//vector new_dir = steerlib_arrive(self.enemy.origin, 2500);
vector new_dir = normalize(self.enemy.origin + '0 0 50' - self.origin);
vector new_vel = normalize(old_dir + (new_dir * autocvar_g_nexball_safepass_turnrate)) * _speed;
//vector new_vel = (new_dir * autocvar_g_nexball_safepass_turnrate
vector new_vel = normalize(old_dir + (new_dir * autocvar_g_nexball_safepass_turnrate)) * _speed;
//vector new_vel = (new_dir * autocvar_g_nexball_safepass_turnrate
PROJECTILE_TOUCH;
if(attacker.team != other.team || autocvar_g_nexball_basketball_teamsteal)
if((ball = other.ballcarried) && (IS_PLAYER(attacker)))
{
other.velocity = other.velocity + normalize(self.velocity) * other.damageforcescale * autocvar_g_balance_nexball_secondary_force;
PROJECTILE_TOUCH;
if(attacker.team != other.team || autocvar_g_nexball_basketball_teamsteal)
if((ball = other.ballcarried) && (IS_PLAYER(attacker)))
{
other.velocity = other.velocity + normalize(self.velocity) * other.damageforcescale * autocvar_g_balance_nexball_secondary_force;
if(!attacker.ballcarried)
{
LogNB("stole", attacker);
if(!attacker.ballcarried)
{
LogNB("stole", attacker);
- sound(other, CH_TRIGGER, ball.noise2, VOL_BASE, ATTN_NORM);
+ sound(other, CH_TRIGGER, ball.noise2, VOL_BASE, ATTEN_NORM);
DropBall(ball, w_shotorg, W_CalculateProjectileVelocity(self.velocity, w_shotdir * autocvar_g_balance_nexball_primary_speed * mul, FALSE));
DropBall(ball, w_shotorg, W_CalculateProjectileVelocity(self.velocity, w_shotdir * autocvar_g_balance_nexball_primary_speed * mul, FALSE));
-
- setorigin(self.ballcarried, self.origin + self.view_ofs +
- v_forward * autocvar_g_nexball_viewmodel_offset_x +
- v_right * autocvar_g_nexball_viewmodel_offset_y +
- v_up * autocvar_g_nexball_viewmodel_offset_z);
-
+
+ setorigin(self.ballcarried, self.origin + self.view_ofs +
+ v_forward * autocvar_g_nexball_viewmodel_offset_x +
+ v_right * autocvar_g_nexball_viewmodel_offset_y +
+ v_up * autocvar_g_nexball_viewmodel_offset_z);
+
//centerprint(self, sprintf("Lost lock on %s", self.ballcarried.enemy.netname));
self.ballcarried.enemy = world;
}
//centerprint(self, sprintf("Lost lock on %s", self.ballcarried.enemy.netname));
self.ballcarried.enemy = world;
}
//tracebox(self.origin + self.view_ofs, '-2 -2 -2', '2 2 2', self.origin + self.view_ofs + v_forward * autocvar_g_nexball_safepass_maxdist);
crosshair_trace(self);
//tracebox(self.origin + self.view_ofs, '-2 -2 -2', '2 2 2', self.origin + self.view_ofs + v_forward * autocvar_g_nexball_safepass_maxdist);
crosshair_trace(self);
IS_CLIENT(trace_ent) &&
trace_ent.deadflag == DEAD_NO &&
trace_ent.team == self.team &&
vlen(trace_ent.origin - self.origin) <= autocvar_g_nexball_safepass_maxdist )
{
IS_CLIENT(trace_ent) &&
trace_ent.deadflag == DEAD_NO &&
trace_ent.team == self.team &&
vlen(trace_ent.origin - self.origin) <= autocvar_g_nexball_safepass_maxdist )
{
//if(self.ballcarried.enemy != trace_ent)
// centerprint(self, sprintf("Locked to %s", trace_ent.netname));
self.ballcarried.enemy = trace_ent;
self.ballcarried.wait = time + autocvar_g_nexball_safepass_holdtime;
//if(self.ballcarried.enemy != trace_ent)
// centerprint(self, sprintf("Locked to %s", trace_ent.netname));
self.ballcarried.enemy = trace_ent;
self.ballcarried.wait = time + autocvar_g_nexball_safepass_holdtime;
weapon_action(WEP_PORTO, WR_RESETPLAYER);
self.switchweapon = self.weaponentity.switchweapon;
W_SwitchWeapon(self.switchweapon);
weapon_action(WEP_PORTO, WR_RESETPLAYER);
self.switchweapon = self.weaponentity.switchweapon;
W_SwitchWeapon(self.switchweapon);
MUTATOR_HOOKFUNCTION(nexball_SetStartItems)
{
start_items |= IT_UNLIMITED_SUPERWEAPONS; // FIXME BAD BAD BAD BAD HACK, NEXBALL SHOULDN'T ABUSE PORTO'S WEAPON SLOT
MUTATOR_HOOKFUNCTION(nexball_SetStartItems)
{
start_items |= IT_UNLIMITED_SUPERWEAPONS; // FIXME BAD BAD BAD BAD HACK, NEXBALL SHOULDN'T ABUSE PORTO'S WEAPON SLOT