s/world/NULL/
authorTimePath <andrew.hardaker1995@gmail.com>
Mon, 13 Jun 2016 04:34:40 +0000 (14:34 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Mon, 13 Jun 2016 04:34:40 +0000 (14:34 +1000)
180 files changed:
qcsrc/client/commands/cl_cmd.qc
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/hud/hud_config.qc
qcsrc/client/hud/panel/score.qc
qcsrc/client/main.qc
qcsrc/client/mapvoting.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/view.qc
qcsrc/common/effects/all.qc
qcsrc/common/effects/qc/damageeffects.qc
qcsrc/common/effects/qc/globalsound.qc
qcsrc/common/effects/qc/globalsound.qh
qcsrc/common/effects/qc/lightningarc.qc
qcsrc/common/effects/qc/rubble.qh
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
qcsrc/common/gamemodes/gamemode/onslaught/cl_controlpoint.qc
qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc
qcsrc/common/mapinfo.qc
qcsrc/common/minigames/cl_minigames.qc
qcsrc/common/minigames/cl_minigames.qh
qcsrc/common/minigames/cl_minigames_hud.qc
qcsrc/common/minigames/minigame/bd.qc
qcsrc/common/minigames/minigame/c4.qc
qcsrc/common/minigames/minigame/nmm.qc
qcsrc/common/minigames/minigame/pong.qc
qcsrc/common/minigames/minigame/pp.qc
qcsrc/common/minigames/minigame/ps.qc
qcsrc/common/minigames/minigame/snake.qc
qcsrc/common/minigames/minigame/ttt.qc
qcsrc/common/minigames/minigames.qc
qcsrc/common/minigames/sv_minigames.qc
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/monster/wyvern.qc
qcsrc/common/monsters/spawn.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/mutator/buffs/buffs.qc
qcsrc/common/mutators/mutator/campcheck/campcheck.qc
qcsrc/common/mutators/mutator/instagib/instagib.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/nix/nix.qc
qcsrc/common/mutators/mutator/overkill/rpc.qc
qcsrc/common/mutators/mutator/physical_items/physical_items.qc
qcsrc/common/mutators/mutator/sandbox/sandbox.qc
qcsrc/common/mutators/mutator/spawn_near_teammate/spawn_near_teammate.qc
qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/notifications/all.qc
qcsrc/common/notifications/all.qh
qcsrc/common/physics/movetypes/movetypes.qc
qcsrc/common/physics/movetypes/push.qc
qcsrc/common/physics/movetypes/toss.qc
qcsrc/common/playerstats.qc
qcsrc/common/sounds/all.qc
qcsrc/common/t_items.qc
qcsrc/common/triggers/func/breakable.qc
qcsrc/common/triggers/func/conveyor.qc
qcsrc/common/triggers/func/door.qc
qcsrc/common/triggers/func/pointparticles.qc
qcsrc/common/triggers/func/train.qc
qcsrc/common/triggers/func/vectormamamam.qc
qcsrc/common/triggers/misc/follow.qc
qcsrc/common/triggers/misc/laser.qc
qcsrc/common/triggers/target/music.qc
qcsrc/common/triggers/target/spawn.qc
qcsrc/common/triggers/target/voicescript.qc
qcsrc/common/triggers/teleporters.qc
qcsrc/common/triggers/trigger/disablerelay.qc
qcsrc/common/triggers/trigger/gravity.qc
qcsrc/common/triggers/trigger/hurt.qc
qcsrc/common/triggers/trigger/impulse.qc
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/triggers/trigger/keylock.qc
qcsrc/common/triggers/trigger/relay_activators.qc
qcsrc/common/triggers/trigger/viewloc.qc
qcsrc/common/triggers/triggers.qc
qcsrc/common/turrets/checkpoint.qc
qcsrc/common/turrets/cl_turrets.qc
qcsrc/common/turrets/config.qc
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/turrets/turret/ewheel.qc
qcsrc/common/turrets/turret/flac_weapon.qc
qcsrc/common/turrets/turret/fusionreactor.qc
qcsrc/common/turrets/turret/hellion_weapon.qc
qcsrc/common/turrets/turret/hk_weapon.qc
qcsrc/common/turrets/turret/plasma.qc
qcsrc/common/turrets/turret/plasma_dual.qc
qcsrc/common/turrets/turret/tesla.qc
qcsrc/common/turrets/turret/tesla_weapon.qc
qcsrc/common/turrets/turret/walker.qc
qcsrc/common/turrets/util.qc
qcsrc/common/util.qc
qcsrc/common/vehicles/cl_vehicles.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/bumblebee.qc
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/vehicles/vehicle/raptor.qc
qcsrc/common/vehicles/vehicle/raptor_weapons.qc
qcsrc/common/vehicles/vehicle/spiderbot.qc
qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc
qcsrc/common/viewloc.qc
qcsrc/common/weapons/all.qc
qcsrc/common/weapons/config.qc
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/blaster.qc
qcsrc/common/weapons/weapon/crylink.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/fireball.qc
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/hlac.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/machinegun.qc
qcsrc/common/weapons/weapon/minelayer.qc
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/porto.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/shockwave.qc
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/lib/sortlist.qc
qcsrc/lib/stats.qh
qcsrc/lib/warpzone/common.qc
qcsrc/lib/warpzone/server.qc
qcsrc/server/bot/aim.qc
qcsrc/server/bot/bot.qc
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/havocbot/roles.qc
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/scripting.qc
qcsrc/server/bot/waypoints.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_impulse.qc
qcsrc/server/cl_player.qc
qcsrc/server/command/cmd.qc
qcsrc/server/command/common.qc
qcsrc/server/command/radarmap.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_lights.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_world.qc
qcsrc/server/mapvoting.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/events.qh
qcsrc/server/mutators/mutator/gamemode_assault.qc
qcsrc/server/mutators/mutator/gamemode_ca.qc
qcsrc/server/mutators/mutator/gamemode_ctf.qc
qcsrc/server/mutators/mutator/gamemode_cts.qc
qcsrc/server/mutators/mutator/gamemode_domination.qc
qcsrc/server/mutators/mutator/gamemode_freezetag.qc
qcsrc/server/mutators/mutator/gamemode_invasion.qc
qcsrc/server/mutators/mutator/gamemode_keepaway.qc
qcsrc/server/mutators/mutator/gamemode_keyhunt.qc
qcsrc/server/mutators/mutator/gamemode_lms.qc
qcsrc/server/mutators/mutator/gamemode_race.qc
qcsrc/server/mutators/mutator/gamemode_tdm.qc
qcsrc/server/pathlib/main.qc
qcsrc/server/pathlib/path_waypoint.qc
qcsrc/server/pathlib/utility.qc
qcsrc/server/portals.qc
qcsrc/server/race.qc
qcsrc/server/round_handler.qc
qcsrc/server/round_handler.qh
qcsrc/server/scores.qc
qcsrc/server/scores.qh
qcsrc/server/scores_rules.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/steerlib.qc
qcsrc/server/sv_main.qc
qcsrc/server/t_quake3.qc
qcsrc/server/teamplay.qc
qcsrc/server/weapons/throwing.qc
qcsrc/server/weapons/tracing.qc
qcsrc/server/weapons/weaponstats.qc

index 45444c8..dce058c 100644 (file)
@@ -92,7 +92,7 @@ void LocalCommand_boxparticles(int request, int argc)
                                        if (index <= 0)
                                                own = entitybyindex(-index);
                                        else
-                                               own = findfloat(world, entnum, index);
+                                               own = findfloat(NULL, entnum, index);
                                        vector org_from = stov(argv(3));
                                        vector org_to = stov(argv(4));
                                        vector dir_from = stov(argv(5));
index 35f28bd..30148bd 100644 (file)
@@ -389,7 +389,7 @@ void CSQCPlayer_FallbackFrame_Apply(entity this)
 void CSQCModel_AutoTagIndex_Apply(entity this)
 {
        if(this.tag_entity && wasfreed(this.tag_entity))
-               this.tag_entity = world;
+               this.tag_entity = NULL;
 
        viewloc_SetTags(this);
 
@@ -401,7 +401,7 @@ void CSQCModel_AutoTagIndex_Apply(entity this)
                bool changed = 0;
                if(this.tag_entity.entnum != this.tag_networkentity)
                {
-                       this.tag_entity = findfloat(world, entnum, this.tag_networkentity);
+                       this.tag_entity = findfloat(NULL, entnum, this.tag_networkentity);
                        changed = 1;
                }
 
@@ -431,7 +431,7 @@ void CSQCModel_AutoTagIndex_Apply(entity this)
                                                if(!this.tag_index)
                                                {
                                                        // we need to prevent this from 'appening
-                                                       this.tag_entity = world;
+                                                       this.tag_entity = NULL;
                                                        this.drawmask = 0;
                                                        LOG_TRACE("h_ model lacks weapon attachment, but v_ model is attached to it\n");
                                                }
index 5ffec68..f45a052 100644 (file)
@@ -642,7 +642,7 @@ void HUD_Panel_FirstInDrawQ(float id);
 void reset_tab_panels()
 {
        for (int i = 0; i < hud_panels_COUNT; ++i)
-               tab_panels[i] = world;
+               tab_panels[i] = NULL;
 }
 float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
 {
@@ -706,7 +706,7 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                                highlightedAction = 0;
                                HUD_Panel_FirstInDrawQ(highlightedPanel.panel_id);
                        }
-                       tab_panel = world;
+                       tab_panel = NULL;
                        reset_tab_panels();
                }
        }
@@ -778,7 +778,7 @@ LABEL(find_tab_panel)
                level = floor(tab_panel_pos.y / level_height) * level_height; //starting level
                candidate_pos.x = (!tab_backward) ? vid_conwidth : 0;
                start_posX = tab_panel_pos.x;
-               tab_panel = world;
+               tab_panel = NULL;
                k=0;
                while(++k)
                {
@@ -805,11 +805,11 @@ LABEL(find_tab_panel)
                                reset_tab_panels();
                                if (!old_tab_panel)
                                {
-                                       tab_panel = world;
+                                       tab_panel = NULL;
                                        return true;
                                }
                                starting_panel = old_tab_panel;
-                               old_tab_panel = world;
+                               old_tab_panel = NULL;
                                goto find_tab_panel; //u must find tab_panel!
                        }
                        if (!tab_backward)
@@ -890,7 +890,7 @@ LABEL(find_tab_panel)
                        cvar_set(strcat("hud_panel_", highlightedPanel_backup.panel_name, "_pos"), s);
                        s = strcat(ftos(panel_size_backup.x/vid_conwidth), " ", ftos(panel_size_backup.y/vid_conheight));
                        cvar_set(strcat("hud_panel_", highlightedPanel_backup.panel_name, "_size"), s);
-                       highlightedPanel_backup = world;
+                       highlightedPanel_backup = NULL;
                }
        }
        else if(nPrimary == 's' && hudShiftState & S_CTRL) // save config
@@ -1078,7 +1078,7 @@ void HUD_Panel_Highlight(float allow_move)
                        return;
                }
        }
-       highlightedPanel = world;
+       highlightedPanel = NULL;
        highlightedAction = 0;
 }
 
@@ -1108,7 +1108,7 @@ void HUD_Panel_Mouse()
                        if (tab_panel)
                        {
                                //stop ctrl-tab selection
-                               tab_panel = world;
+                               tab_panel = NULL;
                                reset_tab_panels();
                        }
                        HUD_Panel_Highlight(mouseClicked & S_MOUSE1); // sets highlightedPanel, highlightedAction, panel_click_distance, panel_click_resizeorigin
index 49a8fa5..b07b84e 100644 (file)
@@ -10,7 +10,7 @@ void HUD_UpdatePlayerTeams();
 void HUD_Score_Rankings(vector pos, vector mySize, entity me)
 {
        float score;
-       entity tm = world, pl;
+       entity tm = NULL, pl;
        int SCOREPANEL_MAX_ENTRIES = 6;
        float SCOREPANEL_ASPECTRATIO = 2;
        int entries = bound(1, floor(SCOREPANEL_MAX_ENTRIES * mySize.y/mySize.x * SCOREPANEL_ASPECTRATIO), SCOREPANEL_MAX_ENTRIES);
@@ -170,7 +170,7 @@ void HUD_Score()
                        pl = pl.sort_next;
                if(scores_flags[ps_primary] & SFL_ZERO_IS_WORST)
                        if(pl.scores[ps_primary] == 0)
-                               pl = world;
+                               pl = NULL;
 
                score = me.(scores[ps_primary]);
                timer = TIME_ENCODED_TOSTRING(score);
index b6cca28..c62a72e 100644 (file)
@@ -233,7 +233,7 @@ float SetTeam(entity o, int Team)
                        case NUM_TEAM_4:
                                break;
                        default:
-                               if(GetTeam(Team, false) == world)
+                               if(GetTeam(Team, false) == NULL)
                                {
                                        LOG_TRACEF("trying to switch to unsupported team %d\n", Team);
                                        Team = NUM_SPECTATOR;
@@ -249,7 +249,7 @@ float SetTeam(entity o, int Team)
                        case 0:
                                break;
                        default:
-                               if(GetTeam(Team, false) == world)
+                               if(GetTeam(Team, false) == NULL)
                                {
                                        LOG_TRACEF("trying to switch to unsupported team %d\n", Team);
                                        Team = NUM_SPECTATOR;
@@ -304,7 +304,7 @@ void Playerchecker_Think(entity this)
                                // player disconnected
                                SetTeam(e, -1);
                                RemovePlayer(e);
-                               e.sort_prev = world;
+                               e.sort_prev = NULL;
                                //e.gotscores = 0;
                        }
                }
index 6773bd1..bfc25e9 100644 (file)
@@ -134,7 +134,7 @@ void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string g
 
        string thelabel = mv_desc[id], ts;
        entity last = title;
-       entity next = world;
+       entity next = NULL;
        float nlines = 0;
        if( thelabel != "")
        {
@@ -678,8 +678,8 @@ void MapVote_Init()
        for(i = 0; i < mv_num_maps; ++i )
                mv_flags_start[i] = mv_flags[i];
 
-       // Assume mv_pk3list is world, there should only be 1 mapvote per round
-       mv_pk3list = world; // I'm still paranoid!
+       // Assume mv_pk3list is NULL, there should only be 1 mapvote per round
+       mv_pk3list = NULL; // I'm still paranoid!
 
        for(i = 0; i < mv_num_maps; ++i)
        {
index 8c0bf14..d3b3e46 100644 (file)
@@ -124,7 +124,7 @@ entity GetTeam(int Team, bool add)
        if(teamslots[num])
                return teamslots[num];
        if (!add)
-               return world;
+               return NULL;
        entity tm = new_pure(team);
        tm.team = Team;
        teamslots[num] = tm;
index a7c4b1b..5cb3c18 100644 (file)
@@ -836,7 +836,7 @@ void HitSound()
                        // todo: avoid very long and very short sounds from wave stretching using different sound files? seems unnecessary
                        // todo: normalize sound pressure levels? seems unnecessary
 
-                       sound7(world, CH_INFO, SND(HIT), VOL_BASE, ATTN_NONE, pitch_shift * 100, 0);
+                       sound7(NULL, CH_INFO, SND(HIT), VOL_BASE, ATTN_NONE, pitch_shift * 100, 0);
                }
                unaccounted_damage = 0;
                hitsound_time_prev = time;
@@ -846,7 +846,7 @@ void HitSound()
        float typehit_time = STAT(TYPEHIT_TIME);
        if (COMPARE_INCREASING(typehit_time, typehit_time_prev) > autocvar_cl_hitsound_antispam_time)
        {
-               sound(world, CH_INFO, SND_TYPEHIT, VOL_BASE, ATTN_NONE);
+               sound(NULL, CH_INFO, SND_TYPEHIT, VOL_BASE, ATTN_NONE);
                typehit_time_prev = typehit_time;
        }
 }
@@ -1461,7 +1461,7 @@ void CSQC_UpdateView(float w, float h)
        {
                float vehicle_chase = (hud != HUD_NORMAL && (autocvar_cl_eventchase_vehicle || spectatee_status > 0));
                float ons_roundlost = (gametype == MAPINFO_TYPE_ONSLAUGHT && STAT(ROUNDLOST));
-               entity gen = world;
+               entity gen = NULL;
 
                float vehicle_viewdist = 0;
                vector vehicle_viewofs = '0 0 0';
index 73f1fe6..e69a03f 100644 (file)
@@ -28,7 +28,7 @@ NET_HANDLE(net_effect, bool isNew)
                eff_cnt = ReadByte();
 
        if(eff_trail)
-               WarpZone_TrailParticles(world, particleeffectnum(eff), v, vel);
+               WarpZone_TrailParticles(NULL, particleeffectnum(eff), v, vel);
        else
                pointparticles(eff, v, vel, eff_cnt);
        return true;
index 078083c..c1144d2 100644 (file)
@@ -273,7 +273,7 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew)
 
        if(DEATH_ISVEHICLE(w_deathtype))
        {
-               traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, world);
+               traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, NULL);
                if(trace_plane_normal != '0 0 0')
                        w_backoff = trace_plane_normal;
                else
@@ -347,7 +347,7 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew)
 
        if(DEATH_ISTURRET(w_deathtype))
        {
-               traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, world);
+               traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, NULL);
                if(trace_plane_normal != '0 0 0')
                        w_backoff = trace_plane_normal;
                else
@@ -408,7 +408,7 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew)
                Weapon hitwep = DEATH_WEAPONOF(w_deathtype);
                w_random = prandom();
 
-               traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, world);
+               traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, NULL);
                if(trace_fraction < 1 && hitwep != WEP_VORTEX && hitwep != WEP_VAPORIZER)
                        w_backoff = trace_plane_normal;
                else
index b6ce682..a265323 100644 (file)
                        o.y = ReadCoord();
                        o.z = ReadCoord();
                        // TODO: is this really what we want to be doing? Footsteps that follow the player at head height?
-                       if (who == player_currententnum) e = findfloat(world, entnum, who);  // play at camera position for full volume
+                       if (who == player_currententnum) e = findfloat(NULL, entnum, who);  // play at camera position for full volume
                        else if (e) e.origin = o;
                        if (e)
                        {
                        o.x = ReadCoord();
                        o.y = ReadCoord();
                        o.z = ReadCoord();
-                       if (who == player_currententnum) e = findfloat(world, entnum, who);  // play at camera position for full volume
+                       if (who == player_currententnum) e = findfloat(NULL, entnum, who);  // play at camera position for full volume
                        else if (e) e.origin = o;
                        if (e)
                        {
index d4ec7f9..44925cd 100644 (file)
@@ -132,7 +132,7 @@ entity GetVoiceMessage(string type);
                        entity VM = def; \
                        int voicetype = VM.m_playersoundvt; \
                        bool ownteam = (voicetype == VOICETYPE_TEAMRADIO); \
-                       int flood = Say(this, ownteam, world, msg, true); \
+                       int flood = Say(this, ownteam, NULL, msg, true); \
                        bool fake; \
                        if (IS_SPEC(this) || IS_OBSERVER(this) || flood < 0) fake = true; \
                        else if (flood > 0) fake = false; \
index e7fea83..c1c3bb8 100644 (file)
@@ -59,7 +59,7 @@ void b_make(vector s,vector e, string t,float l,float z)
                int steps = min(16, floor(length / seglength));
                if (steps < 1)
                {
-                       te_lightning1(world, from, to);
+                       te_lightning1(NULL, from, to);
                        return;
                }
 
@@ -73,18 +73,18 @@ void b_make(vector s,vector e, string t,float l,float z)
                                float drift = drifts * (1 - (i / steps)) + drifte * (i / steps);
                                vector dirnew = normalize(direction * (1 - drift) + randomvec() * drift);
                                vector pos = pos_l +  dirnew * steplength;
-                               te_lightning1(world, pos_l, pos);
+                               te_lightning1(NULL, pos_l, pos);
                                // WTF endless recursion if branchfactor is 1.0 (possibly due to adding branchfactor_add). FIXME
                                // if(random() < branchfactor)
                                //     cl_effects_lightningarc(pos, pos + (dirnew * length * 0.25),seglength,drifts,drifte,min(branchfactor + branchfactor_add,1),branchfactor_add);
 
                                pos_l = pos;
                        }
-                       te_lightning1(world, pos_l, to);
+                       te_lightning1(NULL, pos_l, to);
                }
                else
                {
-                       te_lightning1(world, from, to);
+                       te_lightning1(NULL, from, to);
                }
        }
 
@@ -102,7 +102,7 @@ void b_make(vector s,vector e, string t,float l,float z)
 
                if (autocvar_cl_effects_lightningarc_simple)
                {
-                       te_lightning1(world, from, to);
+                       te_lightning1(NULL, from, to);
                }
                else
                {
index 6b36b2c..7848b7b 100644 (file)
@@ -18,7 +18,7 @@ void RubbleLimit(string cname, float limit, void(entity) deleteproc)
        while (1)
        {
                e = findchain(classname, cname);
-               if (e == world) break;
+               if (e == NULL) break;
                // walk the list and count the entities, find the oldest
                // initialize our search with the first entity
                c = 1;
index 1c0fdaa..46b4e03 100644 (file)
@@ -63,7 +63,7 @@ float nexball_mode;
 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;
@@ -87,7 +87,7 @@ void LogNB(string mode, entity actor)
        if(!autocvar_sv_eventlog)
                return;
        s = strcat(":nexball:", mode);
-       if(actor != world)
+       if(actor != NULL)
                s = strcat(s, ":", ftos(actor.playerid));
        GameLogEcho(s);
 }
@@ -150,7 +150,7 @@ void GiveBall(entity plyr, entity ball)
        if(ownr)
        {
                ownr.effects &= ~autocvar_g_nexball_basketball_effects_default;
-               ownr.ballcarried = world;
+               ownr.ballcarried = NULL;
                if(ownr.metertime)
                {
                        ownr.metertime = 0;
@@ -207,7 +207,7 @@ void DropBall(entity ball, vector org, vector vel)
        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);
@@ -226,11 +226,11 @@ void DropBall(entity ball, vector org, vector vel)
        }
 
        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)
@@ -246,11 +246,11 @@ 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)
@@ -264,7 +264,7 @@ 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;
        }
@@ -473,7 +473,7 @@ void nb_spawnteams()
 {
        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)
                {
@@ -511,7 +511,7 @@ void nb_spawnteams()
 
 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);
 }
@@ -735,7 +735,7 @@ void W_Nexball_Touch(entity this)
        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)
@@ -769,7 +769,7 @@ void W_Nexball_Attack(entity actor, float t)
                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)
@@ -968,7 +968,7 @@ MUTATOR_HOOKFUNCTION(nb, PlayerPreThink)
                                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;
                                }
 
 
@@ -1118,7 +1118,7 @@ REGISTER_MUTATOR(nb, g_nexball)
                */
                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();
index 28ac85d..8389b22 100644 (file)
@@ -111,7 +111,7 @@ void cpicon_construct(entity this)
        setmodel(this, MDL_ONS_CP);
        setsize(this, CPICON_MIN, CPICON_MAX);
 
-       if(this.icon_realmodel == world)
+       if(this.icon_realmodel == NULL)
        {
                this.icon_realmodel = spawn();
                setmodel(this.icon_realmodel, MDL_Null);
index 0b99ee0..2c52982 100644 (file)
@@ -416,8 +416,8 @@ void ons_Link_CheckUpdate(entity this)
 
 void ons_DelayedLinkSetup(entity this)
 {
-       this.goalentity = find(world, targetname, this.target);
-       this.enemy = find(world, targetname, this.target2);
+       this.goalentity = find(NULL, targetname, this.target);
+       this.enemy = find(NULL, targetname, this.target2);
        if(!this.goalentity) { objerror(this, "can not find target\n"); }
        if(!this.enemy) { objerror(this, "can not find target2\n"); }
 
@@ -530,12 +530,12 @@ void ons_ControlPoint_Icon_Damage(entity this, entity inflictor, entity attacker
        {
                sound(this, CH_TRIGGER, SND_GRENADE_IMPACT, VOL_BASE, ATTEN_NORM);
                pointparticles(EFFECT_ROCKET_EXPLODE, this.origin, '0 0 0', 1);
-               Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_NUM(this.team, INFO_ONSLAUGHT_CPDESTROYED), this.owner.message, attacker.netname);
+               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(this.team, INFO_ONSLAUGHT_CPDESTROYED), this.owner.message, attacker.netname);
 
                PlayerScore_Add(attacker, SP_ONS_TAKES, 1);
                PlayerScore_Add(attacker, SP_SCORE, 10);
 
-               this.owner.goalentity = world;
+               this.owner.goalentity = NULL;
                this.owner.islinked = false;
                this.owner.iscaptured = false;
                this.owner.team = 0;
@@ -658,14 +658,14 @@ void ons_ControlPoint_Icon_BuildThink(entity this)
 
                if(IS_PLAYER(this.owner.ons_toucher))
                {
-                       Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_ONSLAUGHT_CAPTURE, this.owner.ons_toucher.netname, this.owner.message);
+                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ONSLAUGHT_CAPTURE, this.owner.ons_toucher.netname, this.owner.message);
                        Send_Notification(NOTIF_ALL_EXCEPT, this.owner.ons_toucher, MSG_CENTER, APP_TEAM_NUM(this.owner.ons_toucher.team, CENTER_ONS_CAPTURE), this.owner.message);
                        Send_Notification(NOTIF_ONE, this.owner.ons_toucher, MSG_CENTER, CENTER_ONS_CAPTURE, this.owner.message);
                        PlayerScore_Add(this.owner.ons_toucher, SP_ONS_CAPS, 1);
                        PlayerTeamScore_AddScore(this.owner.ons_toucher, 10);
                }
 
-               this.owner.ons_toucher = world;
+               this.owner.ons_toucher = NULL;
 
                onslaught_updatelinks();
 
@@ -824,14 +824,14 @@ void ons_ControlPoint_Reset(entity this)
        if(this.goalentity)
                remove(this.goalentity);
 
-       this.goalentity = world;
+       this.goalentity = NULL;
        this.team = 0;
        this.colormap = 1024;
        this.iscaptured = false;
        this.islinked = false;
        this.isshielded = true;
        setthink(this, ons_ControlPoint_Think);
-       this.ons_toucher = world;
+       this.ons_toucher = NULL;
        this.nextthink = time + ONS_CP_THINKRATE;
        setmodel_fixsize(this, MDL_ONS_CP_PAD1);
 
@@ -978,10 +978,10 @@ void ons_GeneratorDamage(entity this, entity inflictor, entity attacker, float d
        else
        {
                if (attacker == this)
-                       Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_NUM(this.team, INFO_ONSLAUGHT_GENDESTROYED_OVERTIME));
+                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(this.team, INFO_ONSLAUGHT_GENDESTROYED_OVERTIME));
                else
                {
-                       Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_NUM(this.team, INFO_ONSLAUGHT_GENDESTROYED));
+                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(this.team, INFO_ONSLAUGHT_GENDESTROYED));
                        PlayerScore_Add(attacker, SP_SCORE, 100);
                }
                this.iscaptured = false;
@@ -1194,8 +1194,8 @@ bool Onslaught_CheckWinner()
 
                if (!wpforenemy_announced)
                {
-                       Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_OVERTIME_CONTROLPOINT);
-                       sound(world, CH_INFO, SND_ONS_GENERATOR_DECAY, VOL_BASE, ATTEN_NONE);
+                       Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_OVERTIME_CONTROLPOINT);
+                       sound(NULL, CH_INFO, SND_ONS_GENERATOR_DECAY, VOL_BASE, ATTEN_NONE);
 
                        wpforenemy_announced = true;
                }
@@ -1238,14 +1238,14 @@ bool Onslaught_CheckWinner()
 
        if(winner_team > 0)
        {
-               Send_Notification(NOTIF_ALL, world, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN));
-               Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN));
+               Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN));
+               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN));
                TeamScore_AddToTeam(winner_team, ST_ONS_CAPS, +1);
        }
        else if(winner_team == -1)
        {
-               Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_ROUND_TIED);
-               Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_ROUND_TIED);
+               Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_TIED);
+               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_TIED);
        }
 
        ons_stalemate = false;
@@ -1395,7 +1395,7 @@ void havocbot_goalrating_ons_controlpoints_attack(entity this, float ratingscale
 
        // We'll consider only the best case
        bestvalue = 99999999999;
-       cp = world;
+       cp = NULL;
        for(cp1 = ons_worldcplist; cp1; cp1 = cp1.ons_worldcpnext)
        {
                if (!cp1.wpconsidered)
@@ -1419,7 +1419,7 @@ void havocbot_goalrating_ons_controlpoints_attack(entity this, float ratingscale
                // Should be attacked
                // Rate waypoints near it
                found = false;
-               best = world;
+               best = NULL;
                bestvalue = 99999999999;
                for(radius=0; radius<1000 && !found; radius+=500)
                {
@@ -1492,7 +1492,7 @@ bool havocbot_goalrating_ons_generator_attack(entity this, float ratingscale)
                // Should be attacked
                // Rate waypoints near it
                found = false;
-               bestwp = world;
+               bestwp = NULL;
                best = 99999999999;
 
                for(wp=findradius(g.origin,400); wp; wp=wp.chain)
@@ -1584,7 +1584,7 @@ void havocbot_ons_reset_role(entity this)
        if(IS_DEAD(this))
                return;
 
-       this.havocbot_ons_target = world;
+       this.havocbot_ons_target = NULL;
 
        // TODO: Defend control points or generator if necessary
 
@@ -1598,14 +1598,14 @@ void havocbot_ons_reset_role(entity this)
  */
 entity ons_Nearest_ControlPoint(entity this, vector pos, float max_dist)
 {
-       entity tmp_entity, closest_target = world;
+       entity tmp_entity, closest_target = NULL;
        tmp_entity = findchain(classname, "onslaught_controlpoint");
        while(tmp_entity)
        {
                if(SAME_TEAM(tmp_entity, this))
                if(tmp_entity.iscaptured)
                if(max_dist <= 0 || vdist(tmp_entity.origin - pos, <=, max_dist))
-               if(vlen2(tmp_entity.origin - pos) <= vlen2(closest_target.origin - pos) || closest_target == world)
+               if(vlen2(tmp_entity.origin - pos) <= vlen2(closest_target.origin - pos) || closest_target == NULL)
                        closest_target = tmp_entity;
                tmp_entity = tmp_entity.chain;
        }
@@ -1614,7 +1614,7 @@ entity ons_Nearest_ControlPoint(entity this, vector pos, float max_dist)
        {
                if(SAME_TEAM(tmp_entity, this))
                if(max_dist <= 0 || vdist(tmp_entity.origin - pos, <, max_dist))
-               if(vlen2(tmp_entity.origin - pos) <= vlen2(closest_target.origin - pos) || closest_target == world)
+               if(vlen2(tmp_entity.origin - pos) <= vlen2(closest_target.origin - pos) || closest_target == NULL)
                        closest_target = tmp_entity;
                tmp_entity = tmp_entity.chain;
        }
@@ -1629,7 +1629,7 @@ entity ons_Nearest_ControlPoint(entity this, vector pos, float max_dist)
  */
 entity ons_Nearest_ControlPoint_2D(entity this, vector pos, float max_dist)
 {
-       entity tmp_entity, closest_target = world;
+       entity tmp_entity, closest_target = NULL;
        vector delta;
        float smallest_distance = 0, distance;
 
@@ -1643,7 +1643,7 @@ entity ons_Nearest_ControlPoint_2D(entity this, vector pos, float max_dist)
                if(SAME_TEAM(tmp_entity, this))
                if(tmp_entity.iscaptured)
                if(max_dist <= 0 || distance <= max_dist)
-               if(closest_target == world || distance <= smallest_distance )
+               if(closest_target == NULL || distance <= smallest_distance )
                {
                        closest_target = tmp_entity;
                        smallest_distance = distance;
@@ -1660,7 +1660,7 @@ entity ons_Nearest_ControlPoint_2D(entity this, vector pos, float max_dist)
 
                if(SAME_TEAM(tmp_entity, this))
                if(max_dist <= 0 || distance <= max_dist)
-               if(closest_target == world || distance <= smallest_distance )
+               if(closest_target == NULL || distance <= smallest_distance )
                {
                        closest_target = tmp_entity;
                        smallest_distance = distance;
@@ -1726,7 +1726,7 @@ bool ons_Teleport(entity player, entity tele_target, float range, bool tele_effe
                tracebox(loc, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), loc, MOVE_NORMAL, player);
                if(trace_fraction == 1.0 && !trace_startsolid)
                {
-                       traceline(tele_target.origin, loc, MOVE_NOMONSTERS, tele_target); // double check to make sure we're not spawning outside the world
+                       traceline(tele_target.origin, loc, MOVE_NOMONSTERS, tele_target); // double check to make sure we're not spawning outside the NULL
                        if(trace_fraction == 1.0 && !trace_startsolid)
                        {
                                if ( tele_effects )
@@ -1804,7 +1804,7 @@ MUTATOR_HOOKFUNCTION(ons, PlayerSpawn)
        if ( player.ons_spawn_by )
        if ( ons_Teleport(player,player.ons_spawn_by,autocvar_g_onslaught_teleport_radius,false) )
        {
-               player.ons_spawn_by = world;
+               player.ons_spawn_by = NULL;
                return false;
        }
 
@@ -1812,7 +1812,7 @@ MUTATOR_HOOKFUNCTION(ons, PlayerSpawn)
        if(random() <= autocvar_g_onslaught_spawn_at_controlpoints_chance)
        {
                float random_target = autocvar_g_onslaught_spawn_at_controlpoints_random;
-               entity tmp_entity, closest_target = world;
+               entity tmp_entity, closest_target = NULL;
                vector spawn_loc = player.ons_deathloc;
 
                // new joining player or round reset, don't bother checking
@@ -1825,7 +1825,7 @@ MUTATOR_HOOKFUNCTION(ons, PlayerSpawn)
                        if(SAME_TEAM(tmp_entity, player))
                        if(random_target)
                                RandomSelection_Add(tmp_entity, 0, string_null, 1, 1);
-                       else if(vlen2(tmp_entity.origin - spawn_loc) <= vlen2(closest_target.origin - spawn_loc) || closest_target == world)
+                       else if(vlen2(tmp_entity.origin - spawn_loc) <= vlen2(closest_target.origin - spawn_loc) || closest_target == NULL)
                                closest_target = tmp_entity;
                }
 
@@ -1844,7 +1844,7 @@ MUTATOR_HOOKFUNCTION(ons, PlayerSpawn)
                                tracebox(loc, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), loc, MOVE_NORMAL, player);
                                if(trace_fraction == 1.0 && !trace_startsolid)
                                {
-                                       traceline(closest_target.origin, loc, MOVE_NOMONSTERS, closest_target); // double check to make sure we're not spawning outside the world
+                                       traceline(closest_target.origin, loc, MOVE_NOMONSTERS, closest_target); // double check to make sure we're not spawning outside the NULL
                                        if(trace_fraction == 1.0 && !trace_startsolid)
                                        {
                                                setorigin(player, loc);
@@ -1860,7 +1860,7 @@ MUTATOR_HOOKFUNCTION(ons, PlayerSpawn)
        if(random() <= autocvar_g_onslaught_spawn_at_generator_chance)
        {
                float random_target = autocvar_g_onslaught_spawn_at_generator_random;
-               entity tmp_entity, closest_target = world;
+               entity tmp_entity, closest_target = NULL;
                vector spawn_loc = player.ons_deathloc;
 
                // new joining player or round reset, don't bother checking
@@ -1875,7 +1875,7 @@ MUTATOR_HOOKFUNCTION(ons, PlayerSpawn)
                        else
                        {
                                if(SAME_TEAM(tmp_entity, player))
-                               if(vlen2(tmp_entity.origin - spawn_loc) <= vlen2(closest_target.origin - spawn_loc) || closest_target == world)
+                               if(vlen2(tmp_entity.origin - spawn_loc) <= vlen2(closest_target.origin - spawn_loc) || closest_target == NULL)
                                        closest_target = tmp_entity;
                        }
                }
@@ -1895,7 +1895,7 @@ MUTATOR_HOOKFUNCTION(ons, PlayerSpawn)
                                tracebox(loc, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), loc, MOVE_NORMAL, player);
                                if(trace_fraction == 1.0 && !trace_startsolid)
                                {
-                                       traceline(closest_target.origin, loc, MOVE_NOMONSTERS, closest_target); // double check to make sure we're not spawning outside the world
+                                       traceline(closest_target.origin, loc, MOVE_NOMONSTERS, closest_target); // double check to make sure we're not spawning outside the NULL
                                        if(trace_fraction == 1.0 && !trace_startsolid)
                                        {
                                                setorigin(player, loc);
@@ -1936,8 +1936,8 @@ MUTATOR_HOOKFUNCTION(ons, MonsterMove)
 {
        entity mon = M_ARGV(0, entity);
 
-       entity e = find(world, targetname, mon.target);
-       if (e != world)
+       entity e = find(NULL, targetname, mon.target);
+       if (e != NULL)
                mon.team = e.team;
 }
 
@@ -1949,8 +1949,8 @@ void ons_MonsterSpawn_Delayed(entity this)
 
        if(own.targetname)
        {
-               entity e = find(world, target, own.targetname);
-               if(e != world)
+               entity e = find(NULL, target, own.targetname);
+               if(e != NULL)
                {
                        own.team = e.team;
 
@@ -1978,8 +1978,8 @@ void ons_TurretSpawn_Delayed(entity this)
 
        if(own.targetname)
        {
-               entity e = find(world, target, own.targetname);
-               if(e != world)
+               entity e = find(NULL, target, own.targetname);
+               if(e != NULL)
                {
                        own.team = e.team;
                        own.active = ACTIVE_NOT;
@@ -2069,7 +2069,7 @@ MUTATOR_HOOKFUNCTION(ons, SV_ParseClientCommand)
 
                                entity closest_target = ons_Nearest_ControlPoint_2D(player, pos, autocvar_g_onslaught_click_radius);
 
-                               if ( closest_target == world )
+                               if ( closest_target == NULL )
                                {
                                        sprint(player, "\nNo control point found\n");
                                        return true;
@@ -2175,8 +2175,8 @@ MUTATOR_HOOKFUNCTION(ons, TurretThink)
        // ONS uses somewhat backwards linking.
        if(turret.target)
        {
-               entity e = find(world, targetname, turret.target);
-               if (e != world)
+               entity e = find(NULL, targetname, turret.target);
+               if (e != NULL)
                        turret.team = e.team;
        }
 
@@ -2250,7 +2250,7 @@ spawnfunc(onslaught_generator)
 // scoreboard setup
 void ons_ScoreRules()
 {
-       CheckAllowedTeams(world);
+       CheckAllowedTeams(NULL);
        ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), SFL_SORT_PRIO_PRIMARY, 0, true);
        ScoreInfo_SetLabel_TeamScore  (ST_ONS_CAPS,     "destroyed", SFL_SORT_PRIO_PRIMARY);
        ScoreInfo_SetLabel_PlayerScore(SP_ONS_CAPS,     "caps",      SFL_SORT_PRIO_SECONDARY);
@@ -2271,7 +2271,7 @@ void ons_Initialize()
        g_onslaught = true;
        ons_captureshield_force = autocvar_g_onslaught_shield_force;
 
-       InitializeEntity(world, ons_DelayedInit, INITPRIO_GAMETYPE);
+       InitializeEntity(NULL, ons_DelayedInit, INITPRIO_GAMETYPE);
 }
 
 #endif
index 447e773..2ec902f 100644 (file)
@@ -178,7 +178,7 @@ float MapInfo_FilterGametype(int pGametype, int pFeatures, int pFlagsRequired, i
        MapInfo_ClearTemps();
 
        // sometimes the glob isn't sorted nicely, so fix it here...
-       heapsort(MapInfo_count, _MapInfo_FilterList_swap, _MapInfo_FilterList_cmp, world);
+       heapsort(MapInfo_count, _MapInfo_FilterList_swap, _MapInfo_FilterList_cmp, NULL);
 
        return 1;
 }
@@ -206,7 +206,7 @@ void MapInfo_FilterString(string sf)
        MapInfo_ClearTemps();
 
        // sometimes the glob isn't sorted nicely, so fix it here...
-       heapsort(MapInfo_count, _MapInfo_FilterList_swap, _MapInfo_FilterList_cmp, world);
+       heapsort(MapInfo_count, _MapInfo_FilterList_swap, _MapInfo_FilterList_cmp, NULL);
 }
 
 void MapInfo_Filter_Free()
index bff2b0a..3d3ef42 100644 (file)
@@ -86,15 +86,15 @@ void deactivate_minigame()
                return;
 
        active_minigame.minigame_event(active_minigame,"deactivate");
-       entity e = world;
+       entity e = NULL;
        while( (e = findentity(e, owner, active_minigame)) )
                if ( e.minigame_autoclean )
                {
                        minigame_autoclean_entity(e);
                }
 
-       minigame_self = world;
-       active_minigame = world;
+       minigame_self = NULL;
+       active_minigame = NULL;
 
        if ( auto_close_minigamemenu )
        {
@@ -134,7 +134,7 @@ void activate_minigame(entity minigame)
        }
 
        if ( minigame_self.owner != minigame )
-               minigame_self = world;
+               minigame_self = NULL;
        active_minigame = minigame;
        active_minigame.minigame_event(active_minigame,"activate");
 
@@ -169,7 +169,7 @@ string ReadString_Zoned() { return strzone(ReadString_Raw()); }
 void minigame_read_owner(entity this)
 {
        string owner_name = ReadString_Raw();
-       this.owner = world;
+       this.owner = NULL;
        do
                this.owner = find(this.owner,netname,owner_name);
        while ( this.owner && this.owner.classname != "minigame" );
@@ -185,7 +185,7 @@ NET_HANDLE(ENT_CLIENT_MINIGAME, bool isnew)
                this.netname = ReadString_Zoned();
        }
 
-       entity minigame_ent = world;
+       entity minigame_ent = NULL;
 
        if ( this.classname == "minigame" )
        {
index 4359dba..cc24d4b 100644 (file)
@@ -88,7 +88,7 @@ entity minigame_self;
 // Whethere there's an active minigame
 float minigame_isactive()
 {
-       return active_minigame != world;
+       return active_minigame != NULL;
 }
 
 // Execute a minigame command
@@ -107,7 +107,7 @@ void HUD_MinigameMenu_CustomEntry(entity parent, string message, string event_ar
 
 
 #define FOREACH_MINIGAME_ENTITY(entityvar) \
-       entityvar=world; \
+       entityvar=NULL; \
        while( (entityvar = findentity(entityvar,owner,active_minigame)) )
 
 
index 6fc2400..f64ed44 100644 (file)
@@ -25,7 +25,7 @@ bool HUD_mouse_over(entity somepanel)
 // Draws the minigame game board
 void HUD_MinigameBoard ()
 {
-       entity hud_minigame = world;
+       entity hud_minigame = NULL;
 
        if(!autocvar__hud_configure)
                hud_minigame = active_minigame.descriptor;
@@ -51,7 +51,7 @@ void HUD_MinigameBoard ()
 // Draws the minigame status panel
 void HUD_MinigameStatus ()
 {
-       entity hud_minigame = world;
+       entity hud_minigame = NULL;
 
        if(!autocvar__hud_configure)
                hud_minigame = active_minigame.descriptor;
@@ -141,7 +141,7 @@ void HUD_MinigameMenu_EraseEntry ( entity e )
                HUD_MinigameMenu_last_entry = e.list_prev;
 
        if ( HUD_MinigameMenu_activeitem == e )
-               HUD_MinigameMenu_activeitem = world;
+               HUD_MinigameMenu_activeitem = NULL;
 
        remove(e);
 }
@@ -186,9 +186,9 @@ bool HUD_MinigameMenu_Click_ExpandCollapse(entity this)
        {
                if ( HUD_MinigameMenu_activeitem &&
                                HUD_MinigameMenu_activeitem.owner == this )
-                       HUD_MinigameMenu_activeitem = world;
+                       HUD_MinigameMenu_activeitem = NULL;
                this.flags &= ~2;
-               for ( e = this.list_next; e != world && e.owner == this; e = this.list_next )
+               for ( e = this.list_next; e != NULL && e.owner == this; e = this.list_next )
                {
                        if ( e.flags & 2 )
                                HUD_MinigameMenu_Click(e);
@@ -202,7 +202,7 @@ bool HUD_MinigameMenu_Click_ExpandCollapse(entity this)
        }
        else
        {
-               for ( e = HUD_MinigameMenu_entries; e != world; e = e.list_next )
+               for ( e = HUD_MinigameMenu_entries; e != NULL; e = e.list_next )
                {
                        if ( e.flags & 2 && e.origin_x == this.origin_x)
                                HUD_MinigameMenu_Click(e);
@@ -244,7 +244,7 @@ void HUD_MinigameMenu_ClickJoin(entity this, entity actor, entity trigger)
 {
        if ( HUD_MinigameMenu_Click_ExpandCollapse(this) )
        {
-               entity e = world;
+               entity e = NULL;
                entity curr;
                entity prev = this;
                while( (e = find(e,classname,"minigame")) )
@@ -291,7 +291,7 @@ void HUD_MinigameMenu_ClickInvite(entity this, entity actor, entity trigger)
                for(int i = 0; i < maxclients; ++i)
                {
                        if ( player_localnum != i && playerslots[i] && entcs_GetName(i) != "" &&
-                               !findfloat(world,minigame_playerslot,i+1) && playerslots[i].ping )
+                               !findfloat(NULL,minigame_playerslot,i+1) && playerslots[i].ping )
                        {
                                e = HUD_MinigameMenu_SpawnSubEntry(
                                        strzone(entcs_GetName(i)), HUD_MinigameMenu_ClickInvite_Entry,
@@ -348,14 +348,14 @@ void HUD_MinigameMenu_Close(entity this, entity actor, entity trigger)
        if ( HUD_MinigameMenu_IsOpened() )
        {
                entity e, p;
-               for ( e = HUD_MinigameMenu_entries; e != world; e = p )
+               for ( e = HUD_MinigameMenu_entries; e != NULL; e = p )
                {
                        p = e.list_next;
                        remove(e);
                }
-               HUD_MinigameMenu_entries = world;
-               HUD_MinigameMenu_last_entry = world;
-               HUD_MinigameMenu_activeitem = world;
+               HUD_MinigameMenu_entries = NULL;
+               HUD_MinigameMenu_last_entry = NULL;
+               HUD_MinigameMenu_activeitem = NULL;
                if(autocvar_hud_cursormode)
                if ( !autocvar__hud_configure )
                        setcursormode(0);
@@ -368,7 +368,7 @@ void HUD_MinigameMenu_CurrentButton()
        entity e;
        if ( active_minigame )
        {
-               for ( e = HUD_MinigameMenu_last_entry; e != world; e = e.list_prev )
+               for ( e = HUD_MinigameMenu_last_entry; e != NULL; e = e.list_prev )
                        if ( e.classname == "hud_minigamemenu_exit" )
                        {
                                HUD_MinigameMenu_EraseEntry(e);
@@ -384,7 +384,7 @@ void HUD_MinigameMenu_CurrentButton()
        else
        {
                entity p;
-               for ( e = HUD_MinigameMenu_last_entry; e != world; e = p.list_prev )
+               for ( e = HUD_MinigameMenu_last_entry; e != NULL; e = p.list_prev )
                {
                        p = e;
                        if ( e.classname == "hud_minigamemenu_current" )
@@ -396,7 +396,7 @@ void HUD_MinigameMenu_CurrentButton()
                                break;
                        }
                }
-               for ( e = HUD_MinigameMenu_last_entry; e != world; e = e.list_prev )
+               for ( e = HUD_MinigameMenu_last_entry; e != NULL; e = e.list_prev )
                        if ( e.classname == "hud_minigamemenu_exit" )
                                return;
                entity exit = HUD_MinigameMenu_SpawnEntry(
@@ -418,7 +418,7 @@ void HUD_MinigameMenu_Open()
                        _("Join"),'0 0 0',hud_fontsize*1.5,'0.7 0.84 1', HUD_MinigameMenu_ClickJoin),
                        HUD_MinigameMenu_last_entry );
                HUD_MinigameMenu_CurrentButton();
-               HUD_MinigameMenu_activeitem = world;
+               HUD_MinigameMenu_activeitem = NULL;
                if(autocvar_hud_cursormode)
                        setcursormode(1);
        }
@@ -441,9 +441,9 @@ void HUD_MinigameMenu_MouseInput()
 
        panel_pos_y += hud_fontsize_y*2;
 
-       HUD_MinigameMenu_activeitem = world;
+       HUD_MinigameMenu_activeitem = NULL;
        vector sz;
-       for ( e = HUD_MinigameMenu_entries; e != world; e = e.list_next )
+       for ( e = HUD_MinigameMenu_entries; e != NULL; e = e.list_next )
        {
                sz = eX*panel_size_x + eY*e.size_y;
                if ( e.model )
@@ -493,7 +493,7 @@ void HUD_MinigameMenu ()
        vector offset;
        float itemh;
        vector imgsz = '22 22 0'; // NOTE: if changed, edit where HUD_MinigameMenu_activeitem is selected
-       for ( entity e = HUD_MinigameMenu_entries; e != world; e = e.list_next )
+       for ( entity e = HUD_MinigameMenu_entries; e != NULL; e = e.list_next )
        {
                color = e.colormod;
 
index 3483f93..db25c29 100644 (file)
@@ -46,11 +46,11 @@ string autocvar_sv_minigames_bulldozer_startlevel = "level1";
 // find same game piece given its tile name
 entity bd_find_piece(entity minig, string tile, bool check_target)
 {
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minig) ) )
                if ( e.classname == "minigame_board_piece" && e.netname == tile && ((check_target) ? e.bd_tiletype == BD_TILE_TARGET : e.bd_tiletype != BD_TILE_TARGET) )
                        return e;
-       return world;
+       return NULL;
 }
 
 // check if the tile name is valid (15x15 grid)
@@ -65,17 +65,17 @@ bool bd_valid_tile(string tile)
 
 entity bd_find_dozer(entity minig)
 {
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minig) ) )
                if ( e.classname == "minigame_board_piece" && e.bd_tiletype == BD_TILE_DOZER )
                        return e;
-       return world;
+       return NULL;
 }
 
 void bd_check_winner(entity minig)
 {
        int total = 0, valid = 0;
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minig) ) )
                if ( e.classname == "minigame_board_piece" && e.bd_tiletype == BD_TILE_TARGET )
                {
@@ -192,7 +192,7 @@ void bd_move(entity minigame, entity player, string dir)
                        int dy = bound(-1, dys, 1);
 
                        int moved = 0;
-                       entity e = world;
+                       entity e = NULL;
                        while ( ( e = findentity(e,owner,minigame) ) )
                                if ( e.classname == "minigame_board_piece" && e.bd_tiletype == BD_TILE_DOZER )
                                {
@@ -375,7 +375,7 @@ void bd_reset_moves(entity minigame)
 #ifdef SVQC
        for(e = minigame.minigame_players; e; e = e.list_next)
 #elif defined(CSQC)
-       e = world;
+       e = NULL;
        while( (e = findentity(e,owner,minigame)) )
                if ( e.classname == "minigame_player" )
 #endif
@@ -388,7 +388,7 @@ void bd_reset_moves(entity minigame)
 void bd_load_level(entity minigame);
 void bd_setup_pieces(entity minigame)
 {
-       entity e = world;
+       entity e = NULL;
        while( (e = findentity(e, owner, minigame)) )
                if(e.classname == "minigame_board_piece")
                {
@@ -503,7 +503,7 @@ bool bd_save_level(entity minigame)
        if(minigame.bd_levelname && minigame.bd_levelname != "")
        {
                int target_count = 0, boulder_count = 0;
-               entity piece = world;
+               entity piece = NULL;
                while((piece = findentity(piece,owner,minigame)))
                if(piece.classname == "minigame_board_piece")
                        if(piece.bd_tiletype == BD_TILE_BOULDER)
@@ -528,7 +528,7 @@ bool bd_save_level(entity minigame)
                if(minigame.bd_nextlevel && minigame.bd_nextlevel != "" && fexists(strcat("minigames/bulldozer/storage_", minigame.bd_nextlevel, ".txt")))
                        fputs(file_get, strcat("nextlevel = \"", minigame.bd_nextlevel, "\"\n"));
 
-               entity e = world;
+               entity e = NULL;
                while ( ( e = findentity(e,owner,minigame) ) )
                if ( e.classname == "minigame_board_piece" )
                {
@@ -626,7 +626,7 @@ int bd_server_event(entity minigame, string event, ...)
                }
                case "end":
                {
-                       entity e = world;
+                       entity e = NULL;
                        while( (e = findentity(e, owner, minigame)) )
                        if(e.classname == "minigame_board_piece")
                        {
@@ -753,13 +753,13 @@ void bd_hud_board(vector pos, vector mySize)
                {
                        if(e.bd_tiletype == BD_TILE_TARGET)
                        {
-                               e.bd_enemy = world;
+                               e.bd_enemy = NULL;
                                e.bd_enemy = bd_find_piece(active_minigame, e.netname, false);
                        }
                        else if(e.bd_tiletype == BD_TILE_BOULDER)
                        {
                                e.bd_hide = false; // reset either way
-                               e.bd_hide = ((bd_find_piece(active_minigame, e.netname, true)) != world);
+                               e.bd_hide = ((bd_find_piece(active_minigame, e.netname, true)) != NULL);
                        }
                }
        }
index 9b9d570..3c2beac 100644 (file)
@@ -24,11 +24,11 @@ const int C4_TEAMS = 2;
 // find connect 4 piece given its tile name
 entity c4_find_piece(entity minig, string tile)
 {
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minig) ) )
                if ( e.classname == "minigame_board_piece" && e.netname == tile )
                        return e;
-       return world;
+       return NULL;
 }
 
 // Checks if the given piece completes a row
@@ -196,7 +196,7 @@ int c4_server_event(entity minigame, string event, ...)
                }
                case "end":
                {
-                       entity e = world;
+                       entity e = NULL;
                        while( (e = findentity(e, owner, minigame)) )
                        if(e.classname == "minigame_board_piece")
                        {
index 2e3ee10..8f8e3da 100644 (file)
@@ -116,7 +116,7 @@ void nmm_spawn_tile_square( entity minig, int offset, int skip )
 // Remove tiles of a NMM minigame
 void nmm_kill_tiles(entity minig)
 {
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minig) ) )
                if ( e.classname == "minigame_nmm_tile" )
                {
@@ -136,11 +136,11 @@ void nmm_init_tiles(entity minig)
 // Find a tile by its id
 entity nmm_find_tile(entity minig, string id)
 {
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minig) ) )
                if ( e.classname == "minigame_nmm_tile" && e.netname == id )
                        return e;
-       return world;
+       return NULL;
 }
 
 // Check whether two tiles are adjacent
@@ -157,7 +157,7 @@ bool nmm_tile_adjacent(entity tile1, entity tile2)
 // Returns 1 if there is at least 1 free adjacent tile
 bool nmm_tile_canmove(entity tile)
 {
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,tile.owner) ) )
                if ( e.classname == "minigame_nmm_tile" && !e.nmm_tile_piece
                                && nmm_tile_adjacent(e,tile) )
@@ -198,14 +198,14 @@ entity nmm_find_piece(entity start, entity minigame, int teamn, int pieceflags)
                if ( e.classname == "minigame_board_piece" &&
                                (e.minigame_flags & pieceflags) && e.team == teamn )
                        return e;
-       return world;
+       return NULL;
 }
 
 // Count NMM pieces matching flags and team number
 int nmm_count_pieces(entity minigame, int teamn, int pieceflags)
 {
        int n = 0;
-       entity e = world;
+       entity e = NULL;
        while (( e = nmm_find_piece(e,minigame, teamn, pieceflags) ))
                n++;
        return n;
@@ -251,8 +251,8 @@ int nmm_server_event(entity minigame, string event, ...)
        {
                entity e = ...(0,entity);
                int argc = ...(1,int);
-               entity tile = world;
-               entity piece = world;
+               entity tile = NULL;
+               entity piece = NULL;
                bool move_ok = false;
 
                if ( e && argc >= 2 && argv(0) == "move" &&
@@ -265,7 +265,7 @@ int nmm_server_event(entity minigame, string event, ...)
                        }
                        else if ( minigame.minigame_flags & NMM_TURN_PLACE )
                        {
-                               piece = nmm_find_piece(world,minigame,e.team,NMM_PIECE_HOME);
+                               piece = nmm_find_piece(NULL,minigame,e.team,NMM_PIECE_HOME);
                                if ( !tile.nmm_tile_piece && piece )
                                {
                                        tile.nmm_tile_piece = piece;
@@ -283,7 +283,7 @@ int nmm_server_event(entity minigame, string event, ...)
                                        entity tile2 = nmm_find_tile(minigame,argv(2));
                                        if ( tile2 && nmm_tile_adjacent(tile,tile2) && !tile2.nmm_tile_piece )
                                        {
-                                               tile.nmm_tile_piece = world;
+                                               tile.nmm_tile_piece = NULL;
                                                tile2.nmm_tile_piece = piece;
                                                piece.origin = tile2.origin;
                                                piece.SendFlags |= MINIG_SF_UPDATE;
@@ -301,7 +301,7 @@ int nmm_server_event(entity minigame, string event, ...)
                                        entity tile2 = nmm_find_tile(minigame,argv(2));
                                        if ( tile2 && !tile2.nmm_tile_piece )
                                        {
-                                               tile.nmm_tile_piece = world;
+                                               tile.nmm_tile_piece = NULL;
                                                tile2.nmm_tile_piece = piece;
                                                piece.origin = tile2.origin;
                                                piece.SendFlags |= MINIG_SF_UPDATE;
@@ -316,7 +316,7 @@ int nmm_server_event(entity minigame, string event, ...)
                                piece = tile.nmm_tile_piece;
                                if ( piece && piece.nmm_tile_piece.team != e.team )
                                {
-                                       tile.nmm_tile_piece = world;
+                                       tile.nmm_tile_piece = NULL;
                                        piece.minigame_flags = NMM_PIECE_DEAD;
                                        piece.SendFlags |= MINIG_SF_UPDATE;
                                        move_ok = true;
@@ -337,7 +337,7 @@ int nmm_server_event(entity minigame, string event, ...)
                                {
                                        minigame.minigame_flags = NMM_TURN_TAKE|e.team;
                                        int takemill = NMM_TURN_TAKEANY;
-                                       entity f = world;
+                                       entity f = NULL;
                                        while ( ( f = findentity(f,owner,minigame) ) )
                                                if ( f.classname == "minigame_nmm_tile" && f.nmm_tile_piece  &&
                                                                f.nmm_tile_piece.team == nextteam && !nmm_in_mill(f) )
@@ -349,14 +349,14 @@ int nmm_server_event(entity minigame, string event, ...)
                                }
                                else
                                {
-                                       if ( nmm_find_piece(world,minigame,nextteam,NMM_PIECE_HOME) )
+                                       if ( nmm_find_piece(NULL,minigame,nextteam,NMM_PIECE_HOME) )
                                                minigame.minigame_flags = NMM_TURN_PLACE|nextteam;
                                        else if ( npieces == 3 )
                                                minigame.minigame_flags = NMM_TURN_FLY|nextteam;
                                        else
                                        {
                                                minigame.minigame_flags = NMM_TURN_WIN|e.team;
-                                               entity f = world;
+                                               entity f = NULL;
                                                while ( ( f = findentity(f,owner,minigame) ) )
                                                        if ( f.classname == "minigame_nmm_tile" && f.nmm_tile_piece  &&
                                                                f.nmm_tile_piece.team == nextteam && nmm_tile_canmove(f) )
@@ -514,7 +514,7 @@ void nmm_hud_status(vector pos, vector mySize)
        float piece_space = piece_sz_x + ( ts_x - 7 * piece_sz_x ) / 6;
        vector mypos;
        float piece_light = 1;
-       entity e = world;
+       entity e = NULL;
 
        mypos = pos;
        if ( (active_minigame.minigame_flags&NMM_TURN_TEAM) == 2 )
@@ -570,13 +570,13 @@ void nmm_make_move(entity minigame)
                if ( minigame.minigame_flags & (NMM_TURN_PLACE|NMM_TURN_TAKE) )
                {
                        minigame_cmd("move ",nmm_currtile.netname);
-                       nmm_fromtile = world;
+                       nmm_fromtile = NULL;
                }
                else if ( (minigame.minigame_flags & (NMM_TURN_MOVE|NMM_TURN_FLY)) )
                {
                        if ( nmm_fromtile == nmm_currtile )
                        {
-                               nmm_fromtile = world;
+                               nmm_fromtile = NULL;
                        }
                        else if ( nmm_currtile.nmm_tile_piece && nmm_currtile.nmm_tile_piece.team == minigame_self.team )
                        {
@@ -585,12 +585,12 @@ void nmm_make_move(entity minigame)
                        else if ( nmm_fromtile )
                        {
                                minigame_cmd("move ",nmm_fromtile.netname," ",nmm_currtile.netname);
-                               nmm_fromtile = world;
+                               nmm_fromtile = NULL;
                        }
                }
        }
        else
-               nmm_fromtile = world;
+               nmm_fromtile = NULL;
 }
 
 string nmm_turn_to_string(int turnflags)
@@ -621,13 +621,13 @@ int nmm_client_event(entity minigame, string event, ...)
 {
        if ( event == "activate" )
        {
-               nmm_fromtile = world;
+               nmm_fromtile = NULL;
                nmm_init_tiles(minigame);
                minigame.message = nmm_turn_to_string(minigame.minigame_flags);
        }
        else if ( event == "deactivate" )
        {
-               nmm_fromtile = world;
+               nmm_fromtile = NULL;
                nmm_kill_tiles(minigame);
        }
        else if ( event == "key_pressed" && (minigame.minigame_flags&NMM_TURN_TEAM) == minigame_self.team )
@@ -641,7 +641,7 @@ int nmm_client_event(entity minigame, string event, ...)
                                else
                                {
                                        string tileid = nmm_currtile.netname;
-                                       nmm_currtile = world;
+                                       nmm_currtile = NULL;
                                        while ( !nmm_currtile )
                                        {
                                                tileid = minigame_relative_tile(tileid,1,0,7,7);
@@ -656,7 +656,7 @@ int nmm_client_event(entity minigame, string event, ...)
                                else
                                {
                                        string tileid = nmm_currtile.netname;
-                                       nmm_currtile = world;
+                                       nmm_currtile = NULL;
                                        while ( !nmm_currtile )
                                        {
                                                tileid = minigame_relative_tile(tileid,-1,0,7,7);
@@ -671,7 +671,7 @@ int nmm_client_event(entity minigame, string event, ...)
                                else
                                {
                                        string tileid = nmm_currtile.netname;
-                                       nmm_currtile = world;
+                                       nmm_currtile = NULL;
                                        while ( !nmm_currtile )
                                        {
                                                tileid = minigame_relative_tile(tileid,0,1,7,7);
@@ -686,7 +686,7 @@ int nmm_client_event(entity minigame, string event, ...)
                                else
                                {
                                        string tileid = nmm_currtile.netname;
-                                       nmm_currtile = world;
+                                       nmm_currtile = NULL;
                                        while ( !nmm_currtile )
                                        {
                                                tileid = minigame_relative_tile(tileid,0,-1,7,7);
@@ -709,7 +709,7 @@ int nmm_client_event(entity minigame, string event, ...)
        }
        else if ( event == "mouse_moved" )
        {
-               nmm_currtile = world;
+               nmm_currtile = NULL;
                vector tile_pos;
                vector tile_size = minigame_hud_denormalize_size('1 1 0'/7,nmm_boardpos,nmm_boardsize);
                entity e;
@@ -742,7 +742,7 @@ int nmm_client_event(entity minigame, string event, ...)
                                if ( e.classname == "minigame_nmm_tile" )
                                {
                                        if ( e.nmm_tile_piece == sent )
-                                               e.nmm_tile_piece = world;
+                                               e.nmm_tile_piece = NULL;
                                        if ( e.netname == tileid )
                                                e.nmm_tile_piece = sent;
                                }
index ef3c700..602cad2 100644 (file)
@@ -209,8 +209,8 @@ void pong_ai_think(entity this)
        float distance;
        float next_distance;
        float min_distance = 1;
-       entity ball = world;
-       entity mayball = world;
+       entity ball = NULL;
+       entity mayball = NULL;
        while ( ( mayball = findentity(mayball,owner,this.owner) ) )
                if ( mayball.classname == "pong_ball" )
                {
@@ -309,7 +309,7 @@ vector pong_team_to_paddlepos(int nteam)
 }
 
 // Spawns a pong paddle
-// if real_player is world, the paddle is controlled by AI
+// if real_player is NULL, the paddle is controlled by AI
 entity pong_paddle_spawn(entity minigame, int pl_team, entity real_player)
 {
        entity paddle = msle_spawn(minigame,"pong_paddle");
@@ -321,7 +321,7 @@ entity pong_paddle_spawn(entity minigame, int pl_team, entity real_player)
        paddle.mins = pong_team_to_box_halfsize(pl_team,-paddle.pong_length,-1/16);
        paddle.maxs = pong_team_to_box_halfsize(pl_team,paddle.pong_length,1/16);
 
-       if ( real_player == world )
+       if ( real_player == NULL )
                pong_ai_spawn(paddle);
        else
                paddle.realowner = real_player;
@@ -352,7 +352,7 @@ int pong_server_event(entity minigame, string event, ...)
                        int i;
                        for ( i = 0; i < PONG_MAX_PLAYERS; i++ )
                        {
-                               if ( minigame.pong_paddles[i] == world )
+                               if ( minigame.pong_paddles[i] == NULL )
                                {
                                        pong_paddle_spawn(minigame,i+1,player);
                                        return i+1;
@@ -370,7 +370,7 @@ int pong_server_event(entity minigame, string event, ...)
                        for ( i = 0; i < PONG_MAX_PLAYERS; i++ )
                        {
                                paddle = minigame.pong_paddles[i];
-                               if ( paddle != world && paddle.realowner == player )
+                               if ( paddle != NULL && paddle.realowner == player )
                                {
                                        ai = pong_ai_spawn(paddle);
                                        ai.pong_score = player.minigame_players.pong_score;
@@ -420,9 +420,9 @@ int pong_server_event(entity minigame, string event, ...)
                                        if ( minigame.minigame_flags & PONG_STATUS_WAIT )
                                                for ( i = 0; i < PONG_MAX_PLAYERS; i++ )
                                                {
-                                                       if ( minigame.pong_paddles[i] == world )
+                                                       if ( minigame.pong_paddles[i] == NULL )
                                                        {
-                                                               pong_paddle_spawn(minigame,i+1,world);
+                                                               pong_paddle_spawn(minigame,i+1,NULL);
                                                                return true;
                                                        }
                                                }
@@ -438,10 +438,10 @@ int pong_server_event(entity minigame, string event, ...)
                                                for ( i = PONG_MAX_PLAYERS-1; i >= 0; i-- )
                                                {
                                                        paddle = minigame.pong_paddles[i];
-                                                       if ( paddle != world &&
+                                                       if ( paddle != NULL &&
                                                                paddle.realowner.classname == "pong_ai" )
                                                        {
-                                                               minigame.pong_paddles[i] = world;
+                                                               minigame.pong_paddles[i] = NULL;
                                                                remove(paddle.realowner);
                                                                remove(paddle);
                                                                return true;
index a66a839..7d4048d 100644 (file)
@@ -29,11 +29,11 @@ const int PP_TILE_SIZE = 7;
 // find tic tac toe piece given its tile name
 entity pp_find_piece(entity minig, string tile)
 {
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minig) ) )
                if ( e.classname == "minigame_board_piece" && e.netname == tile )
                        return e;
-       return world;
+       return NULL;
 }
 
 // check if the tile name is valid (3x3 grid)
@@ -164,7 +164,7 @@ void pp_setup_pieces(entity minigame)
                }
        }
 
-       minigame.pp_curr_piece = world;
+       minigame.pp_curr_piece = NULL;
 }
 
 // request a new match
@@ -183,7 +183,7 @@ void pp_next_match(entity minigame, entity player)
        {
                minigame.minigame_flags = PP_TURN_PLACE | minigame.pp_nexteam;
                minigame_server_sendflags(minigame,MINIG_SF_UPDATE);
-               entity e = world;
+               entity e = NULL;
                while ( ( e = findentity(e,owner,minigame) ) )
                        if ( e.classname == "minigame_board_piece" )
                                remove(e);
@@ -210,7 +210,7 @@ int pp_server_event(entity minigame, string event, ...)
                }
                case "end":
                {
-                       entity e = world;
+                       entity e = NULL;
                        while( (e = findentity(e, owner, minigame)) )
                        if(e.classname == "minigame_board_piece")
                        {
@@ -285,7 +285,7 @@ void pp_hud_board(vector pos, vector mySize)
        vector tile_size = minigame_hud_denormalize_size('1 1 0'/PP_TILE_SIZE,pos,mySize);
        vector tile_pos;
 
-       active_minigame.pp_curr_piece = world;
+       active_minigame.pp_curr_piece = NULL;
        entity e;
        FOREACH_MINIGAME_ENTITY(e)
        if(e.classname == "minigame_board_piece")
index 4eb0009..2a612c5 100644 (file)
@@ -13,17 +13,17 @@ const int PS_TILE_SIZE = 8;
 // find same game piece given its tile name
 entity ps_find_piece(entity minig, string tile)
 {
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minig) ) )
                if ( e.classname == "minigame_board_piece" && e.netname == tile )
                        return e;
-       return world;
+       return NULL;
 }
 
 bool ps_draw(entity minigame)
 {
        int valid = 0;
-       entity e = world;
+       entity e = NULL;
        while( ( e = findentity(e,owner,minigame) ) )
                if( e.classname == "minigame_board_piece" )
                {
@@ -69,7 +69,7 @@ bool ps_winning_piece(entity minigame)
        //int number = minigame_tile_number(piece.netname);
        //int letter = minigame_tile_letter(piece.netname);
 
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minigame) ) )
                if ( e.classname == "minigame_board_piece" )
                {
@@ -227,7 +227,7 @@ int ps_server_event(entity minigame, string event, ...)
                }
                case "end":
                {
-                       entity e = world;
+                       entity e = NULL;
                        while( (e = findentity(e, owner, minigame)) )
                        if(e.classname == "minigame_board_piece")
                        {
@@ -506,7 +506,7 @@ void ps_make_move(entity minigame)
                else
                {
                        minigame_cmd("move ", ps_curr_piece.netname, " ", ps_curr_pos);
-                       ps_curr_piece = world;
+                       ps_curr_piece = NULL;
                }
        }
 }
@@ -528,7 +528,7 @@ int ps_client_event(entity minigame, string event, ...)
                case "activate":
                {
                        ps_set_curr_pos("");
-                       ps_curr_piece = world;
+                       ps_curr_piece = NULL;
                        minigame.message = ps_turn_to_string(minigame.minigame_flags);
                        return false;
                }
index 9872909..617ed95 100644 (file)
@@ -38,7 +38,7 @@ int autocvar_sv_minigames_snake_lives = 3;
 bool snake_alone(entity minig)
 {
        int headcount = 0;
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minig) ) )
                if ( e.classname == "minigame_board_piece" && e.cnt == 1 )
                        ++headcount;
@@ -49,21 +49,21 @@ bool snake_alone(entity minig)
 // find same game piece given its tile name
 entity snake_find_piece(entity minig, string tile)
 {
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minig) ) )
                if ( e.classname == "minigame_board_piece" && e.netname == tile )
                        return e;
-       return world;
+       return NULL;
 }
 
 // find same game piece given its cnt
 entity snake_find_cnt(entity minig, int steam, int tile)
 {
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minig) ) )
                if ( e.classname == "minigame_board_piece" && e.cnt == tile && e.team == steam )
                        return e;
-       return world;
+       return NULL;
 }
 
 // check if the tile name is valid (15x15 grid)
@@ -78,11 +78,11 @@ bool snake_valid_tile(string tile)
 
 entity snake_find_head(entity minig, int steam)
 {
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minig) ) )
                if ( e.classname == "minigame_board_piece" && e.cnt == 1 && e.team == steam )
                        return e;
-       return world;
+       return NULL;
 }
 
 void snake_new_mouse(entity minigame)
@@ -94,7 +94,7 @@ void snake_new_mouse(entity minigame)
        {
                string pos = minigame_tile_buildname(i, j);
                if(!snake_find_piece(minigame, pos))
-                       RandomSelection_Add(world, 0, pos, 1, 1);
+                       RandomSelection_Add(NULL, 0, pos, 1, 1);
        }
 
        entity piece = msle_spawn(minigame,"minigame_board_piece");
@@ -174,15 +174,15 @@ void minigame_setup_snake(entity minigame, int pteam)
        {
                string pos = minigame_tile_buildname(i, j);
                if(!snake_find_piece(minigame, pos))
-                       RandomSelection_Add(world, 0, pos, 1, 1);
+                       RandomSelection_Add(NULL, 0, pos, 1, 1);
        }
 
        entity piece = msle_spawn(minigame,"minigame_board_piece");
        piece.team = pteam;
        piece.netname = strzone(RandomSelection_chosen_string);
        piece.cnt = 1;
-       piece.snake_next = world;
-       piece.snake_prev = world;
+       piece.snake_next = NULL;
+       piece.snake_prev = NULL;
        piece.snake_last = piece;
        setthink(piece, snake_head_think);
        piece.snake_delay = autocvar_sv_minigames_snake_delay_initial;
@@ -203,13 +203,13 @@ entity snake_get_player(entity minigame, int pteam)
 #ifdef SVQC
        for(e = minigame.minigame_players; e; e = e.list_next)
 #elif defined(CSQC)
-       e = world;
+       e = NULL;
        while( (e = findentity(e,owner,minigame)) )
                if ( e.classname == "minigame_player" )
 #endif
        if(e.team == pteam)
                return e;
-       return world;
+       return NULL;
 }
 
 void snake_add_score(entity minigame, int pteam, int thescore)
@@ -255,7 +255,7 @@ void snake_move_body(entity minigame, entity head, bool ate_mouse)
                piece.team = head.team;
                piece.snake_prev = tail;
                piece.snake_dir = tail.snake_dir;
-               piece.snake_next = world;
+               piece.snake_next = NULL;
                piece.snake_tail = true;
                piece.netname = strzone(tail.netname);
 
@@ -282,7 +282,7 @@ void snake_eat_team(entity minigame, int pteam)
 
        head.nextthink = time + 1; // make sure they don't to eat us somehow
 
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minigame) ) )
                if ( e.classname == "minigame_board_piece" && e.cnt && e.team == pteam )
                {
@@ -420,7 +420,7 @@ int snake_server_event(entity minigame, string event, ...)
                }
                case "end":
                {
-                       entity e = world;
+                       entity e = NULL;
                        while( (e = findentity(e, owner, minigame)) )
                        if(e.classname == "minigame_board_piece")
                        {
index cd9565a..b524846 100644 (file)
@@ -25,11 +25,11 @@ const int TTT_TILE_SIZE = 3;
 // find tic tac toe piece given its tile name
 entity ttt_find_piece(entity minig, string tile)
 {
-       entity e = world;
+       entity e = NULL;
        while ( ( e = findentity(e,owner,minig) ) )
                if ( e.classname == "minigame_board_piece" && e.netname == tile )
                        return e;
-       return world;
+       return NULL;
 }
 
 // Checks if the given piece completes a row
@@ -120,7 +120,7 @@ void ttt_next_match(entity minigame, entity player)
                minigame.minigame_flags = TTT_TURN_PLACE | minigame.ttt_nexteam;
                minigame_server_sendflags(minigame,MINIG_SF_UPDATE);
                minigame.ttt_npieces = 0;
-               entity e = world;
+               entity e = NULL;
                while ( ( e = findentity(e,owner,minigame) ) )
                        if ( e.classname == "minigame_board_piece" )
                                remove(e);
@@ -142,7 +142,7 @@ int ttt_server_event(entity minigame, string event, ...)
                }
                case "end":
                {
-                       entity e = world;
+                       entity e = NULL;
                        while( (e = findentity(e, owner, minigame)) )
                        if(e.classname == "minigame_board_piece")
                        {
@@ -417,7 +417,7 @@ int ttt_ai_random(int piecemask)
        for ( int i = 0; i < 9; i++ )
        {
                if ( piecemask & f )
-                       RandomSelection_Add(world, f, string_null, 1, 1);
+                       RandomSelection_Add(NULL, f, string_null, 1, 1);
                f <<= 1;
        }
 
@@ -469,7 +469,7 @@ void ttt_aimove(entity minigame)
 {
        if ( minigame.minigame_flags == (TTT_TURN_PLACE|minigame.ttt_ai) )
        {
-               entity aiplayer = world;
+               entity aiplayer = NULL;
                while ( ( aiplayer = findentity(aiplayer,owner,minigame) ) )
                        if ( aiplayer.classname == "minigame_player" && !aiplayer.minigame_playerslot )
                                break;
index 0ccbc0e..227f3d9 100644 (file)
@@ -127,7 +127,7 @@ int minigame_count_players(entity minigame)
 #ifdef SVQC
        for(e = minigame.minigame_players; e; e = e.list_next)
 #elif defined(CSQC)
-       e = world;
+       e = NULL;
        while( (e = findentity(e,owner,minigame)) )
                if ( e.classname == "minigame_player" )
 #endif
index b9a7b78..689ce83 100644 (file)
@@ -2,8 +2,8 @@
 
 void player_clear_minigame(entity player)
 {
-       player.active_minigame = world;
-       player.minigame_players = world;
+       player.active_minigame = NULL;
+       player.minigame_players = NULL;
        if ( IS_PLAYER(player) )
                player.movetype = MOVETYPE_WALK;
        else
@@ -18,7 +18,7 @@ void minigame_rmplayer(entity minigame_session, entity player)
 
        if ( p.minigame_players == player )
        {
-               if ( p.list_next == world )
+               if ( p.list_next == NULL )
                {
                        end_minigame(minigame_session);
                        return;
@@ -32,7 +32,7 @@ void minigame_rmplayer(entity minigame_session, entity player)
        }
        else
        {
-               for ( e = p.list_next; e != world; e = e.list_next )
+               for ( e = p.list_next; e != NULL; e = e.list_next )
                {
                        if ( e.minigame_players == player )
                        {
@@ -105,7 +105,7 @@ bool minigame_SendEntity(entity this, entity to, int sf)
 void minigame_resend(entity minigame)
 {
        minigame.SendFlags = MINIG_SF_ALL;
-       entity e = world;
+       entity e = NULL;
        while (( e = findentity(e,owner,minigame) ))
        {
                e.SendFlags = MINIG_SF_ALL;
@@ -115,7 +115,7 @@ void minigame_resend(entity minigame)
 bool minigame_CheckSend(entity this)
 {
        entity e;
-       for ( e = this.owner.minigame_players; e != world; e = e.list_next )
+       for ( e = this.owner.minigame_players; e != NULL; e = e.list_next )
                if ( e.minigame_players == other )
                        return true;
        return false;
@@ -163,7 +163,7 @@ int minigame_addplayer(entity minigame_session, entity player)
 entity start_minigame(entity player, string minigame )
 {
        if ( !autocvar_sv_minigames || !IS_REAL_CLIENT(player) )
-               return world;
+               return NULL;
 
        entity e = minigame_get_descriptor(minigame);
        if ( e )
@@ -178,7 +178,7 @@ entity start_minigame(entity player, string minigame )
                {
                        LOG_TRACE("Minigame ",minig.netname," rejected the first player join!\n");
                        end_minigame(minig);
-                       return world;
+                       return NULL;
                }
                Net_LinkEntity(minig, false, 0, minigame_SendEntity);
 
@@ -193,23 +193,23 @@ entity start_minigame(entity player, string minigame )
                return minig;
        }
 
-       return world;
+       return NULL;
 }
 
 entity join_minigame(entity player, string game_id )
 {
        if ( !autocvar_sv_minigames || !IS_REAL_CLIENT(player) )
-               return world;
+               return NULL;
 
        entity minig;
-       for ( minig = minigame_sessions; minig != world; minig = minig.list_next )
+       for ( minig = minigame_sessions; minig != NULL; minig = minig.list_next )
        {
                if ( minig.netname == game_id )
                if ( minigame_addplayer(minig,player) )
                        return minig;
        }
 
-       return world;
+       return NULL;
 }
 
 void part_minigame(entity player )
@@ -231,7 +231,7 @@ void end_minigame(entity minigame_session)
        GameLogEcho(strcat(":minigame:end:",minigame_session.netname));
 
 
-       entity e = world;
+       entity e = NULL;
        while( (e = findentity(e, owner, minigame_session)) )
                if ( e.minigame_autoclean )
                {
@@ -240,7 +240,7 @@ void end_minigame(entity minigame_session)
                }
 
        entity p;
-       for ( e = minigame_session.minigame_players; e != world; e = p )
+       for ( e = minigame_session.minigame_players; e != NULL; e = p )
        {
                p = e.list_next;
                player_clear_minigame(e.minigame_players);
@@ -282,12 +282,12 @@ string invite_minigame(entity inviter, entity player)
 entity minigame_find_player(entity client)
 {
        if ( ! client.active_minigame )
-               return world;
+               return NULL;
        entity e;
        for ( e = client.active_minigame.minigame_players; e; e = e.list_next )
                if ( e.minigame_players == client )
                        return e;
-       return world;
+       return NULL;
 }
 
 bool MinigameImpulse(entity this, int imp)
@@ -343,7 +343,7 @@ void ClientCommand_minigame(entity caller, int request, int argc, string command
                else if ( minig_cmd == "list-sessions" )
                {
                        entity e;
-                       for ( e = minigame_sessions; e != world; e = e.list_next )
+                       for ( e = minigame_sessions; e != NULL; e = e.list_next )
                                sprint(caller,e.netname,"\n");
                        return;
                }
index 247c6b8..44d7121 100644 (file)
@@ -122,7 +122,7 @@ void M_Mage_Defend_Shield(entity this);
 
 bool M_Mage_Defend_Heal_Check(entity this, entity targ)
 {
-       if(targ == world)
+       if(targ == NULL)
                return false;
        if(targ.health <= 0)
                return false;
@@ -152,10 +152,10 @@ void M_Mage_Attack_Spike_Explode(entity this)
 
        sound(this, CH_SHOTS, SND_GRENADE_IMPACT, VOL_BASE, ATTEN_NORM);
 
-       this.realowner.mage_spike = world;
+       this.realowner.mage_spike = NULL;
 
        Send_Effect(EFFECT_EXPLOSION_SMALL, this.origin, '0 0 0', 1);
-       RadiusDamage (this, this.realowner, (autocvar_g_monster_mage_attack_spike_damage), (autocvar_g_monster_mage_attack_spike_damage) * 0.5, (autocvar_g_monster_mage_attack_spike_radius), world, world, 0, DEATH_MONSTER_MAGE.m_id, other);
+       RadiusDamage (this, this.realowner, (autocvar_g_monster_mage_attack_spike_damage), (autocvar_g_monster_mage_attack_spike_damage) * 0.5, (autocvar_g_monster_mage_attack_spike_radius), NULL, NULL, 0, DEATH_MONSTER_MAGE.m_id, other);
 
        remove (this);
 }
@@ -184,11 +184,11 @@ void M_Mage_Attack_Spike_Think(entity this)
                spd + (autocvar_g_monster_mage_attack_spike_accel) * frametime
        );
 
-       if (this.enemy != world)
+       if (this.enemy != NULL)
                if (this.enemy.takedamage != DAMAGE_AIM || IS_DEAD(this.enemy))
-                       this.enemy = world;
+                       this.enemy = NULL;
 
-       if (this.enemy != world)
+       if (this.enemy != NULL)
        {
                entity e = this.enemy;
                vector eorg = 0.5 * (e.absmin + e.absmax);
@@ -307,7 +307,7 @@ void M_Mage_Defend_Heal(entity this)
 void M_Mage_Attack_Push(entity this)
 {
        sound(this, CH_SHOTS, SND_TAGEXP1, 1, ATTEN_NORM);
-       RadiusDamage (this, this, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius), world, world, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE.m_id, this.enemy);
+       RadiusDamage (this, this, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius), NULL, NULL, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE.m_id, this.enemy);
        Send_Effect(EFFECT_TE_EXPLOSION, this.origin, '0 0 0', 1);
 
        setanim(this, this.anim_shoot, true, true, true);
index 0d13494..7a11b13 100644 (file)
@@ -93,7 +93,7 @@ void M_Shambler_Attack_Lightning_Explode(entity this)
        if(this.movetype == MOVETYPE_NONE)
                this.velocity = this.oldvelocity;
 
-       RadiusDamage (this, this.realowner, (autocvar_g_monster_shambler_attack_lightning_damage), (autocvar_g_monster_shambler_attack_lightning_damage), (autocvar_g_monster_shambler_attack_lightning_radius), world, world, (autocvar_g_monster_shambler_attack_lightning_force), this.projectiledeathtype, other);
+       RadiusDamage (this, this.realowner, (autocvar_g_monster_shambler_attack_lightning_damage), (autocvar_g_monster_shambler_attack_lightning_damage), (autocvar_g_monster_shambler_attack_lightning_radius), NULL, NULL, (autocvar_g_monster_shambler_attack_lightning_force), this.projectiledeathtype, other);
 
        for(head = findradius(this.origin, (autocvar_g_monster_shambler_attack_lightning_radius_zap)); head; head = head.chain) if(head != this.realowner) if(head.takedamage)
        {
@@ -136,7 +136,7 @@ void M_Shambler_Attack_Lightning_Think(entity this)
        this.nextthink = time;
        if (time > this.cnt)
        {
-               other = world;
+               other = NULL;
                M_Shambler_Attack_Lightning_Explode(this);
                return;
        }
index fe5bb7a..9338657 100644 (file)
@@ -141,7 +141,7 @@ void M_Spider_Attack_Web_Explode(entity this)
        if(this)
        {
                Send_Effect(EFFECT_ELECTRO_IMPACT, this.origin, '0 0 0', 1);
-               RadiusDamage(this, this.realowner, 0, 0, 25, world, world, 25, this.projectiledeathtype, world);
+               RadiusDamage(this, this.realowner, 0, 0, 25, NULL, NULL, 25, this.projectiledeathtype, NULL);
 
                for(entity e = findradius(this.origin, 25); e; e = e.chain) if(e != this) if(e.takedamage && !IS_DEAD(e)) if(e.health > 0) if(e.monsterid != MON_SPIDER.monsterid)
                        e.spider_slowness = time + (autocvar_g_monster_spider_attack_web_damagetime);
index edfc92b..001b2e2 100644 (file)
@@ -105,7 +105,7 @@ void M_Wyvern_Attack_Fireball_Explode(entity this)
 
        entity own = this.realowner;
 
-       RadiusDamage(this, own, autocvar_g_monster_wyvern_attack_fireball_damage, autocvar_g_monster_wyvern_attack_fireball_edgedamage, autocvar_g_monster_wyvern_attack_fireball_force, world, world, autocvar_g_monster_wyvern_attack_fireball_radius, this.projectiledeathtype, world);
+       RadiusDamage(this, own, autocvar_g_monster_wyvern_attack_fireball_damage, autocvar_g_monster_wyvern_attack_fireball_edgedamage, autocvar_g_monster_wyvern_attack_fireball_force, NULL, NULL, autocvar_g_monster_wyvern_attack_fireball_radius, this.projectiledeathtype, NULL);
 
        FOREACH_ENTITY_FLOAT(takedamage, DAMAGE_AIM,
        {
index 5e1af3d..23fc845 100644 (file)
@@ -24,7 +24,7 @@ entity spawnmonster (string monster, float monster_id, entity spawnedby, entity
        {
                RandomSelection_Init();
                for(i = MON_FIRST; i <= MON_LAST; ++i)
-                       RandomSelection_Add(world, i, string_null, 1, 1);
+                       RandomSelection_Add(NULL, i, string_null, 1, 1);
 
            monster_id = RandomSelection_chosen_float;
        }
index 945a1de..c0a15e9 100644 (file)
@@ -123,7 +123,7 @@ entity Monster_FindTarget(entity mon)
 {
        if(MUTATOR_CALLHOOK(MonsterFindTarget)) { return mon.enemy; } // Handled by a mutator
 
-       entity head, closest_target = world;
+       entity head, closest_target = NULL;
        head = findradius(mon.origin, mon.target_range);
 
        while(head) // find the closest acceptable target to pass to
@@ -418,7 +418,7 @@ bool Monster_Attack_Leap(entity this, vector anm, void(entity this) touchfunc, v
 
 void Monster_Attack_Check(entity this, entity targ)
 {
-       if((this == world || targ == world)
+       if((this == NULL || targ == NULL)
        || (!this.monster_attackfunc)
        || (time < this.attack_finished_single[0])
        ) { return; }
@@ -468,7 +468,7 @@ void Monster_UpdateModel(entity this)
 
 void Monster_Touch(entity this)
 {
-       if(other == world) { return; }
+       if(other == NULL) { return; }
 
        if(other.monster_attack)
        if(this.enemy != other)
@@ -555,7 +555,7 @@ vector Monster_Move_Target(entity this, entity targ)
                targ_origin = WarpZone_RefSys_TransformOrigin(this.enemy, this, targ_origin); // origin of target as seen by the monster (us)
                WarpZone_TraceLine(this.origin, targ_origin, MOVE_NOMONSTERS, this);
 
-               if((this.enemy == world)
+               if((this.enemy == NULL)
                        || (IS_DEAD(this.enemy) || this.enemy.health < 1)
                        || (STAT(FROZEN, this.enemy))
                        || (this.enemy.flags & FL_NOTARGET)
@@ -564,13 +564,13 @@ vector Monster_Move_Target(entity this, entity targ)
                        || (vdist(this.origin - targ_origin, >, this.target_range))
                        || ((trace_fraction < 1) && (trace_ent != this.enemy)))
                {
-                       this.enemy = world;
+                       this.enemy = NULL;
                        this.pass_distance = 0;
                }
 
                if(this.enemy)
                {
-                       /*WarpZone_TrailParticles(world, particleeffectnum(EFFECT_RED_PASS), this.origin, targ_origin);
+                       /*WarpZone_TrailParticles(NULL, particleeffectnum(EFFECT_RED_PASS), this.origin, targ_origin);
                        print("Trace origin: ", vtos(targ_origin), "\n");
                        print("Target origin: ", vtos(this.enemy.origin), "\n");
                        print("My origin: ", vtos(this.origin), "\n"); */
@@ -690,7 +690,7 @@ void Monster_CalculateVelocity(entity this, vector to, vector from, float turnra
 
 void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed)
 {
-       if(this.target2) { this.goalentity = find(world, targetname, this.target2); }
+       if(this.target2) { this.goalentity = find(NULL, targetname, this.target2); }
 
        entity targ;
 
@@ -706,7 +706,7 @@ void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed)
                movelib_brake_simple(this, stpspeed);
                setanim(this, this.anim_idle, true, false, false);
 
-               this.enemy = world;
+               this.enemy = NULL;
                this.nextthink = time + this.ticrate;
 
                if(this.revive_progress >= 1)
@@ -725,7 +725,7 @@ void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed)
                movelib_brake_simple(this, stpspeed);
                setanim(this, this.anim_idle, true, false, false);
 
-               this.enemy = world;
+               this.enemy = NULL;
                this.nextthink = time + this.ticrate;
 
                if(this.health < 1)
@@ -750,7 +750,7 @@ void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed)
                        {
                                this.last_trace = time + 0.4;
 
-                               Damage (this, world, world, 2, DEATH_DROWN.m_id, this.origin, '0 0 0');
+                               Damage (this, NULL, NULL, 2, DEATH_DROWN.m_id, this.origin, '0 0 0');
                                this.angles = '90 90 0';
                                if(random() < 0.5)
                                {
@@ -782,7 +782,7 @@ void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed)
 
        if (MUTATOR_CALLHOOK(MonsterMove, this, runspeed, walkspeed, targ)
                || gameover
-               || this.draggedby != world
+               || this.draggedby != NULL
                || (round_handler_IsActive() && !round_handler_IsRoundStarted())
                || time < game_starttime
                || (autocvar_g_campaign && !campaign_bots_may_start)
@@ -802,7 +802,7 @@ void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed)
        if(teamplay)
        if(autocvar_g_monsters_teams)
        if(DIFF_TEAM(this.monster_follow, this))
-               this.monster_follow = world;
+               this.monster_follow = NULL;
 
        if(time >= this.last_enemycheck)
        {
@@ -866,7 +866,7 @@ void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed)
        }
        else
        {
-               entity e = find(world, targetname, this.target2);
+               entity e = find(NULL, targetname, this.target2);
                if(e.target2)
                        this.target2 = e.target2;
                else if(e.target)
@@ -954,8 +954,8 @@ void Monster_Reset(entity this)
 
        this.health = this.max_health;
        this.velocity = '0 0 0';
-       this.enemy = world;
-       this.goalentity = world;
+       this.enemy = NULL;
+       this.goalentity = NULL;
        this.attack_finished_single[0] = 0;
        this.moveto = this.origin;
 }
@@ -1012,7 +1012,7 @@ void Monster_Dead(entity this, entity attacker, float gibbed)
        this.solid                      = SOLID_CORPSE;
        this.takedamage         = DAMAGE_AIM;
        this.deadflag           = DEAD_DEAD;
-       this.enemy                      = world;
+       this.enemy                      = NULL;
        this.movetype           = MOVETYPE_TOSS;
        this.moveto                     = this.origin;
        settouch(this, Monster_Touch); // reset incase monster was pouncing
@@ -1047,7 +1047,7 @@ void Monster_Damage(entity this, entity inflictor, entity attacker, float damage
        if(time < this.spawnshieldtime && deathtype != DEATH_KILL.m_id)
                return;
 
-       if(deathtype == DEATH_FALL.m_id && this.draggedby != world)
+       if(deathtype == DEATH_FALL.m_id && this.draggedby != NULL)
                return;
 
        vector v;
@@ -1113,7 +1113,7 @@ void Monster_Damage(entity this, entity inflictor, entity attacker, float damage
 // don't check for enemies, just keep walking in a straight line
 void Monster_Move_2D(entity this, float mspeed, bool allow_jumpoff)
 {
-       if(gameover || (round_handler_IsActive() && !round_handler_IsRoundStarted()) || this.draggedby != world || time < game_starttime || (autocvar_g_campaign && !campaign_bots_may_start) || time < this.spawn_time)
+       if(gameover || (round_handler_IsActive() && !round_handler_IsRoundStarted()) || this.draggedby != NULL || time < game_starttime || (autocvar_g_campaign && !campaign_bots_may_start) || time < this.spawn_time)
        {
                mspeed = 0;
                if(time >= this.spawn_time)
@@ -1266,7 +1266,7 @@ bool Monster_Spawn_Setup(entity this)
 
        if(autocvar_g_monsters_healthbars)
        {
-               entity wp = WaypointSprite_Spawn(WP_Monster, 0, 1024, this, '0 0 1' * (this.maxs.z + 15), world, this.team, this, sprite, true, RADARICON_DANGER);
+               entity wp = WaypointSprite_Spawn(WP_Monster, 0, 1024, this, '0 0 1' * (this.maxs.z + 15), NULL, this.team, this, sprite, true, RADARICON_DANGER);
                wp.wp_extra = this.monsterid;
                wp.colormod = ((this.team) ? Team_ColorRGB(this.team) : '1 0 0');
                if(!(this.spawnflags & MONSTERFLAG_INVINCIBLE))
@@ -1325,7 +1325,7 @@ bool Monster_Spawn(entity this, int mon_id)
        this.solid                              = SOLID_BBOX;
        this.movetype                   = MOVETYPE_WALK;
        this.spawnshieldtime    = time + autocvar_g_monsters_spawnshieldtime;
-       this.enemy                              = world;
+       this.enemy                              = NULL;
        this.velocity                   = '0 0 0';
        this.moveto                             = this.origin;
        this.pos1                               = this.origin;
index 15aa8ee..ec1fada 100644 (file)
@@ -88,7 +88,7 @@ REGISTER_MUTATOR(buffs, cvar("g_buffs"))
 {
        MUTATOR_ONADD
        {
-               InitializeEntity(world, buffs_DelayedInit, INITPRIO_FINDTARGET);
+               InitializeEntity(NULL, buffs_DelayedInit, INITPRIO_FINDTARGET);
        }
 }
 
@@ -169,7 +169,7 @@ bool buff_Waypoint_visible_for_player(entity this, entity player, entity view)
 void buff_Waypoint_Spawn(entity e)
 {
        entity buff = buff_FirstFromFlags(e.buffs);
-       entity wp = WaypointSprite_Spawn(WP_Buff, 0, autocvar_g_buffs_waypoint_distance, e, '0 0 1' * e.maxs.z, world, e.team, e, buff_waypoint, true, RADARICON_Buff);
+       entity wp = WaypointSprite_Spawn(WP_Buff, 0, autocvar_g_buffs_waypoint_distance, e, '0 0 1' * e.maxs.z, NULL, e.team, e, buff_waypoint, true, RADARICON_Buff);
        wp.wp_extra = buff.m_id;
        WaypointSprite_UpdateTeamRadar(e.buff_waypoint, RADARICON_Buff, e.glowmod);
        e.buff_waypoint.waypointsprite_visible_for_player = buff_Waypoint_visible_for_player;
@@ -255,7 +255,7 @@ void buff_Touch(entity this)
                {
                        int buffid = buff_FirstFromFlags(other.buffs).m_id;
                        //Send_Notification(NOTIF_ONE, other, MSG_MULTI, ITEM_BUFF_DROP, other.buffs);
-                       Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_ITEM_BUFF_LOST, other.netname, buffid);
+                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ITEM_BUFF_LOST, other.netname, buffid);
 
                        other.buffs = 0;
                        //sound(other, CH_TRIGGER, SND_BUFF_LOST, VOL_BASE, ATTN_NORM);
@@ -294,7 +294,7 @@ void buff_NewType(entity ent, float cb)
        FOREACH(Buffs, buff_Available(it), LAMBDA(
                it.buff_seencount += 1;
                // if it's already been chosen, give it a lower priority
-               RandomSelection_Add(world, it.m_itemid, string_null, 1, max(0.2, 1 / it.buff_seencount));
+               RandomSelection_Add(NULL, it.m_itemid, string_null, 1, max(0.2, 1 / it.buff_seencount));
        ));
        ent.buffs = RandomSelection_chosen_float;
 }
@@ -334,7 +334,7 @@ void buff_Think(entity this)
        if(!this.owner || STAT(FROZEN, this.owner) || IS_DEAD(this.owner) || !this.owner.iscreature || !(this.owner.buffs & this.buffs))
        {
                buff_SetCooldown(this, autocvar_g_buffs_cooldown_respawn + frametime);
-               this.owner = world;
+               this.owner = NULL;
                if(autocvar_g_buffs_randomize)
                        buff_NewType(this, this.buffs);
 
@@ -381,7 +381,7 @@ void buff_Reset(entity this)
 {
        if(autocvar_g_buffs_randomize)
                buff_NewType(this, this.buffs);
-       this.owner = world;
+       this.owner = NULL;
        buff_SetCooldown(this, autocvar_g_buffs_cooldown_activate);
        buff_Waypoint_Reset(this);
        this.buff_activetime_updated = false;
@@ -690,7 +690,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerDies)
                if(frag_target.buff_model)
                {
                        remove(frag_target.buff_model);
-                       frag_target.buff_model = world;
+                       frag_target.buff_model = NULL;
                }
        }
 }
@@ -721,7 +721,7 @@ MUTATOR_HOOKFUNCTION(buffs, ForbidThrowCurrentWeapon)
        if(player.buffs & BUFF_SWAPPER.m_itemid)
        {
                float best_distance = autocvar_g_buffs_swapper_range;
-               entity closest = world;
+               entity closest = NULL;
                FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
                        if(!IS_DEAD(it) && !STAT(FROZEN, it) && !it.vehicle)
                        if(DIFF_TEAM(it, player))
@@ -787,7 +787,7 @@ bool buffs_RemovePlayer(entity player)
        if(player.buff_model)
        {
                remove(player.buff_model);
-               player.buff_model = world;
+               player.buff_model = NULL;
        }
 
        // also reset timers here to prevent them continuing after spectating
@@ -986,7 +986,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
                else
                {
                        remove(player.buff_model);
-                       player.buff_model = world;
+                       player.buff_model = NULL;
 
                        player.effects &= ~(EF_NOSHADOW);
                }
@@ -1065,7 +1065,7 @@ MUTATOR_HOOKFUNCTION(buffs, BuildMutatorsPrettyString)
 void buffs_DelayedInit(entity this)
 {
        if(autocvar_g_buffs_spawn_count > 0)
-       if(find(world, classname, "item_buff") == world)
+       if(find(NULL, classname, "item_buff") == NULL)
        {
                float i;
                for(i = 0; i < autocvar_g_buffs_spawn_count; ++i)
index 48b90ae..191f616 100644 (file)
@@ -62,9 +62,9 @@ MUTATOR_HOOKFUNCTION(campcheck, PlayerPreThink)
                        {
                                Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CAMPCHECK);
                                if(player.vehicle)
-                                       Damage(player.vehicle, world, world, autocvar_g_campcheck_damage * 2, DEATH_CAMP.m_id, player.vehicle.origin, '0 0 0');
+                                       Damage(player.vehicle, NULL, NULL, autocvar_g_campcheck_damage * 2, DEATH_CAMP.m_id, player.vehicle.origin, '0 0 0');
                                else
-                                       Damage(player, world, world, bound(0, autocvar_g_campcheck_damage, player.health + player.armorvalue * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP.m_id, player.origin, '0 0 0');
+                                       Damage(player, NULL, NULL, bound(0, autocvar_g_campcheck_damage, player.health + player.armorvalue * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP.m_id, player.origin, '0 0 0');
                        }
                        player.campcheck_nextcheck = time + autocvar_g_campcheck_interval;
                        player.campcheck_traveled_distance = 0;
index dc871d6..34f3825 100644 (file)
@@ -218,7 +218,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPowerups)
                        player.alpha = autocvar_g_instagib_invis_alpha;
                        player.exteriorweaponentity.alpha = autocvar_g_instagib_invis_alpha;
                        player.items |= ITEM_Invisibility.m_itemid;
-                       Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_POWERUP_INVISIBILITY, player.netname);
+                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_INVISIBILITY, player.netname);
                        Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_POWERUP_INVISIBILITY);
                }
        }
@@ -237,7 +237,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPowerups)
                if (time < player.invincible_finished)
                {
                        player.items |= ITEM_Speed.m_itemid;
-                       Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_POWERUP_SPEED, player.netname);
+                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_SPEED, player.netname);
                        Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_POWERUP_SPEED);
                }
        }
index 8faebab..c704d31 100644 (file)
@@ -383,7 +383,7 @@ void nade_ice_think(entity this)
                        sound(this, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
 
                        RadiusDamage(this, this.realowner, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage,
-                               autocvar_g_nades_nade_radius, this, world, autocvar_g_nades_nade_force, this.projectiledeathtype, this.enemy);
+                               autocvar_g_nades_nade_radius, this, NULL, autocvar_g_nades_nade_force, this.projectiledeathtype, this.enemy);
                        Damage_DamageInfo(this.origin, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage,
                                autocvar_g_nades_nade_radius, '1 1 1' * autocvar_g_nades_nade_force, this.projectiledeathtype, 0, this);
                }
@@ -497,7 +497,7 @@ void nade_spawn_boom(entity this)
        if(this.realowner.nade_spawnloc)
        {
                remove(this.realowner.nade_spawnloc);
-               this.realowner.nade_spawnloc = world;
+               this.realowner.nade_spawnloc = NULL;
        }
 
        this.realowner.nade_spawnloc = spawnloc;
@@ -651,7 +651,7 @@ void nade_boom(entity this)
        if(nade_blast)
        {
                RadiusDamage(this, this.realowner, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage,
-                                autocvar_g_nades_nade_radius, this, world, autocvar_g_nades_nade_force, this.projectiledeathtype, this.enemy);
+                                autocvar_g_nades_nade_radius, this, NULL, autocvar_g_nades_nade_force, this.projectiledeathtype, this.enemy);
                Damage_DamageInfo(this.origin, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage, autocvar_g_nades_nade_radius, '1 1 1' * autocvar_g_nades_nade_force, this.projectiledeathtype, 0, this);
        }
 
@@ -813,14 +813,14 @@ void nade_damage(entity this, entity inflictor, entity attacker, float damage, i
 
 void toss_nade(entity e, bool set_owner, vector _velocity, float _time)
 {
-       if(e.nade == world)
+       if(e.nade == NULL)
                return;
 
        entity _nade = e.nade;
-       e.nade = world;
+       e.nade = NULL;
 
        remove(e.fake_nade);
-       e.fake_nade = world;
+       e.fake_nade = NULL;
 
        makevectors(e.v_angle);
 
@@ -836,7 +836,7 @@ void toss_nade(entity e, bool set_owner, vector _velocity, float _time)
 
        setorigin(_nade, w_shotorg + offset + (v_right * 25) * -1);
        //setmodel(_nade, MDL_PROJECTILE_NADE);
-       //setattachment(_nade, world, "");
+       //setattachment(_nade, NULL, "");
        PROJECTILE_MAKETRIGGER(_nade);
        if(STAT(NADES_SMALL, e))
                setsize(_nade, '-8 -8 -8', '8 8 8');
@@ -867,7 +867,7 @@ void toss_nade(entity e, bool set_owner, vector _velocity, float _time)
        _nade.takedamage = DAMAGE_AIM;
        _nade.event_damage = nade_damage;
        setcefc(_nade, func_null);
-       _nade.exteriormodeltoclient = world;
+       _nade.exteriormodeltoclient = NULL;
        _nade.traileffectnum = 0;
        _nade.teleportable = true;
        _nade.pushable = true;
@@ -1088,7 +1088,7 @@ void nades_Clear(entity player)
        if(player.fake_nade)
                remove(player.fake_nade);
 
-       player.nade = player.fake_nade = world;
+       player.nade = player.fake_nade = NULL;
        player.nade_timer = 0;
 }
 
@@ -1197,7 +1197,7 @@ MUTATOR_HOOKFUNCTION(nades, PlayerPreThink)
        }
 
        float n = 0;
-       entity o = world;
+       entity o = NULL;
        if(player.freezetag_frozen_timeout > 0 && time >= player.freezetag_frozen_timeout)
                n = -1;
        else
@@ -1263,7 +1263,7 @@ MUTATOR_HOOKFUNCTION(nades, PlayerSpawn)
                if(player.nade_spawnloc.cnt <= 0)
                {
                        remove(player.nade_spawnloc);
-                       player.nade_spawnloc = world;
+                       player.nade_spawnloc = NULL;
                }
        }
 }
@@ -1321,7 +1321,7 @@ MUTATOR_HOOKFUNCTION(nades, PlayerDamage_Calculate)
                Send_Effect(EFFECT_ICEORGLASS, frag_target.origin, '0 0 0', 3);
                M_ARGV(4, float) = 0;
                M_ARGV(6, vector) = '0 0 0';
-               Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVED_NADE, frag_target.netname);
+               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_FREEZETAG_REVIVED_NADE, frag_target.netname);
                Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_FREEZETAG_REVIVE_SELF);
        }
 }
index 6f08a8e..f52d75a 100644 (file)
@@ -95,7 +95,7 @@ void NIX_ChooseNextWeapon()
        RandomSelection_Init();
        FOREACH(Weapons, it != WEP_Null, LAMBDA(
                if(NIX_CanChooseWeapon(it.m_id))
-                       RandomSelection_Add(world, it.m_id, string_null, 1, (it.m_id != nix_weapon));
+                       RandomSelection_Add(NULL, it.m_id, string_null, 1, (it.m_id != nix_weapon));
        ));
        nix_nextweapon = RandomSelection_chosen_float;
 }
index c8b964c..90c671a 100644 (file)
@@ -55,7 +55,7 @@ void W_RocketPropelledChainsaw_Explode(entity this)
        this.event_damage = func_null;
        this.takedamage = DAMAGE_NO;
 
-       RadiusDamage (this, this.realowner, WEP_CVAR(rpc, damage), WEP_CVAR(rpc, edgedamage), WEP_CVAR(rpc, radius), world, world, WEP_CVAR(rpc, force), this.projectiledeathtype, other);
+       RadiusDamage (this, this.realowner, WEP_CVAR(rpc, damage), WEP_CVAR(rpc, edgedamage), WEP_CVAR(rpc, radius), NULL, NULL, WEP_CVAR(rpc, force), this.projectiledeathtype, other);
 
        remove (this);
 }
index 1adec77..10ec0cf 100644 (file)
@@ -92,7 +92,7 @@ MUTATOR_HOOKFUNCTION(physical_items, Item_Spawn)
 {
        entity item = M_ARGV(0, entity);
 
-       if(item.owner == world && autocvar_g_physical_items <= 1)
+       if(item.owner == NULL && autocvar_g_physical_items <= 1)
                return;
        if (item.spawnflags & 1) // floating item
                return;
@@ -116,7 +116,7 @@ MUTATOR_HOOKFUNCTION(physical_items, Item_Spawn)
        wep.glowmod = item.owner.glowmod;
        wep.damageforcescale = autocvar_g_physical_items_damageforcescale;
        wep.dphitcontentsmask = item.dphitcontentsmask;
-       wep.cnt = (item.owner != world);
+       wep.cnt = (item.owner != NULL);
 
        setthink(wep, physical_item_think);
        wep.nextthink = time;
index 22127ad..bc4cb67 100644 (file)
@@ -80,7 +80,7 @@ void sandbox_ObjectFunction_Think(entity this)
                        this.realowner = it;
                        break;
                }
-               this.realowner = world;
+               this.realowner = NULL;
        ));
 
        this.nextthink = time;
@@ -91,22 +91,22 @@ void sandbox_ObjectFunction_Think(entity this)
 .float old_solid, old_movetype;
 entity sandbox_ObjectEdit_Get(entity this, float permissions)
 {
-       // Returns the traced entity if the player can edit it, and world if not.
+       // Returns the traced entity if the player can edit it, and NULL if not.
        // If permissions if false, the object is returned regardless of editing rights.
        // Attached objects are SOLID_NOT and do not get traced.
 
        crosshair_trace_plusvisibletriggers(this);
        if(vdist(this.origin - trace_ent.origin, >, autocvar_g_sandbox_editor_distance_edit))
-               return world; // out of trace range
+               return NULL; // out of trace range
        if(trace_ent.classname != "object")
-               return world; // entity is not an object
+               return NULL; // entity is not an object
        if(!permissions)
                return trace_ent; // don't check permissions, anyone can edit this object
        if(trace_ent.crypto_idfp == "")
                return trace_ent; // the player who spawned this object did not have an UID, so anyone can edit it
        if (!(trace_ent.realowner != this && autocvar_g_sandbox_editor_free < 2))
                return trace_ent; // object does not belong to the player, and players can only edit their own objects on this server
-       return world;
+       return NULL;
 }
 
 void sandbox_ObjectEdit_Scale(entity e, float f)
@@ -143,14 +143,14 @@ void sandbox_ObjectAttach_Remove(entity e)
        // detaches any object attached to e
 
        entity head;
-       for(head = world; (head = find(head, classname, "object")); )
+       for(head = NULL; (head = find(head, classname, "object")); )
        {
                if(head.owner == e)
                {
                        vector org;
                        org = gettaginfo(head, 0);
-                       setattachment(head, world, "");
-                       head.owner = world;
+                       setattachment(head, NULL, "");
+                       head.owner = NULL;
 
                        // objects change origin and angles when detached, so apply previous position
                        setorigin(head, org);
@@ -212,7 +212,7 @@ void sandbox_ObjectRemove(entity e)
        sandbox_ObjectAttach_Remove(e); // detach child objects
 
        // if the object being removed has been selected for attachment by a player, unset it
-       FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && it.object_attach == e, LAMBDA(it.object_attach = world));
+       FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && it.object_attach == e, LAMBDA(it.object_attach = NULL));
 
        if(e.material)  {       strunzone(e.material);  e.material = string_null;       }
        if(e.crypto_idfp)       {       strunzone(e.crypto_idfp);       e.crypto_idfp = string_null;    }
@@ -220,7 +220,7 @@ void sandbox_ObjectRemove(entity e)
        if(e.message)   {       strunzone(e.message);   e.message = string_null;        }
        if(e.message2)  {       strunzone(e.message2);  e.message2 = string_null;       }
        remove(e);
-       e = world;
+       e = NULL;
 
        object_count -= 1;
 }
@@ -234,7 +234,7 @@ string sandbox_ObjectPort_Save(entity e, float database)
        string s;
        entity head;
 
-       for(head = world; (head = find(head, classname, "object")); )
+       for(head = NULL; (head = find(head, classname, "object")); )
        {
                // the main object needs to be first in the array [0] with attached objects following
                float slot, physics, solidity;
@@ -308,7 +308,7 @@ entity sandbox_ObjectPort_Load(entity this, string s, float database)
 {
        // load object properties, and spawn a new object with them
        float n, i;
-       entity e = world, parent = world;
+       entity e = NULL, parent = NULL;
 
        // separate objects between the ; symbols
        n = tokenizebyseparator(s, "; ");
@@ -384,10 +384,10 @@ void sandbox_Database_Save()
        fputs(file_get, strcat("// sandbox storage \"", autocvar_g_sandbox_storage_name, "\" for map \"", GetMapname(), "\" last updated ", strftime(true, "%d-%m-%Y %H:%M:%S")));
        fputs(file_get, strcat(" containing ", ftos(object_count), " objects\n"));
 
-       for(head = world; (head = find(head, classname, "object")); )
+       for(head = NULL; (head = find(head, classname, "object")); )
        {
                // attached objects are persisted separately, ignore them here
-               if(head.owner != world)
+               if(head.owner != NULL)
                        continue;
 
                // use a line of text for each object, listing all properties
@@ -530,7 +530,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand)
                        // ---------------- COMMAND: OBJECT, REMOVE ----------------
                        case "object_remove":
                                e = sandbox_ObjectEdit_Get(player, true);
-                               if(e != world)
+                               if(e != NULL)
                                {
                                        if(autocvar_g_sandbox_info > 0)
                                                LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", player.netname, " removed an object at origin ^3", vtos(e.origin), "\n"));
@@ -548,7 +548,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand)
                                        case "copy":
                                                // copies customizable properties of the selected object to the clipboard cvar
                                                e = sandbox_ObjectEdit_Get(player, autocvar_g_sandbox_editor_free); // can we copy objects we can't edit?
-                                               if(e != world)
+                                               if(e != NULL)
                                                {
                                                        s = sandbox_ObjectPort_Save(e, false);
                                                        s = strreplace("\"", "\\\"", s);
@@ -594,7 +594,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand)
                                        case "get":
                                                // select e as the object as meant to be attached
                                                e = sandbox_ObjectEdit_Get(player, true);
-                                               if(e != world)
+                                               if(e != NULL)
                                                {
                                                        player.object_attach = e;
                                                        print_to(player, "^2SANDBOX - INFO: ^7Object selected for attachment");
@@ -603,7 +603,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand)
                                                print_to(player, "^1SANDBOX - WARNING: ^7Object could not be selected for attachment. Make sure you are facing an object that you have edit rights over");
                                                return true;
                                        case "set":
-                                               if(player.object_attach == world)
+                                               if(player.object_attach == NULL)
                                                {
                                                        print_to(player, "^1SANDBOX - WARNING: ^7No object selected for attachment. Please select an object to be attached first.");
                                                        return true;
@@ -611,10 +611,10 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand)
 
                                                // attaches the previously selected object to e
                                                e = sandbox_ObjectEdit_Get(player, true);
-                                               if(e != world)
+                                               if(e != NULL)
                                                {
                                                        sandbox_ObjectAttach_Set(player.object_attach, e, argv(3));
-                                                       player.object_attach = world; // object was attached, no longer keep it scheduled for attachment
+                                                       player.object_attach = NULL; // object was attached, no longer keep it scheduled for attachment
                                                        print_to(player, "^2SANDBOX - INFO: ^7Object attached successfully");
                                                        if(autocvar_g_sandbox_info > 1)
                                                                LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", player.netname, " attached objects at origin ^3", vtos(e.origin), "\n"));
@@ -625,7 +625,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand)
                                        case "remove":
                                                // removes e if it was attached
                                                e = sandbox_ObjectEdit_Get(player, true);
-                                               if(e != world)
+                                               if(e != NULL)
                                                {
                                                        sandbox_ObjectAttach_Remove(e);
                                                        print_to(player, "^2SANDBOX - INFO: ^7Child objects detached successfully");
@@ -647,7 +647,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand)
                                }
 
                                e = sandbox_ObjectEdit_Get(player, true);
-                               if(e != world)
+                               if(e != NULL)
                                {
                                        switch(argv(2))
                                        {
@@ -737,7 +737,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand)
                                        return true;
                                }
                                e = sandbox_ObjectEdit_Get(player, true);
-                               if(e != world)
+                               if(e != NULL)
                                {
                                        // update the owner's name
                                        // Do this before checking if you're already the owner and skipping if such, so we
@@ -767,7 +767,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand)
                        case "object_info":
                                // prints public information about the object to the player
                                e = sandbox_ObjectEdit_Get(player, false);
-                               if(e != world)
+                               if(e != NULL)
                                {
                                        switch(argv(2))
                                        {
@@ -785,7 +785,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand)
                                                        s = "";
                                                        entity head;
                                                        i = 0;
-                                                       for(head = world; (head = find(head, classname, "object")); )
+                                                       for(head = NULL; (head = find(head, classname, "object")); )
                                                        {
                                                                if(head.owner == e)
                                                                {
index c53e9d1..b16a6c9 100644 (file)
@@ -25,7 +25,7 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, Spawn_Score)
        if(autocvar_g_spawn_near_teammate_ignore_spawnpoint == 1 || (autocvar_g_spawn_near_teammate_ignore_spawnpoint == 2 && player.cvar_cl_spawn_near_teammate))
                return;
 
-       spawn_spot.msnt_lookat = world;
+       spawn_spot.msnt_lookat = NULL;
 
        if(!teamplay)
                return;
@@ -79,7 +79,7 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerSpawn)
                if(autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay_death)
                        player.msnt_timer = time + autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay_death;
 
-               entity best_mate = world;
+               entity best_mate = NULL;
                vector best_spot = '0 0 0';
                float pc = 0, best_dist = 0, dist = 0;
                FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
index fc3177a..67e1440 100644 (file)
@@ -18,7 +18,7 @@ void PlayerTouchExplode(entity p1, entity p2)
 
        entity e = spawn();
        setorigin(e, org);
-       RadiusDamage(e, world, autocvar_g_touchexplode_damage, autocvar_g_touchexplode_edgedamage, autocvar_g_touchexplode_radius, world, world, autocvar_g_touchexplode_force, DEATH_TOUCHEXPLODE.m_id, world);
+       RadiusDamage(e, NULL, autocvar_g_touchexplode_damage, autocvar_g_touchexplode_edgedamage, autocvar_g_touchexplode_radius, NULL, NULL, autocvar_g_touchexplode_force, DEATH_TOUCHEXPLODE.m_id, NULL);
        remove(e);
 }
 
index d04936a..5fdb7ec 100644 (file)
@@ -880,7 +880,7 @@ void WaypointSprite_Init()
 void WaypointSprite_Kill(entity wp)
 {
     if (!wp) return;
-    if (wp.owner) wp.owner.(wp.owned_by_field) = world;
+    if (wp.owner) wp.owner.(wp.owned_by_field) = NULL;
     remove(wp);
 }
 
@@ -895,9 +895,9 @@ void WaypointSprite_Disown(entity wp, float fadetime)
     if (wp.owner)
     {
         if (wp.exteriormodeltoclient == wp.owner)
-            wp.exteriormodeltoclient = world;
-        wp.owner.(wp.owned_by_field) = world;
-        wp.owner = world;
+            wp.exteriormodeltoclient = NULL;
+        wp.owner.(wp.owned_by_field) = NULL;
+        wp.owner = NULL;
 
         WaypointSprite_FadeOutIn(wp, fadetime);
     }
@@ -951,7 +951,7 @@ entity WaypointSprite_getviewentity(entity e)
     if (IS_SPEC(e)) e = e.enemy;
     /* TODO idea (check this breaks nothing)
     else if (e.classname == "observer")
-        e = world;
+        e = NULL;
     */
     return e;
 }
@@ -1039,7 +1039,7 @@ entity WaypointSprite_SpawnFixed(
     entity icon // initial icon
 )
 {
-    return WaypointSprite_Spawn(spr, 0, 0, world, ofs, world, 0, own, ownfield, true, icon);
+    return WaypointSprite_Spawn(spr, 0, 0, NULL, ofs, NULL, 0, own, ownfield, true, icon);
 }
 
 entity WaypointSprite_DeployFixed(
@@ -1060,7 +1060,7 @@ entity WaypointSprite_DeployFixed(
         maxdistance = waypointsprite_limitedrange;
     else
         maxdistance = 0;
-    return WaypointSprite_Spawn(spr, waypointsprite_deployed_lifetime, maxdistance, world, ofs, world, t, player, waypointsprite_deployed_fixed, false, icon);
+    return WaypointSprite_Spawn(spr, waypointsprite_deployed_lifetime, maxdistance, NULL, ofs, NULL, t, player, waypointsprite_deployed_fixed, false, icon);
 }
 
 entity WaypointSprite_DeployPersonal(
@@ -1070,7 +1070,7 @@ entity WaypointSprite_DeployPersonal(
     entity icon // initial icon
 )
 {
-    return WaypointSprite_Spawn(spr, 0, 0, world, ofs, world, 0, player, waypointsprite_deployed_personal, false, icon);
+    return WaypointSprite_Spawn(spr, 0, 0, NULL, ofs, NULL, 0, player, waypointsprite_deployed_personal, false, icon);
 }
 
 entity WaypointSprite_Attach(
@@ -1082,7 +1082,7 @@ entity WaypointSprite_Attach(
 {
     float t;
     if (player.waypointsprite_attachedforcarrier)
-        return world; // can't attach to FC
+        return NULL; // can't attach to FC
     if (teamplay)
         t = player.team;
     else
@@ -1092,7 +1092,7 @@ entity WaypointSprite_Attach(
         maxdistance = waypointsprite_limitedrange;
     else
         maxdistance = 0;
-    return WaypointSprite_Spawn(spr, waypointsprite_deployed_lifetime, maxdistance, player, '0 0 64', world, t, player, waypointsprite_attached, false, icon);
+    return WaypointSprite_Spawn(spr, waypointsprite_deployed_lifetime, maxdistance, player, '0 0 64', NULL, t, player, waypointsprite_attached, false, icon);
 }
 
 entity WaypointSprite_AttachCarrier(
@@ -1102,7 +1102,7 @@ entity WaypointSprite_AttachCarrier(
 )
 {
     WaypointSprite_Kill(carrier.waypointsprite_attached); // FC overrides attached
-    entity e = WaypointSprite_Spawn(spr, 0, 0, carrier, '0 0 64', world, carrier.team, carrier, waypointsprite_attachedforcarrier, false, icon);
+    entity e = WaypointSprite_Spawn(spr, 0, 0, carrier, '0 0 64', NULL, carrier.team, carrier, waypointsprite_attachedforcarrier, false, icon);
     if (carrier.health)
     {
         WaypointSprite_UpdateMaxHealth(e, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON.m_id) * 2);
index 7d093f6..853280d 100644 (file)
@@ -43,7 +43,7 @@ string Notification_CheckArgs(
                case NOTIF_ALL:
                {
                        if (client) {
-                               return "Entity provided when world was required!";
+                               return "Entity provided when NULL was required!";
                        }
                        break;
                }
@@ -1086,7 +1086,7 @@ void Local_Notification_sound(
                #ifdef NOTIFICATIONS_DEBUG
                Debug_Notification(sprintf(
                        (
-                               "Local_Notification_sound(world, %f, '%s', %f, %f) "
+                               "Local_Notification_sound(NULL, %f, '%s', %f, %f) "
                                "^1BLOCKED BY ANTISPAM:^7 prevsnd: '%s', timediff: %f, limit: %f\n"
                         ),
                        soundchannel,
index 8ba86ee..7dcfec3 100644 (file)
@@ -423,8 +423,8 @@ string BUFF_NAME(int i);
        ARG_CASE(ARG_DC,        "item_centime",  ftos(autocvar_notification_item_centerprinttime)) \
        ARG_CASE(ARG_SV,        "death_team",    Team_ColoredFullName(f1)) \
        ARG_CASE(ARG_CS,        "death_team",    Team_ColoredFullName(f1 - 1)) \
-       ARG_CASE(ARG_CS_SV_HA,  "minigame1_name",find(world,netname,s1).descriptor.message) \
-       ARG_CASE(ARG_CS_SV_HA,  "minigame1_d",   find(world,netname,s1).descriptor.netname)
+       ARG_CASE(ARG_CS_SV_HA,  "minigame1_name",find(NULL,netname,s1).descriptor.message) \
+       ARG_CASE(ARG_CS_SV_HA,  "minigame1_d",   find(NULL,netname,s1).descriptor.netname)
 
 #define NOTIF_HIT_MAX(count,funcname) MACRO_BEGIN { \
        if(sel_num == count) { backtrace(sprintf("%s: Hit maximum arguments!\n", funcname)); break; } \
index 06ccde2..eee2172 100644 (file)
@@ -96,7 +96,7 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
                                if(!trace_ent)
                                {
                                        //dprint("_Movetype_FlyMove: !trace_ent\n");
-                                       trace_ent = world;
+                                       trace_ent = NULL;
                                }
 
                                this.move_flags |= FL_ONGROUND;
index 29ce131..0d03bff 100644 (file)
@@ -148,7 +148,7 @@ void _Movetype_Physics_Pusher(entity this, float dt)  // SV_Physics_Pusher
        {
                this.move_nextthink = 0;
                this.move_time = time;
-               other = world;
+               other = NULL;
                this.move_think(this);
        }
 }
index dbd25c8..f515a75 100644 (file)
@@ -14,7 +14,7 @@ void _Movetype_Physics_Toss(entity this, float dt)  // SV_Physics_Toss
                }
                else if (this.move_suspendedinair && wasfreed(this.move_groundentity))
                {
-                       this.move_groundentity = world;
+                       this.move_groundentity = NULL;
                        return;
                }
        }
index ec2f7ca..7e99beb 100644 (file)
@@ -28,7 +28,7 @@ void PlayerStats_GameReport_AddPlayer(entity e)
        else if(IS_BOT_CLIENT(e))
                { s = sprintf("bot#%g#%s", skill, e.cleanname); }
 
-       if((s == "") || find(world, playerstats_id, s)) // already have one of the ID - next one can't be tracked then!
+       if((s == "") || find(NULL, playerstats_id, s)) // already have one of the ID - next one can't be tracked then!
        {
                if(IS_BOT_CLIENT(e))
                        { s = sprintf("bot#%d", e.playerid); }
@@ -198,7 +198,7 @@ void PlayerStats_GameReport(float finished)
                        autocvar_g_playerstats_gamereport_uri,
                        FILE_APPEND,
                        PlayerStats_GameReport_Handler,
-                       world
+                       NULL
                );
        }
        else
@@ -635,7 +635,7 @@ void PlayerStats_PlayerDetail()
                        autocvar_g_playerstats_playerdetail_uri,
                        FILE_APPEND,
                        PlayerStats_PlayerDetail_Handler,
-                       world
+                       NULL
                );
 
                PlayerStats_PlayerDetail_Status = PS_D_STATUS_WAITING;
@@ -1013,7 +1013,7 @@ void PlayerInfo_Details()
                //uri = strcat(uri, "/player/", uri_escape(crypto_getmyidfp(0)));
                 uri = strcat(uri, "/player/me");
                print("Retrieving playerstats from URL: ", uri, "\n");
-               url_single_fopen(uri, FILE_APPEND, PlayerInfo_ready, world);
+               url_single_fopen(uri, FILE_APPEND, PlayerInfo_ready, NULL);
        }
 }
 #endif
index 7514624..9096ddd 100644 (file)
@@ -108,7 +108,7 @@ void stopsound(entity e, int chan)
 void play2(entity e, string filename)
 {
        msg_entity = e;
-       soundtoat(MSG_ONE, world, '0 0 0', CH_INFO, filename, VOL_BASE, ATTEN_NONE);
+       soundtoat(MSG_ONE, NULL, '0 0 0', CH_INFO, filename, VOL_BASE, ATTEN_NONE);
 }
 
 .float spamtime;
@@ -134,7 +134,7 @@ void play2team(float t, string filename)
 void play2all(string samp)
 {
        if (autocvar_bot_sound_monopoly) return;
-       _sound(world, CH_INFO, samp, VOL_BASE, ATTEN_NONE);
+       _sound(NULL, CH_INFO, samp, VOL_BASE, ATTEN_NONE);
 }
 
 #endif
index 03fdba4..a0255d7 100644 (file)
@@ -529,7 +529,7 @@ void Item_RespawnCountdown (entity this)
                                {
                                        entity wi = Weapons_from(this.weapon);
                                        if (wi != WEP_Null) {
-                                               entity wp = WaypointSprite_Spawn(WP_Weapon, 0, 0, this, '0 0 64', world, 0, this, waypointsprite_attached, true, RADARICON_Weapon);
+                                               entity wp = WaypointSprite_Spawn(WP_Weapon, 0, 0, this, '0 0 64', NULL, 0, this, waypointsprite_attached, true, RADARICON_Weapon);
                                                wp.wp_extra = wi.m_id;
                                                break;
                                        }
@@ -537,7 +537,7 @@ void Item_RespawnCountdown (entity this)
                                {
                                        entity ii = this.itemdef;
                                        if (ii != NULL) {
-                                               entity wp = WaypointSprite_Spawn(WP_Item, 0, 0, this, '0 0 64', world, 0, this, waypointsprite_attached, true, RADARICON_Item);
+                                               entity wp = WaypointSprite_Spawn(WP_Item, 0, 0, this, '0 0 64', NULL, 0, this, waypointsprite_attached, true, RADARICON_Item);
                                                wp.wp_extra = ii.m_id;
                                                break;
                                        }
@@ -825,7 +825,7 @@ LABEL(pickup)
                if(this.team)
                {
                        RandomSelection_Init();
-                       for(entity head = world; (head = findfloat(head, team, this.team)); )
+                       for(entity head = NULL; (head = findfloat(head, team, this.team)); )
                        {
                                if(head.flags & FL_ITEM)
                                if(head.classname != "item_flag_team" && head.classname != "item_key_team")
index ff3ce35..1a65710 100644 (file)
@@ -201,7 +201,7 @@ void func_breakable_destroy(entity this, entity actor, entity trigger)
        string oldmsg;
 
        entity act = this.owner;
-       this.owner = world; // set by W_PrepareExplosionByDamage
+       this.owner = NULL; // set by W_PrepareExplosionByDamage
 
        // now throw around the debris
        n = tokenize_console(this.debris);
@@ -214,7 +214,7 @@ void func_breakable_destroy(entity this, entity actor, entity trigger)
                _sound (this, CH_TRIGGER, this.noise, VOL_BASE, ATTEN_NORM);
 
        if(this.dmg)
-               RadiusDamage(this, act, this.dmg, this.dmg_edge, this.dmg_radius, this, world, this.dmg_force, DEATH_HURTTRIGGER.m_id, world);
+               RadiusDamage(this, act, this.dmg, this.dmg_edge, this.dmg_radius, this, NULL, this.dmg_force, DEATH_HURTTRIGGER.m_id, NULL);
 
        if(this.cnt) // TODO
                __pointparticles(this.cnt, this.absmin * 0.5 + this.absmax * 0.5, '0 0 0', this.count);
index b8980a1..e2335b8 100644 (file)
@@ -11,8 +11,8 @@ void conveyor_think(entity this)
        entity e;
 
        // set mythis as current conveyor where possible
-       for(e = world; (e = findentity(e, conveyor, this)); )
-               e.conveyor = world;
+       for(e = NULL; (e = findentity(e, conveyor, this)); )
+               e.conveyor = NULL;
 
        if(this.state)
        {
@@ -32,7 +32,7 @@ void conveyor_think(entity this)
                                                        e.conveyor = this;
                                }
 
-               for(e = world; (e = findentity(e, conveyor, this)); )
+               for(e = NULL; (e = findentity(e, conveyor, this)); )
                {
                        if(IS_CLIENT(e)) // doing it via velocity has quite some advantages
                                continue; // done in SV_PlayerPhysics   continue;
index 86d7cb2..f32a8d7 100644 (file)
@@ -520,7 +520,7 @@ void LinkDoors(entity this)
        {
                LOG_TRACE(" ", etos(t));
                t.owner = this;
-               if(t.enemy == world)
+               if(t.enemy == NULL)
                {
                        t.enemy = this;
                        break;
index ece31ac..1705d40 100644 (file)
@@ -220,11 +220,11 @@ void Draw_PointParticles(entity this)
                p.x += random() * sz.x;
                p.y += random() * sz.y;
                p.z += random() * sz.z;
-               if(WarpZoneLib_BoxTouchesBrush(p, p, this, world))
+               if(WarpZoneLib_BoxTouchesBrush(p, p, this, NULL))
                {
                        if(this.movedir != '0 0 0')
                        {
-                               traceline(p, p + normalize(this.movedir) * 4096, 0, world);
+                               traceline(p, p + normalize(this.movedir) * 4096, 0, NULL);
                                p = trace_endpos;
                                int eff_num;
                                if(this.cnt)
index 0156683..3f6af7d 100644 (file)
@@ -6,18 +6,18 @@ void train_use(entity this, entity actor, entity trigger);
 void train_wait(entity this)
 {
        SUB_UseTargets(this.enemy, NULL, NULL);
-       this.enemy = world;
+       this.enemy = NULL;
 
        // if turning is enabled, the train will turn toward the next point while waiting
        if(this.platmovetype_turn && !this.train_wait_turning)
        {
                entity targ, cp;
                vector ang;
-               targ = find(world, targetname, this.target);
+               targ = find(NULL, targetname, this.target);
                if((this.spawnflags & 1) && targ.curvetarget)
-                       cp = find(world, targetname, targ.curvetarget);
+                       cp = find(NULL, targetname, targ.curvetarget);
                else
-                       cp = world;
+                       cp = NULL;
 
                if(cp) // bezier curves movement
                        ang = cp.origin - (this.origin - this.view_ofs); // use the origin of the control point of the next path_corner
@@ -40,7 +40,7 @@ void train_wait(entity this)
 #endif
 
 #ifdef SVQC
-       entity tg = find(world, targetname, this.target);
+       entity tg = find(NULL, targetname, this.target);
        if(tg.spawnflags & 4)
        {
                this.use = train_use;
@@ -63,16 +63,16 @@ void train_wait(entity this)
 
 void train_next(entity this)
 {
-       entity targ, cp = world;
+       entity targ, cp = NULL;
        vector cp_org = '0 0 0';
 
-       targ = find(world, targetname, this.target);
+       targ = find(NULL, targetname, this.target);
        this.target = targ.target;
        if (this.spawnflags & 1)
        {
                if(targ.curvetarget)
                {
-                       cp = find(world, targetname, targ.curvetarget); // get its second target (the control point)
+                       cp = find(NULL, targetname, targ.curvetarget); // get its second target (the control point)
                        cp_org = cp.origin - this.view_ofs; // no control point found, assume a straight line to the destination
                }
        }
@@ -186,7 +186,7 @@ void train_use(entity this, entity actor, entity trigger)
 void func_train_find(entity this)
 {
        entity targ;
-       targ = find(world, targetname, this.target);
+       targ = find(NULL, targetname, this.target);
        this.target = targ.target;
        if (this.target == "")
                objerror(this, "func_train_find: no next target");
index 6eb6593..accdc99 100644 (file)
@@ -74,16 +74,16 @@ void func_vectormamamam_controller_think(entity this)
 void func_vectormamamam_findtarget(entity this)
 {
        if(this.target != "")
-               this.wp00 = find(world, targetname, this.target);
+               this.wp00 = find(NULL, targetname, this.target);
 
        if(this.target2 != "")
-               this.wp01 = find(world, targetname, this.target2);
+               this.wp01 = find(NULL, targetname, this.target2);
 
        if(this.target3 != "")
-               this.wp02 = find(world, targetname, this.target3);
+               this.wp02 = find(NULL, targetname, this.target3);
 
        if(this.target4 != "")
-               this.wp03 = find(world, targetname, this.target4);
+               this.wp03 = find(NULL, targetname, this.target4);
 
        if(!this.wp00 && !this.wp01 && !this.wp02 && !this.wp03)
                objerror(this, "No reference entity found, so there is nothing to move. Aborting.");
index 8949f17..69222bf 100644 (file)
@@ -4,12 +4,12 @@
 void follow_init(entity this)
 {
        entity src, dst;
-       src = world;
-       dst = world;
+       src = NULL;
+       dst = NULL;
        if(this.killtarget != "")
-               src = find(world, targetname, this.killtarget);
+               src = find(NULL, targetname, this.killtarget);
        if(this.target != "")
-               dst = find(world, targetname, this.target);
+               dst = find(NULL, targetname, this.target);
 
        if(!src && !dst)
        {
index 15c7e26..399ba5b 100644 (file)
@@ -52,7 +52,7 @@ void misc_laser_aim(entity this)
 void misc_laser_init(entity this)
 {
        if(this.target != "")
-               this.enemy = find(world, targetname, this.target);
+               this.enemy = find(NULL, targetname, this.target);
 }
 
 .entity pusher;
index 4ce98b9..d43cbec 100644 (file)
@@ -71,7 +71,7 @@ spawnfunc(target_music)
 }
 void TargetMusic_RestoreGame()
 {
-       for(entity e = world; (e = find(e, classname, "target_music")); )
+       for(entity e = NULL; (e = find(e, classname, "target_music")); )
        {
                if(e.targetname == "")
                        target_music_sendto(e, MSG_INIT, 1);
@@ -188,7 +188,7 @@ void TargetMusic_Advance()
                        it.lastvol = vol;
                }
        });
-       music_trigger = world;
+       music_trigger = NULL;
        bgmtime = (best) ? getsoundtime(best, CH_BGM_SINGLE) : gettime(GETTIME_CDTRACK);
 }
 
@@ -254,7 +254,7 @@ void Net_TargetMusic()
 
 void Ent_TriggerMusic_Think(entity this)
 {
-       if(WarpZoneLib_BoxTouchesBrush(view_origin, view_origin, this, world))
+       if(WarpZoneLib_BoxTouchesBrush(view_origin, view_origin, this, NULL))
        {
                music_trigger = this;
        }
index 679d66e..eced856 100644 (file)
@@ -114,7 +114,7 @@ void target_spawn_edit_entity(entity this, entity e, string msg, entity kt, enti
                                        if(time < act.pushltime)
                                                valueent = act.pusher;
                                        else
-                                               valueent = world;
+                                               valueent = NULL;
                                        value = "";
                                }
                                else if(value == "target")
@@ -144,7 +144,7 @@ void target_spawn_edit_entity(entity this, entity e, string msg, entity kt, enti
                                }
                                else if(value == "time")
                                {
-                                       valueent = world;
+                                       valueent = NULL;
                                        value = ftos(time);
                                }
                                else
@@ -238,10 +238,10 @@ void target_spawn_useon(entity e, entity this, entity actor, entity trigger)
                this,
                e,
                this.message,
-               find(world, targetname, this.killtarget),
-               find(world, targetname, this.target2),
-               find(world, targetname, this.target3),
-               find(world, targetname, this.target4),
+               find(NULL, targetname, this.killtarget),
+               find(NULL, targetname, this.target2),
+               find(NULL, targetname, this.target3),
+               find(NULL, targetname, this.target4),
                actor,
                trigger
        );
@@ -257,7 +257,7 @@ bool target_spawn_cancreate(entity this)
                return true;
 
        ++c; // increase count to not include MYSELF
-       for(e = world; (e = findfloat(e, target_spawn_id, this.target_spawn_id)); --c)
+       for(e = NULL; (e = findfloat(e, target_spawn_id, this.target_spawn_id)); --c)
                ;
 
        // if c now is 0, we have AT LEAST the given count (maybe more), so don't spawn any more
@@ -287,7 +287,7 @@ void target_spawn_use(entity this, entity actor, entity trigger)
        else
        {
                // edit entity
-               for(entity e = world; (e = find(e, targetname, this.target)); )
+               for(entity e = NULL; (e = find(e, targetname, this.target)); )
                        target_spawn_useon(e, this, actor, trigger);
        }
 }
index bfce684..bdf1e0f 100644 (file)
@@ -6,7 +6,7 @@
 
 void target_voicescript_clear(entity pl)
 {
-       pl.voicescript = world;
+       pl.voicescript = NULL;
 }
 
 void target_voicescript_use(entity this, entity actor, entity trigger)
@@ -67,7 +67,7 @@ void target_voicescript_next(entity pl)
                        }
                        else
                        {
-                               pl.voicescript = world; // stop trying then
+                               pl.voicescript = NULL; // stop trying then
                        }
                }
        }
index 90a426e..ba472ac 100644 (file)
@@ -187,7 +187,7 @@ entity Simple_TeleportPlayer(entity teleporter, entity player)
        else
        {
                RandomSelection_Init();
-               for(e = world; (e = find(e, targetname, teleporter.target)); )
+               for(e = NULL; (e = find(e, targetname, teleporter.target)); )
                {
                        p = 1;
                        if(STAT(TELEPORT_TELEFRAG_AVOID, player))
@@ -250,7 +250,7 @@ void teleport_findtarget(entity this)
 {
        int n = 0;
        entity e;
-       for(e = world; (e = find(e, targetname, this.target)); )
+       for(e = NULL; (e = find(e, targetname, this.target)); )
        {
                ++n;
 #ifdef SVQC
@@ -275,7 +275,7 @@ void teleport_findtarget(entity this)
        else
        {
                // have to use random selection every single time
-               this.enemy = world;
+               this.enemy = NULL;
        }
 
        // now enable touch
@@ -288,10 +288,10 @@ void teleport_findtarget(entity this)
 entity Teleport_Find(vector mi, vector ma)
 {
        entity e;
-       for(e = world; (e = find(e, classname, "trigger_teleport")); )
-               if(WarpZoneLib_BoxTouchesBrush(mi, ma, e, world))
+       for(e = NULL; (e = find(e, classname, "trigger_teleport")); )
+               if(WarpZoneLib_BoxTouchesBrush(mi, ma, e, NULL))
                        return e;
-       return world;
+       return NULL;
 }
 
 void WarpZone_PostTeleportPlayer_Callback(entity pl)
@@ -313,7 +313,7 @@ void WarpZone_PostTeleportPlayer_Callback(entity pl)
                if(!(pl.move_flags & BIT(15))) // FL_PROJECTILE
        #endif
                        LOG_INFO("A non-projectile got through a warpzone and its owner cleared. It's a ", pl.classname, ".\n");
-               pl.owner = world;
+               pl.owner = NULL;
        }
        if(IS_PLAYER(pl))
        {
index a09e0ba..1d30db0 100644 (file)
@@ -3,7 +3,7 @@ void trigger_disablerelay_use(entity this, entity actor, entity trigger)
 {
        int a = 0, b = 0;
 
-       for(entity e = world; (e = find(e, targetname, this.target)); )
+       for(entity e = NULL; (e = find(e, targetname, this.target)); )
        {
                if(e.use == SUB_UseTargets)
                {
index 4472b57..9dcc710 100644 (file)
@@ -10,7 +10,7 @@ void trigger_gravity_remove(entity own)
        }
        else
                backtrace("Removing a trigger_gravity_check with no valid owner");
-       own.trigger_gravity_check = world;
+       own.trigger_gravity_check = NULL;
 }
 void trigger_gravity_check_think(entity this)
 {
index 69653ad..92a4dd0 100644 (file)
@@ -4,7 +4,7 @@ void trigger_hurt_use(entity this, entity actor, entity trigger)
        if(IS_PLAYER(actor))
                this.enemy = actor;
        else
-               this.enemy = world; // let's just destroy it, if taking over is too much work
+               this.enemy = NULL; // let's just destroy it, if taking over is too much work
 }
 
 .float triggerhurttime;
@@ -31,7 +31,7 @@ void trigger_hurt_touch(entity this)
                        if (!IS_PLAYER(own))
                        {
                                own = this;
-                               this.enemy = world; // I still hate you all
+                               this.enemy = NULL; // I still hate you all
                        }
 
                        Damage (other, this, own, this.dmg, DEATH_HURTTRIGGER.m_id, other.origin, '0 0 0');
index aee2f72..91381f4 100644 (file)
@@ -13,7 +13,7 @@ void trigger_impulse_touch1(entity this)
 
        EXACTTRIGGER_TOUCH;
 
-       targ = find(world, targetname, this.target);
+       targ = find(NULL, targetname, this.target);
        if(!targ)
        {
                objerror(this, "trigger_force without a (valid) .target!\n");
index 464d05d..8100f6b 100644 (file)
@@ -152,7 +152,7 @@ void trigger_push_touch(entity this)
        {
                entity e;
                RandomSelection_Init();
-               for(e = world; (e = find(e, targetname, this.target)); )
+               for(e = NULL; (e = find(e, targetname, this.target)); )
                {
                        if(e.cnt)
                                RandomSelection_Add(e, 0, string_null, e.cnt, 1);
@@ -285,7 +285,7 @@ void trigger_push_findtarget(entity this)
        if (this.target)
        {
                float n = 0;
-               for(t = world; (t = find(t, targetname, this.target)); )
+               for(t = NULL; (t = find(t, targetname, this.target)); )
                {
                        ++n;
 #ifdef SVQC
@@ -311,12 +311,12 @@ void trigger_push_findtarget(entity this)
                else if(n == 1)
                {
                        // exactly one dest - bots love that
-                       this.enemy = find(world, targetname, this.target);
+                       this.enemy = find(NULL, targetname, this.target);
                }
                else
                {
                        // have to use random selection every single time
-                       this.enemy = world;
+                       this.enemy = NULL;
                }
        }
 #ifdef SVQC
index c8ff29c..1333978 100644 (file)
@@ -3,7 +3,7 @@
  */
 void trigger_keylock_trigger(entity this, entity actor, string s)
 {
-       for(entity t = world; (t = find(t, targetname, s)); )
+       for(entity t = NULL; (t = find(t, targetname, s)); )
                if(t.use)
                        t.use(t, actor, this);
 }
@@ -14,7 +14,7 @@ void trigger_keylock_trigger(entity this, entity actor, string s)
 void trigger_keylock_kill(string s)
 {
        entity t;
-       for(t = world; (t = find(t, targetname, s)); )
+       for(t = NULL; (t = find(t, targetname, s)); )
                remove(t);
 }
 
index dabbbd2..bbb49d0 100644 (file)
@@ -1,7 +1,7 @@
 #ifdef SVQC
 void relay_activators_use(entity this, entity actor, entity trigger)
 {
-       for(entity trg = world; (trg = find(trg, targetname, this.target)); )
+       for(entity trg = NULL; (trg = find(trg, targetname, this.target)); )
        {
                if (trg.setactive)
                        trg.setactive(trg, this.cnt);
index 9e4ab50..9d675bb 100644 (file)
@@ -17,8 +17,8 @@ void viewloc_think(entity this)
        // we abuse this method, rather than using normal .touch, because touch isn't reliable with multiple clients inside the same trigger, and can't "untouch" entities
 
        // set myself as current viewloc where possible
-       for(e = world; (e = findentity(e, viewloc, this)); )
-               e.viewloc = world;
+       for(e = NULL; (e = findentity(e, viewloc, this)); )
+               e.viewloc = NULL;
 
                for(e = findradius((this.absmin + this.absmax) * 0.5, vlen(this.absmax - this.absmin) * 0.5 + 1); e; e = e.chain)
                        if(!e.viewloc)
@@ -58,13 +58,13 @@ bool trigger_viewloc_send(entity this, entity to, int sf)
 void viewloc_init(entity this)
 {
        entity e;
-       for(e = world; (e = find(e, targetname, this.target)); )
+       for(e = NULL; (e = find(e, targetname, this.target)); )
                if(e.classname == "target_viewlocation_start")
                {
                        this.enemy = e;
                        break;
                }
-       for(e = world; (e = find(e, targetname, this.target2)); )
+       for(e = NULL; (e = find(e, targetname, this.target2)); )
                if(e.classname == "target_viewlocation_end")
                {
                        this.goalentity = e;
@@ -136,8 +136,8 @@ spawnfunc(target_viewlocation) { spawnfunc_target_viewlocation_start(this); }
 
 void trigger_viewloc_updatelink(entity this)
 {
-       this.enemy = findfloat(world, entnum, this.cnt);
-       this.goalentity = findfloat(world, entnum, this.count);
+       this.enemy = findfloat(NULL, entnum, this.cnt);
+       this.goalentity = findfloat(NULL, entnum, this.count);
 }
 
 NET_HANDLE(ENT_CLIENT_VIEWLOC_TRIGGER, bool isnew)
@@ -145,8 +145,8 @@ NET_HANDLE(ENT_CLIENT_VIEWLOC_TRIGGER, bool isnew)
        float point1 = ReadShort();
        float point2 = ReadShort();
 
-       this.enemy = findfloat(world, entnum, point1);
-       this.goalentity = findfloat(world, entnum, point2);
+       this.enemy = findfloat(NULL, entnum, point1);
+       this.goalentity = findfloat(NULL, entnum, point2);
 
        this.origin_x = ReadCoord();
        this.origin_y = ReadCoord();
index 0e13a6b..a905035 100644 (file)
@@ -224,7 +224,7 @@ void SUB_UseTargets(entity this, entity actor, entity trigger)
        s = this.killtarget;
        if (s != "")
        {
-               for(entity t = world; (t = find(t, targetname, s)); )
+               for(entity t = NULL; (t = find(t, targetname, s)); )
                        remove(t);
        }
 #endif
@@ -251,7 +251,7 @@ void SUB_UseTargets(entity this, entity actor, entity trigger)
                        // Flag to set func_clientwall state
                        // 1 == deactivate, 2 == activate, 0 == do nothing
                        int aw_flag = this.antiwall_flag;
-                       for(entity t = world; (t = find(t, targetname, s)); )
+                       for(entity t = NULL; (t = find(t, targetname, s)); )
                        {
                                if(t.use)
                                {
index d0e07bc..dc48fd1 100644 (file)
@@ -54,8 +54,8 @@ void turret_checkpoint_init(entity this)
 
     if(this.target != "")
     {
-        this.enemy = find(world, targetname, this.target);
-        if(this.enemy == world)
+        this.enemy = find(NULL, targetname, this.target);
+        if(this.enemy == NULL)
             LOG_TRACE("A turret_checkpoint faild to find its target!\n");
     }
     //setthink(this, turret_checkpoint_think);
index 347a5ff..55719cb 100644 (file)
@@ -2,7 +2,7 @@ void turret_remove(entity this)
 {
        remove(this.tur_head);
        //remove(this.enemy);
-       this.tur_head = world;
+       this.tur_head = NULL;
 }
 
 .vector glowmod;
@@ -206,7 +206,7 @@ void turret_construct(entity this)
 {
        entity tur = get_turretinfo(this.m_id);
 
-       if(this.tur_head == world)
+       if(this.tur_head == NULL)
                this.tur_head = spawn();
 
        this.netname = tur.turret_name;
@@ -282,9 +282,9 @@ entity turret_gibtoss(string _model, vector _from, vector _to, vector _cmod, flo
 {
        entity gib;
 
-       traceline(_from, _to, MOVE_NOMONSTERS, world);
+       traceline(_from, _to, MOVE_NOMONSTERS, NULL);
        if(trace_startsolid)
-               return world;
+               return NULL;
 
        gib = new(turret_gib);
        setorigin(gib, _from);
@@ -379,7 +379,7 @@ NET_HANDLE(ENT_CLIENT_TURRET, bool isnew)
 
        if(sf & TNSF_ANG)
        {
-               if(this.tur_head == world) // aparenly this can happpen before TNSF_SETUP. great.
+               if(this.tur_head == NULL) // aparenly this can happpen before TNSF_SETUP. great.
                        this.tur_head = spawn();
 
                this.tur_head.move_angles_x = ReadShort();
@@ -390,7 +390,7 @@ NET_HANDLE(ENT_CLIENT_TURRET, bool isnew)
 
        if(sf & TNSF_AVEL)
        {
-               if(this.tur_head == world) // aparenly this can happpen before TNSF_SETUP. great.
+               if(this.tur_head == NULL) // aparenly this can happpen before TNSF_SETUP. great.
                        this.tur_head = spawn();
 
                this.tur_head.move_avelocity_x = ReadShort();
index 022e73c..f5989b4 100644 (file)
@@ -38,7 +38,7 @@ void Dump_Turret_Settings()
                it.tr_config(it);
 
                // step 3: sort queue
-               heapsort(TUR_CONFIG_COUNT, T_Config_Queue_Swap, T_Config_Queue_Compare, world);
+               heapsort(TUR_CONFIG_COUNT, T_Config_Queue_Swap, T_Config_Queue_Compare, NULL);
 
                // step 4: write queue
                TUR_CONFIG_WRITETOFILE(sprintf("// {{{ #%d: %s\n", i, it.turret_name))
index 154ae69..57bb008 100644 (file)
@@ -186,7 +186,7 @@ void turret_die(entity this)
        this.health                      = 0;
 
 // Go boom
-       //RadiusDamage (this,this, min(this.ammo,50),min(this.ammo,50) * 0.25,250,world,min(this.ammo,50)*5,DEATH_TURRET,world);
+       //RadiusDamage (this,this, min(this.ammo,50),min(this.ammo,50) * 0.25,250,NULL,min(this.ammo,50)*5,DEATH_TURRET,NULL);
 
        Turret tur = get_turretinfo(this.m_id);
        if(this.damage_flags & TFL_DMG_DEATH_NORESPAWN)
@@ -267,7 +267,7 @@ void turret_respawn(entity this)
        this.tur_head.avelocity         = this.avelocity;
        this.tur_head.angles            = this.idle_aim;
        this.health                                     = this.max_health;
-       this.enemy                                      = world;
+       this.enemy                                      = NULL;
        this.volly_counter                      = this.shot_volly;
        this.ammo                                       = this.ammo_max;
 
@@ -365,7 +365,7 @@ void load_unit_settings(entity ent, bool is_reload)
        string unitname = ent.netname;
        string sbase;
 
-       if (ent == world)
+       if (ent == NULL)
                return;
 
        if(!ent.turret_scale_damage)    ent.turret_scale_damage = 1;
@@ -379,7 +379,7 @@ void load_unit_settings(entity ent, bool is_reload)
        sbase = strcat(cvar_base,unitname);
        if (is_reload)
        {
-               ent.enemy = world;
+               ent.enemy = NULL;
                ent.tur_head.avelocity = '0 0 0';
 
                ent.tur_head.angles = '0 0 0';
@@ -434,11 +434,11 @@ void turret_projectile_explode(entity this)
        this.event_damage = func_null;
 #ifdef TURRET_DEBUG
        float d;
-       d = RadiusDamage (this, this.owner, this.owner.shot_dmg, 0, this.owner.shot_radius, this, world, this.owner.shot_force, this.totalfrags, world);
+       d = RadiusDamage (this, this.owner, this.owner.shot_dmg, 0, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, NULL);
        this.owner.tur_debug_dmg_t_h = this.owner.tur_debug_dmg_t_h + d;
        this.owner.tur_debug_dmg_t_f = this.owner.tur_debug_dmg_t_f + this.owner.shot_dmg;
 #else
-       RadiusDamage (this, this.realowner, this.owner.shot_dmg, 0, this.owner.shot_radius, this, world, this.owner.shot_force, this.totalfrags, world);
+       RadiusDamage (this, this.realowner, this.owner.shot_dmg, 0, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, NULL);
 #endif
        remove(this);
 }
@@ -547,7 +547,7 @@ void turret_track(entity this)
 
        if(!this.active)
                target_angle = this.idle_aim - ('1 0 0' * this.aim_maxpitch);
-       else if (this.enemy == world)
+       else if (this.enemy == NULL)
        {
                if(time > this.lip)
                        target_angle = this.idle_aim + this.angles;
@@ -844,13 +844,13 @@ entity turret_select_target(entity this)
                m_score = this.turret_score_target(this,e_enemy) * this.target_select_samebias;
        }
        else
-               e_enemy = this.enemy = world;
+               e_enemy = this.enemy = NULL;
 
        e = findradius(this.origin, this.target_range);
 
        // Nothing to aim at?
        if (!e)
-               return world;
+               return NULL;
 
        while (e)
        {
@@ -903,7 +903,7 @@ bool turret_firecheck(entity this)
        if (this.firecheck_flags & TFL_FIRECHECK_NO)
                return true;
 
-       if (this.enemy == world)
+       if (this.enemy == NULL)
                return false;
 
        // Ready?
@@ -999,7 +999,7 @@ void turret_fire(entity this)
                this.volly_counter = this.shot_volly;
 
                if (this.shoot_flags & TFL_SHOOT_CLEARTARGET)
-                       this.enemy = world;
+                       this.enemy = NULL;
 
                if (this.shot_volly > 1)
                        this.attack_finished_single[0] = time + this.shot_volly_refire;
@@ -1061,7 +1061,7 @@ void turret_think(entity this)
 
                        e = e.chain;
                }
-               this.enemy = world;
+               this.enemy = NULL;
        }
        else if(this.shoot_flags & TFL_SHOOT_CUSTOM)
        {
@@ -1118,7 +1118,7 @@ void turret_think(entity this)
                if(this.target_validate_time < time)
                if (turret_validate_target(this, this.enemy, this.target_validate_flags) <= 0)
                {
-                       this.enemy = world;
+                       this.enemy = NULL;
                        this.target_validate_time = time + 0.5;
                        do_target_scan = 1;
                }
@@ -1134,7 +1134,7 @@ void turret_think(entity this)
                }
 
                // No target, just go to idle, do any custom stuff and bail.
-               if (this.enemy == world)
+               if (this.enemy == NULL)
                {
                        // Turn & pitch
                        if(!(this.track_flags & TFL_TRACK_NO))
@@ -1170,7 +1170,7 @@ void turret_think(entity this)
 
 /*
        When .used a turret switch team to activator.team.
-       If activator is world, the turret go inactive.
+       If activator is NULL, the turret go inactive.
 */
 void turret_use(entity this, entity actor, entity trigger)
 {
@@ -1250,7 +1250,7 @@ bool turret_initialize(entity this, Turret tur)
                tur.tr_precache(tur);
        }
 
-       entity e = find(world, classname, "turret_manager");
+       entity e = find(NULL, classname, "turret_manager");
        if(!e)
        {
                e = new(turret_manager);
@@ -1354,8 +1354,8 @@ bool turret_initialize(entity this, Turret tur)
        if(!this.tur_defend)
        if(this.target != "")
        {
-               this.tur_defend = find(world, targetname, this.target);
-               if (this.tur_defend == world)
+               this.tur_defend = find(NULL, targetname, this.target);
+               if (this.tur_defend == NULL)
                {
                        this.target = "";
                        LOG_TRACE("Turret has invalid defendpoint!\n");
index 2d01c36..a72a9f0 100644 (file)
@@ -41,11 +41,11 @@ void ewheel_move_path(entity this)
 #ifdef EWHEEL_FANCYPATH
     // Are we close enougth to a path node to switch to the next?
     if(vdist(this.origin - this.pathcurrent.origin, <, 64))
-        if (this.pathcurrent.path_next == world)
+        if (this.pathcurrent.path_next == NULL)
         {
             // Path endpoint reached
             pathlib_deletepath(this.pathcurrent.owner);
-            this.pathcurrent = world;
+            this.pathcurrent = NULL;
 
             if (this.pathgoal)
             {
@@ -59,7 +59,7 @@ void ewheel_move_path(entity this)
                 }
             }
             else
-                this.pathgoal = world;
+                this.pathgoal = NULL;
         }
         else
             this.pathcurrent = this.pathcurrent.path_next;
@@ -187,13 +187,13 @@ METHOD(EWheel, tr_setup, void(EWheel this, entity it))
     if(it.movetype == MOVETYPE_WALK)
     {
         it.velocity = '0 0 0';
-        it.enemy = world;
+        it.enemy = NULL;
 
         setorigin(it, it.pos1);
 
         if (it.target != "")
         {
-            e = find(world, targetname, it.target);
+            e = find(NULL, targetname, it.target);
             if (!e)
             {
                 LOG_TRACE("Initital waypoint for ewheel does NOT exsist, fix your map!\n");
index e02c184..3037f65 100644 (file)
@@ -38,16 +38,16 @@ METHOD(FlacAttack, wr_think, void(entity thiswep, entity actor, .entity weaponen
 
 void turret_flac_projectile_think_explode(entity this)
 {
-    if(this.enemy != world)
+    if(this.enemy != NULL)
     if(vdist(this.origin - this.enemy.origin, <, this.owner.shot_radius * 3))
         setorigin(this, this.enemy.origin + randomvec() * this.owner.shot_radius);
 
 #ifdef TURRET_DEBUG
-    float d = RadiusDamage (this, this.owner, this.owner.shot_dmg, this.owner.shot_dmg, this.owner.shot_radius, this, world, this.owner.shot_force, this.totalfrags, world);
+    float d = RadiusDamage (this, this.owner, this.owner.shot_dmg, this.owner.shot_dmg, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, NULL);
     this.owner.tur_dbg_dmg_t_h = this.owner.tur_dbg_dmg_t_h + d;
     this.owner.tur_dbg_dmg_t_f = this.owner.tur_dbg_dmg_t_f + this.owner.shot_dmg;
 #else
-    RadiusDamage (this, this.realowner, this.owner.shot_dmg, this.owner.shot_dmg, this.owner.shot_radius, this, world, this.owner.shot_force, this.totalfrags, world);
+    RadiusDamage (this, this.realowner, this.owner.shot_dmg, this.owner.shot_dmg, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, NULL);
 #endif
     remove(this);
 }
index bdac1f0..945b35d 100644 (file)
@@ -25,7 +25,7 @@ bool turret_fusionreactor_firecheck(entity this)
     if (IS_DEAD(this.enemy))
         return false;
 
-    if (this.enemy == world)
+    if (this.enemy == NULL)
         return false;
 
     if (this.ammo < this.shot_dmg)
index 0b112f2..9e737ea 100644 (file)
@@ -55,11 +55,11 @@ void turret_hellion_missile_think(entity this)
         turret_projectile_explode(this);
 
     // Enemy dead? just keep on the current heading then.
-    if ((this.enemy == world) || (IS_DEAD(this.enemy)))
+    if ((this.enemy == NULL) || (IS_DEAD(this.enemy)))
     {
 
         // Make sure we dont return to tracking a respawned player
-        this.enemy = world;
+        this.enemy = NULL;
 
         // Turn model
         this.angles = vectoangles(this.velocity);
index 5a4677d..dc6f49c 100644 (file)
@@ -64,7 +64,7 @@ void turret_hk_missile_think(entity this)
     // turret_hk_missile_explode();
 
     if (IS_DEAD(this.enemy))
-        this.enemy = world;
+        this.enemy = NULL;
 
     // Pick the closest valid target.
     if (!this.enemy)
@@ -116,7 +116,7 @@ void turret_hk_missile_think(entity this)
         fe = 0;
     }
 
-    if ((fe != 1) || (this.enemy == world) || (edist > 1000))
+    if ((fe != 1) || (this.enemy == NULL) || (edist > 1000))
     {
         myspeed = vlen(this.velocity);
 
@@ -226,15 +226,15 @@ void turret_hk_missile_think(entity this)
     //if(this.atime < time) {
     if ((fe <= 0.99)||(edist > 1000))
     {
-        te_lightning2(world,this.origin, this.origin + vr * lt_seek);
-        te_lightning2(world,this.origin, this.origin + vl * lt_seek);
-        te_lightning2(world,this.origin, this.origin + vu * lt_seek);
-        te_lightning2(world,this.origin, this.origin + vd * lt_seek);
-        te_lightning2(world,this.origin, vf);
+        te_lightning2(NULL,this.origin, this.origin + vr * lt_seek);
+        te_lightning2(NULL,this.origin, this.origin + vl * lt_seek);
+        te_lightning2(NULL,this.origin, this.origin + vu * lt_seek);
+        te_lightning2(NULL,this.origin, this.origin + vd * lt_seek);
+        te_lightning2(NULL,this.origin, vf);
     }
     else
     {
-        te_lightning2(world,this.origin, this.enemy.origin);
+        te_lightning2(NULL,this.origin, this.enemy.origin);
     }
     bprint("Speed: ", ftos(rint(myspeed)), "\n");
     bprint("Trace to solid: ", ftos(rint(ff * 100)), "%\n");
@@ -248,7 +248,7 @@ void turret_hk_missile_think(entity this)
 
 bool hk_is_valid_target(entity this, entity e_target)
 {
-    if (e_target == world)
+    if (e_target == NULL)
         return false;
 
     // If only this was used more..
index 2182eb1..7b71ccf 100644 (file)
@@ -35,7 +35,7 @@ METHOD(PlasmaTurret, tr_attack, void(PlasmaTurret this, entity it))
 
         // teamcolor / hit beam effect
         vector v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
-        WarpZone_TrailParticles(world, particleeffectnum(EFFECT_VAPORIZER(it.team)), it.tur_shotorg, v);
+        WarpZone_TrailParticles(NULL, particleeffectnum(EFFECT_VAPORIZER(it.team)), it.tur_shotorg, v);
     }
     else
     {
index 8dc0df4..86df150 100644 (file)
@@ -41,7 +41,7 @@ METHOD(DualPlasmaTurret, tr_attack, void(DualPlasmaTurret thistur, entity it))
 
         // teamcolor / hit beam effect
         vector v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
-        WarpZone_TrailParticles(world, particleeffectnum(EFFECT_VAPORIZER(it.team)), it.tur_shotorg, v);
+        WarpZone_TrailParticles(NULL, particleeffectnum(EFFECT_VAPORIZER(it.team)), it.tur_shotorg, v);
     } else {
         SUPER(PlasmaTurret).tr_attack(thistur, it);
     }
index 7da97e7..cdc6ba3 100644 (file)
@@ -81,7 +81,7 @@ bool turret_tesla_firecheck(entity this)
     if(this.target_validate_time < time)
     if (turret_validate_target(this, this.enemy, this.target_validate_flags) <= 0)
     {
-        this.enemy = world;
+        this.enemy = NULL;
         this.target_validate_time = time + 0.5;
         do_target_scan = 1;
     }
index a2062f5..e21cd49 100644 (file)
@@ -38,7 +38,7 @@ METHOD(TeslaCoilTurretAttack, wr_think, void(entity thiswep, entity actor, .enti
             d *= 0.75;
             r *= 0.85;
             t = toast(actor, t, r, d);
-            if (t == world) break;
+            if (t == NULL) break;
 
         }
 
@@ -54,7 +54,7 @@ METHOD(TeslaCoilTurretAttack, wr_think, void(entity thiswep, entity actor, .enti
 entity toast(entity actor, entity from, float range, float damage)
 {
     entity e;
-    entity etarget = world;
+    entity etarget = NULL;
     float d,dd;
     float r;
 
index 8d8106a..1a5c3f0 100644 (file)
@@ -99,7 +99,7 @@ void walker_setnoanim(entity this)
 }
 void walker_rocket_explode(entity this)
 {
-    RadiusDamage (this, this.owner, (autocvar_g_turrets_unit_walker_rocket_damage), 0, (autocvar_g_turrets_unit_walker_rocket_radius), this, world, (autocvar_g_turrets_unit_walker_rocket_force), DEATH_TURRET_WALK_ROCKET.m_id, world);
+    RadiusDamage (this, this.owner, (autocvar_g_turrets_unit_walker_rocket_damage), 0, (autocvar_g_turrets_unit_walker_rocket_radius), this, NULL, (autocvar_g_turrets_unit_walker_rocket_force), DEATH_TURRET_WALK_ROCKET.m_id, NULL);
     remove (this);
 }
 
@@ -155,8 +155,8 @@ void walker_rocket_think(entity this)
     m_speed = vlen(this.velocity);
 
     // Enemy dead? just keep on the current heading then.
-    if (this.enemy == world || IS_DEAD(this.enemy))
-        this.enemy = world;
+    if (this.enemy == NULL || IS_DEAD(this.enemy))
+        this.enemy = NULL;
 
     if (this.enemy)
     {
@@ -299,11 +299,11 @@ void walker_move_path(entity this)
 #ifdef WALKER_FANCYPATHING
     // Are we close enougth to a path node to switch to the next?
     if(vdist(this.origin - this.pathcurrent.origin, <, 64))
-        if (this.pathcurrent.path_next == world)
+        if (this.pathcurrent.path_next == NULL)
         {
             // Path endpoint reached
             pathlib_deletepath(this.pathcurrent.owner);
-            this.pathcurrent = world;
+            this.pathcurrent = NULL;
 
             if (this.pathgoal)
             {
@@ -317,7 +317,7 @@ void walker_move_path(entity this)
                 }
             }
             else
-                this.pathgoal = world;
+                this.pathgoal = NULL;
         }
         else
             this.pathcurrent = this.pathcurrent.path_next;
@@ -347,7 +347,7 @@ METHOD(WalkerTurret, tr_think, void(WalkerTurret thistur, entity it))
 
     if (it.spawnflags & TSF_NO_PATHBREAK && it.pathcurrent)
         walker_move_path(it);
-    else if (it.enemy == world)
+    else if (it.enemy == NULL)
     {
         if(it.pathcurrent)
             walker_move_path(it);
@@ -599,7 +599,7 @@ METHOD(WalkerTurret, tr_setup, void(WalkerTurret this, entity it))
 
     if (it.target != "")
     {
-        e = find(world, targetname, it.target);
+        e = find(NULL, targetname, it.target);
         if (!e)
         {
             LOG_TRACE("Initital waypoint for walker does NOT exsist, fix your map!\n");
index 5d8ee32..4928262 100644 (file)
@@ -39,8 +39,8 @@ void FireImoBeam(entity this, vector start, vector end, vector smin, vector smax
        {
                tracebox(start, smin, smax, end, false, this);
 
-               // if it is world we can't hurt it so stop now
-               if (trace_ent == world || trace_fraction == 1)
+               // if it is NULL we can't hurt it so stop now
+               if (trace_ent == NULL || trace_fraction == 1)
                        break;
 
                if (trace_ent.solid == SOLID_BSP)
@@ -60,7 +60,7 @@ void FireImoBeam(entity this, vector start, vector end, vector smin, vector smax
        endpoint = trace_endpos;
 
        // find all the entities the railgun hit and restore their solid state
-       ent = findfloat(world, railgunhit, true);
+       ent = findfloat(NULL, railgunhit, true);
        while (ent)
        {
                // restore their solid type
@@ -69,7 +69,7 @@ void FireImoBeam(entity this, vector start, vector end, vector smin, vector smax
        }
 
        // find all the entities the railgun hit and hurt them
-       ent = findfloat(world, railgunhit, true);
+       ent = findfloat(NULL, railgunhit, true);
        while (ent)
        {
                // get the details we need to call the damage function