self.nextthink = time + autocvar_g_nexball_delay_idle;
return;
}
- if(other.classname != "player")
+ if not(IS_PLAYER(other))
return;
if(other.health < 1)
return;
football_touch();
return;
}
- if(!self.cnt && other.classname == "player" && (other != self.nb_dropper || time > self.nb_droptime + autocvar_g_nexball_delay_collect))
+ if(!self.cnt && IS_PLAYER(other) && (other != self.nb_dropper || time > self.nb_droptime + autocvar_g_nexball_delay_collect))
{
if(other.health <= 0)
return;
else
otherteam = 0;
- if((isclient = ball.pusher.flags & FL_CLIENT))
+ if((isclient = IS_CLIENT(ball.pusher)))
pname = ball.pusher.netname;
else
pname = "Someone (?)";
{
switch(e.team)
{
- case FL_TEAM_1:
+ case NUM_TEAM_1:
if(!t_r)
{
nb_spawnteam("Red", e.team-1) ;
t_r = 1;
}
break;
- case FL_TEAM_2:
+ case NUM_TEAM_2:
if(!t_b)
{
nb_spawnteam("Blue", e.team-1) ;
t_b = 1;
}
break;
- case FL_TEAM_3:
+ case NUM_TEAM_3:
if(!t_y)
{
nb_spawnteam("Yellow", e.team-1);
t_y = 1;
}
break;
- case FL_TEAM_4:
+ case NUM_TEAM_4:
if(!t_p)
{
nb_spawnteam("Pink", e.team-1) ;
void spawnfunc_nexball_redgoal(void)
{
- self.team = FL_TEAM_1;
+ self.team = NUM_TEAM_1;
SpawnGoal();
}
void spawnfunc_nexball_bluegoal(void)
{
- self.team = FL_TEAM_2;
+ self.team = NUM_TEAM_2;
SpawnGoal();
}
void spawnfunc_nexball_yellowgoal(void)
{
- self.team = FL_TEAM_3;
+ self.team = NUM_TEAM_3;
SpawnGoal();
}
void spawnfunc_nexball_pinkgoal(void)
{
- self.team = FL_TEAM_4;
+ self.team = NUM_TEAM_4;
SpawnGoal();
}
PROJECTILE_TOUCH;
if(attacker.team != other.team || autocvar_g_nexball_basketball_teamsteal)
- if((ball = other.ballcarried) && (attacker.classname == "player"))
+ if((ball = other.ballcarried) && (IS_PLAYER(attacker)))
{
other.velocity = other.velocity + normalize(self.velocity) * other.damageforcescale * autocvar_g_balance_nexball_secondary_force;
other.flags &~= FL_ONGROUND;
precache_sound("misc/typehit.wav");
}
else if(req == WR_SETUP)
- weapon_setup(WEP_PORTO);
- else if(req == WR_SUICIDEMESSAGE)
- {
- w_deathtypestring = "is a weirdo";
- }
- else if(req == WR_KILLMESSAGE)
{
- w_deathtypestring = "got killed by #'s black magic";
+ weapon_setup(WEP_PORTO);
}
// No need to check WR_CHECKAMMO* or WR_AIM, it should always return TRUE
return TRUE;
//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);
if( trace_ent &&
- trace_ent.flags & FL_CLIENT &&
+ 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 )