setorigin(self, self.spawnorigin); // make sure it's positioned correctly anyway
self.movetype = MOVETYPE_NONE;
self.think = InitBall;
setorigin(self, self.spawnorigin); // make sure it's positioned correctly anyway
self.movetype = MOVETYPE_NONE;
self.think = InitBall;
ball.think = ResetBall;
if (ball.classname == "nexball_basketball")
ball.touch = football_touch; // better than SUB_Null: football control until the ball gets reset
ball.think = ResetBall;
if (ball.classname == "nexball_basketball")
ball.touch = football_touch; // better than SUB_Null: football control until the ball gets reset
- self.bouncefactor = cvar("g_nexball_basketball_bouncefactor");
- self.bouncestop = cvar("g_nexball_basketball_bouncestop");
+ self.bouncefactor = autocvar_g_nexball_basketball_bouncefactor;
+ self.bouncestop = autocvar_g_nexball_basketball_bouncestop;
- self.bouncefactor = cvar("g_nexball_football_bouncefactor");
- self.bouncestop = cvar("g_nexball_football_bouncestop");
+ self.bouncefactor = autocvar_g_nexball_football_bouncefactor;
+ self.bouncestop = autocvar_g_nexball_football_bouncestop;
if(attacker.team != other.team || g_nexball_basketball_teamsteal)
if((ball = other.ballcarried) && (attacker.classname == "player" || attacker.classname == "gib"))
{
if(attacker.team != other.team || g_nexball_basketball_teamsteal)
if((ball = other.ballcarried) && (attacker.classname == "player" || attacker.classname == "gib"))
{
- mi = cvar("g_nexball_basketball_meter_minpower");
- ma = max(mi, cvar("g_nexball_basketball_meter_maxpower")); // avoid confusion
+ mi = autocvar_g_nexball_basketball_meter_minpower;
+ ma = max(mi, autocvar_g_nexball_basketball_meter_maxpower); // avoid confusion
//One triangle wave period with 1 as max
mul = 2 * mod(t, g_nexball_meter_period) / g_nexball_meter_period;
if (mul > 1)
mul = 2 - mul;
mul = mi + (ma - mi) * mul; // range from the minimal power to the maximal power
}
//One triangle wave period with 1 as max
mul = 2 * mod(t, g_nexball_meter_period) / g_nexball_meter_period;
if (mul > 1)
mul = 2 - mul;
mul = mi + (ma - mi) * mul; // range from the minimal power to the maximal power
}
- DropBall (ball, w_shotorg, W_CalculateProjectileVelocity(self.velocity, w_shotdir * cvar("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));
setsize (missile, '0 0 0', '0 0 0');
setorigin (missile, w_shotorg);
setsize (missile, '0 0 0', '0 0 0');
setorigin (missile, w_shotorg);
missile.angles = vectoangles (missile.velocity);
missile.touch = W_Nexball_Touch;
missile.think = SUB_Remove;
missile.angles = vectoangles (missile.velocity);
missile.touch = W_Nexball_Touch;
missile.think = SUB_Remove;
- if (weapon_prepareattack(0, cvar("g_balance_nexball_primary_refire")))
- if (cvar("g_nexball_basketball_meter"))
+ if (weapon_prepareattack(0, autocvar_g_balance_nexball_primary_refire))
+ if (autocvar_g_nexball_basketball_meter)
}
if (!self.BUTTON_ATCK && self.metertime && self.ballcarried)
{
W_Nexball_Attack(time - self.metertime);
// DropBall or stealing will set metertime back to 0
}
if (!self.BUTTON_ATCK && self.metertime && self.ballcarried)
{
W_Nexball_Attack(time - self.metertime);
// DropBall or stealing will set metertime back to 0