float OtherTeam(float t) //works only if there are two teams on the map!
{
entity e;
- e = find(world, classname, "nexball_team");
+ e = find(NULL, classname, "nexball_team");
if(e.team == t)
e = find(e, classname, "nexball_team");
return e.team;
if(!autocvar_sv_eventlog)
return;
s = strcat(":nexball:", mode);
- if(actor != world)
+ if(actor != NULL)
s = strcat(s, ":", ftos(actor.playerid));
GameLogEcho(s);
}
if(ownr)
{
ownr.effects &= ~autocvar_g_nexball_basketball_effects_default;
- ownr.ballcarried = world;
+ ownr.ballcarried = NULL;
if(ownr.metertime)
{
ownr.metertime = 0;
ball.effects &= ~EF_NOSHADOW;
ball.owner.effects &= ~autocvar_g_nexball_basketball_effects_default;
- setattachment(ball, world, "");
+ setattachment(ball, NULL, "");
setorigin(ball, org);
ball.movetype = MOVETYPE_BOUNCE;
UNSET_ONGROUND(ball);
}
WaypointSprite_Kill(ball.owner.waypointsprite_attachedforcarrier);
- WaypointSprite_Spawn(WP_NbBall, 0, 0, ball, '0 0 64', world, ball.team, ball, waypointsprite_attachedforcarrier, false, RADARICON_FLAGCARRIER); // no health bar please
+ WaypointSprite_Spawn(WP_NbBall, 0, 0, ball, '0 0 64', NULL, ball.team, ball, waypointsprite_attachedforcarrier, false, RADARICON_FLAGCARRIER); // no health bar please
WaypointSprite_UpdateRule(ball.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
- ball.owner.ballcarried = world;
- ball.owner = world;
+ ball.owner.ballcarried = NULL;
+ ball.owner = NULL;
}
void InitBall(entity this)
setthink(this, ResetBall);
this.nextthink = time + autocvar_g_nexball_delay_idle + 3;
this.teamtime = 0;
- this.pusher = world;
+ this.pusher = NULL;
this.team = false;
_sound(this, CH_TRIGGER, this.noise1, VOL_BASE, ATTEN_NORM);
WaypointSprite_Ping(this.waypointsprite_attachedforcarrier);
- LogNB("init", world);
+ LogNB("init", NULL);
}
void ResetBall(entity this)
this.movetype = MOVETYPE_NOCLIP;
this.velocity = '0 0 0'; // just in case?
if(!this.cnt)
- LogNB("resetidle", world);
+ LogNB("resetidle", NULL);
this.cnt = 2;
this.nextthink = time;
}
{
bool t_red = false, t_blue = false, t_yellow = false, t_pink = false;
entity e;
- for(e = world; (e = find(e, classname, "nexball_goal"));)
+ for(e = NULL; (e = find(e, classname, "nexball_goal"));)
{
switch(e.team)
{
void nb_delayedinit(entity this)
{
- if(find(world, classname, "nexball_team") == world)
+ if(find(NULL, classname, "nexball_team") == NULL)
nb_spawnteams();
nb_ScoreRules(nb_teams);
}
entity ball, attacker;
attacker = this.owner;
//this.think = func_null;
- //this.enemy = world;
+ //this.enemy = NULL;
PROJECTILE_TOUCH(this);
if(attacker.team != other.team || autocvar_g_nexball_basketball_teamsteal)
return;
W_SetupShot(actor, false, 4, SND_NB_SHOOT1, CH_WEAPON_A, 0);
- tracebox(w_shotorg, BALL_MINS, BALL_MAXS, w_shotorg, MOVE_WORLDONLY, world);
+ tracebox(w_shotorg, BALL_MINS, BALL_MAXS, w_shotorg, MOVE_WORLDONLY, NULL);
if(trace_startsolid)
{
if(actor.metertime)
if(player.ballcarried.wait < time && player.ballcarried.enemy)
{
//centerprint(player, sprintf("Lost lock on %s", player.ballcarried.enemy.netname));
- player.ballcarried.enemy = world;
+ player.ballcarried.enemy = NULL;
}
*/
radar_showennemies = autocvar_g_nexball_radar_showallplayers;
- InitializeEntity(world, nb_delayedinit, INITPRIO_GAMETYPE);
+ InitializeEntity(NULL, nb_delayedinit, INITPRIO_GAMETYPE);
WEP_NEXBALL.spawnflags &= ~WEP_FLAG_MUTATORBLOCKED;
ActivateTeamplay();