]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Replace all direct references to setSendEntity with Net_LinkEntity
authorMario <mario.mario@y7mail.com>
Fri, 1 Jul 2022 15:27:02 +0000 (01:27 +1000)
committerMario <mario.mario@y7mail.com>
Fri, 1 Jul 2022 15:27:02 +0000 (01:27 +1000)
51 files changed:
qcsrc/common/effects/qc/damageeffects.qc
qcsrc/common/effects/qc/modeleffects.qc
qcsrc/common/ent_cs.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_controlpoint.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/common/items/inventory.qh
qcsrc/common/mapobjects/func/conveyor.qc
qcsrc/common/mapobjects/func/door.qc
qcsrc/common/mapobjects/func/plat.qc
qcsrc/common/mapobjects/func/pointparticles.qc
qcsrc/common/mapobjects/func/rainsnow.qc
qcsrc/common/mapobjects/func/train.qc
qcsrc/common/mapobjects/misc/laser.qc
qcsrc/common/mapobjects/misc/teleport_dest.qc
qcsrc/common/mapobjects/models.qc
qcsrc/common/mapobjects/target/music.qc
qcsrc/common/mapobjects/trigger/jumppads.qc
qcsrc/common/mapobjects/trigger/keylock.qc
qcsrc/common/mapobjects/trigger/viewloc.qc
qcsrc/common/mapobjects/triggers.qc
qcsrc/common/minigames/minigame/bd.qc
qcsrc/common/minigames/minigames.qc
qcsrc/common/minigames/sv_minigames.qc
qcsrc/common/mutators/base.qh
qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/physical_items/sv_physical_items.qc
qcsrc/common/mutators/mutator/status_effects/status_effects.qh
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/notifications/all.qc
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/bumblebee.qc
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/tuba.qc
qcsrc/common/wepent.qc
qcsrc/lib/csqcmodel/sv_model.qc
qcsrc/lib/net.qh
qcsrc/lib/warpzone/server.qc
qcsrc/server/client.qc
qcsrc/server/command/vote.qc
qcsrc/server/elimination.qc
qcsrc/server/hook.qc
qcsrc/server/items/items.qc
qcsrc/server/mapvoting.qc
qcsrc/server/scores.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/weapons/accuracy.qc
qcsrc/server/weapons/csqcprojectile.qc
qcsrc/server/world.qc

index 3ef63b138aee0740bb80706a5a4c0f8e7e307b3a..afde0a2bbf57c48152f9734ee17fd4f916e7821b 100644 (file)
@@ -41,7 +41,7 @@ void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad
        e.oldorigin_x = compressShortVector(e.velocity);
        e.species = bloodtype;
 
-       Net_LinkEntity(e, false, 0.2, Damage_DamageInfo_SendEntity);
+       Net_LinkEntity(e, false, true, 0.2, Damage_DamageInfo_SendEntity);
 }
 
 #endif
index 41eee445c61b9616a2e76444b0bb63431cdf5838..87070871e79ef71081b6052f78a3b6d16c2b8449 100644 (file)
@@ -68,7 +68,7 @@ void modeleffect_spawn(string m, float s, float f, vector o, vector v, vector an
                e.scale2 = -s2;
        float sz = max(e.scale, e.scale2);
        setsize(e, e.mins * sz, e.maxs * sz);
-       Net_LinkEntity(e, false, 0.1, modeleffect_SendEntity);
+       Net_LinkEntity(e, false, true, 0.1, modeleffect_SendEntity);
 }
 
 #endif
index 5366371458fe52fadb86e3c2d7fc3dd8b2ca44db..3efb875eba7ace6730c2341c449bc305db058d37 100644 (file)
@@ -245,7 +245,7 @@ ENTCS_PROP(SOLID, true, sv_solid, solid, ENTCS_SET_NORMAL,
                e.owner = player;
                setthink(e, entcs_think);
                e.nextthink = time;
-               Net_LinkEntity(e, false, 0, entcs_send);
+               Net_LinkEntity(e, false, true, 0, entcs_send);
                // NOTE: the following code block has been disabled as a workaround for https://gitlab.com/xonotic/xonotic-data.pk3dir/-/issues/1824
 #if 0
                if (!IS_REAL_CLIENT(player)) return;
index fde9ed6fd7a8c5a058dc756eeada0cf842868693..19c2755b789ec5a7f0c079432993e9b7c3d25fdc 100644 (file)
@@ -34,7 +34,7 @@ bool cpicon_send(entity this, entity to, int sf)
 
 void onslaught_controlpoint_icon_link(entity e, void(entity this) spawnproc)
 {
-       Net_LinkEntity(e, true, 0, cpicon_send);
+       Net_LinkEntity(e, true, true, 0, cpicon_send);
        setthink(e, spawnproc);
        e.nextthink     = time + sys_frametime;
 }
index 7f2def318011cb2a17f497345a0ba09784483e75..f6ac557cb6e699177669f9742c0c6423442933a8 100644 (file)
@@ -878,7 +878,7 @@ void ons_camSetup(entity this)
        cam.origin = this.origin;
        setorigin(cam, cam.origin);
        cam.angles = best_ang;
-       Net_LinkEntity(cam, false, 0, clientcamera_send);
+       Net_LinkEntity(cam, false, true, 0, clientcamera_send);
 
        FOREACH_CLIENT(true, it.clientcamera = cam;);
 
@@ -1029,7 +1029,7 @@ void ons_GeneratorReset(entity this)
        setthink(this, ons_GeneratorThink);
        this.nextthink = time + GEN_THINKRATE;
 
-       Net_LinkEntity(this, false, 0, generator_send);
+       Net_LinkEntity(this, false, true, 0, generator_send);
 
        this.SendFlags = GSF_SETUP; // just incase
        this.SendFlags |= GSF_STATUS;
@@ -1053,7 +1053,7 @@ void ons_DelayedGeneratorSetup(entity this)
 
        onslaught_updatelinks();
 
-       Net_LinkEntity(this, false, 0, generator_send);
+       Net_LinkEntity(this, false, true, 0, generator_send);
 }
 
 
@@ -2089,7 +2089,7 @@ spawnfunc(onslaught_link)
        ons_worldlinklist = this;
 
        InitializeEntity(this, ons_DelayedLinkSetup, INITPRIO_FINDTARGET);
-       Net_LinkEntity(this, false, 0, ons_Link_Send);
+       Net_LinkEntity(this, false, true, 0, ons_Link_Send);
 }
 
 /*QUAKED spawnfunc_onslaught_controlpoint (0 .5 .8) (-32 -32 0) (32 32 128)
index 22a4d94c387335f833d0867f2acb1df01e776663..73aa6d58e3e918b5958dab9cd738c466d3eba04c 100644 (file)
@@ -140,7 +140,7 @@ void Inventory_new(PlayerState this)
     setcefc(inv, Inventory_customize);
        this.inventory = inv;
        inv.owner = this;
-       Net_LinkEntity(inv, false, 0, Inventory_Send);
+       Net_LinkEntity(inv, false, true, 0, Inventory_Send);
 }
 void Inventory_delete(entity e) { delete(e.inventory); }
 void Inventory_update(entity e) { e.inventory.SendFlags = 0xFFFFFF; }
index 3666dd337b2c56ffed1b03ca54d1339dfe98d4e8..5290577410cddf6fd6991f3cef89724f7e2b2da2 100644 (file)
@@ -106,7 +106,7 @@ void conveyor_init(entity this)
        this.reset = generic_netlinked_reset;
        this.reset(this);
 
-       Net_LinkEntity(this, 0, false, conveyor_send);
+       Net_LinkEntity(this, false, true, 0, conveyor_send);
 
        this.SendFlags |= SF_TRIGGER_INIT;
 }
index 6b69077a09abe2d7e49925a1fc9bb4df72025be3..f75f1e108cecf04a182170ff90de8b7a3d44c00d 100644 (file)
@@ -595,7 +595,7 @@ float door_send(entity this, entity to, float sf)
 
 void door_link()
 {
-       //Net_LinkEntity(this, false, 0, door_send);
+       //Net_LinkEntity(this, false, true, 0, door_send);
 }
 #endif
 
index d001fe299dd835821f9815e59aed842b35e551eb..eef78dbbd52d6a770395497018dd6b3da09e4d39 100644 (file)
@@ -51,7 +51,7 @@ float plat_send(entity this, entity to, float sf)
 
 void plat_link(entity this)
 {
-       //Net_LinkEntity(this, 0, false, plat_send);
+       //Net_LinkEntity(this, false, true, 0, plat_send);
 }
 
 spawnfunc(func_plat)
index 72ad355987c2399bbcfd79d6682a4bd6d530207e..7aa34ce474e8d16b71e0afe72a4a740414452069 100644 (file)
@@ -113,7 +113,7 @@ spawnfunc(func_pointparticles)
        //if(!this.cnt) this.cnt = _particleeffectnum(this.mdl);
        this.setactive = generic_netlinked_setactive;
 
-       Net_LinkEntity(this, (this.spawnflags & PARTICLES_VISCULLING), 0, pointparticles_SendEntity);
+       Net_LinkEntity(this, (this.spawnflags & PARTICLES_VISCULLING), true, 0, pointparticles_SendEntity);
 
        if(this.targetname && this.targetname != "")
        {
index de49f1e367c508327cc1363e8a57b9ec9f1a61e6..c779c60c5222c75944cf3e26bf5f007bdfae2955 100644 (file)
@@ -53,7 +53,7 @@ spawnfunc(func_rain)
 
        this.state = RAINSNOW_RAIN;
 
-       Net_LinkEntity(this, false, 0, rainsnow_SendEntity);
+       Net_LinkEntity(this, false, true, 0, rainsnow_SendEntity);
 }
 
 
@@ -93,7 +93,7 @@ spawnfunc(func_snow)
 
        this.state = RAINSNOW_SNOW;
 
-       Net_LinkEntity(this, false, 0, rainsnow_SendEntity);
+       Net_LinkEntity(this, false, true, 0, rainsnow_SendEntity);
 }
 #elif defined(CSQC)
 float autocvar_cl_rainsnow_maxdrawdist = 1000;
index 4ee741d580b6ccfa18abfe502645f67f1aeb815e..031ab5f96fbdcf2641a27191658e2ff26d2a2573 100644 (file)
@@ -186,7 +186,7 @@ float train_send(entity this, entity to, float sf)
 
 void train_link(entity this)
 {
-       //Net_LinkEntity(this, 0, false, train_send);
+       //Net_LinkEntity(this, false, true, 0, train_send);
 }
 
 void train_use(entity this, entity actor, entity trigger)
index 76ebc0c4067603ff93a3f41738f2d6b88d8312c1..6df58fb159758fa33a4b060da2ab04e6c6dd73d1 100644 (file)
@@ -273,7 +273,7 @@ spawnfunc(misc_laser)
 
        this.mangle = this.angles;
 
-       Net_LinkEntity(this, false, 0, laser_SendEntity);
+       Net_LinkEntity(this, false, true, 0, laser_SendEntity);
 
        this.setactive = laser_setactive;
 
index efc457409364d4e3b1dc2710fa087bc083f1e58b..dc93be3f6bbd71f5d96004b8fac97ee7ee12b8c2 100644 (file)
@@ -22,7 +22,7 @@ bool teleport_dest_send(entity this, entity to, int sendflags)
 
 void teleport_dest_link(entity this)
 {
-       Net_LinkEntity(this, false, 0, teleport_dest_send);
+       Net_LinkEntity(this, false, true, 0, teleport_dest_send);
        this.SendFlags |= SF_TRIGGER_INIT;
 }
 
index 85a8ab843620a151c774747bb3fd7001b0ff5386..15a6461dc6457888d9ea6bfa89414c8afc50b88f 100644 (file)
@@ -171,7 +171,7 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
        else if(ent.solid < 0) ent.solid = SOLID_NOT; \
        if(!ent.bgmscriptsustain) ent.bgmscriptsustain = 1; \
        else if(ent.bgmscriptsustain < 0) ent.bgmscriptsustain = 0; \
-       Net_LinkEntity(ent, true, 0, g_clientmodel_genericsendentity); \
+       Net_LinkEntity(ent, true, true, 0, g_clientmodel_genericsendentity); \
        ent.default_solid = sol;
 
 // non-solid model entities:
index 30413c0c658f19dcf1e4b4bba86f440578203e73..730d16de932708daae86761b5aae93426036c9d9 100644 (file)
@@ -165,7 +165,7 @@ spawnfunc(trigger_music)
        this.reset = trigger_music_reset;
        this.reset(this);
 
-       Net_LinkEntity(this, false, 0, trigger_music_SendEntity);
+       Net_LinkEntity(this, false, true, 0, trigger_music_SendEntity);
 }
 #elif defined(CSQC)
 
index 67bb65191cb2b8643189828433dc696f2ceec9d7..59fd0c55318fff522c0401b8a37d35104ee78a9a 100644 (file)
@@ -649,7 +649,7 @@ void target_push_use(entity this, entity actor, entity trigger)
 void target_push_link(entity this)
 {
        BITSET_ASSIGN(this.effects, EF_NODEPTHTEST);
-       Net_LinkEntity(this, false, 0, target_push_send);
+       Net_LinkEntity(this, false, true, 0, target_push_send);
        //this.SendFlags |= 1; // update
 }
 
index 368da365193b759855f4a0757139ff60409cb3fc..e66a6be82e6b34b5bfe18ee6e6de05b46a07c2c9 100644 (file)
@@ -105,7 +105,7 @@ bool trigger_keylock_send(entity this, entity to, int sf)
 void trigger_keylock_link(entity this)
 {
        // uncomment to network keylocks
-       //Net_LinkEntity(this, false, 0, trigger_keylock_send);
+       //Net_LinkEntity(this, false, true, 0, trigger_keylock_send);
 }
 
 /*QUAKED trigger_keylock (.0 .5 .8) ?
index 4679e75f7f0f521c4248676365578de1e10b6851..3c53fe32a5de0c3afd2b8158b87e26940cc75b5d 100644 (file)
@@ -104,7 +104,7 @@ void viewloc_init(entity this)
        if(!this.goalentity)
                this.goalentity = this.enemy; // make them match so CSQC knows what to do
 
-       Net_LinkEntity(this, false, 0, trigger_viewloc_send);
+       Net_LinkEntity(this, false, true, 0, trigger_viewloc_send);
 
        setthink(this, viewloc_think);
        this.nextthink = time;
@@ -137,7 +137,7 @@ void viewloc_link(entity this)
 {
        if(this.angle)
                this.angles_y = this.angle;
-       Net_LinkEntity(this, false, 0, viewloc_send);
+       Net_LinkEntity(this, false, true, 0, viewloc_send);
 }
 
 spawnfunc(target_viewlocation_start)
index 39fa89c42fc6236a1d1b471908d2da86e52c6e5f..a9ac7d3d5e44457566b15ddbe6a147312e67b751 100644 (file)
@@ -127,8 +127,7 @@ void trigger_init(entity this)
 
 void trigger_link(entity this, bool(entity this, entity to, int sendflags) sendfunc)
 {
-       setSendEntity(this, sendfunc);
-       this.SendFlags = 0xFFFFFF;
+       Net_LinkEntity(this, true, false, 0, sendfunc);
 }
 
 void trigger_common_write(entity this, bool withtarget)
index 635d1b8d5328e7dfcdb34582f4ac887d4fa67e8b..d62ac4daf33b1165e0df16df92412ce3067226b7 100644 (file)
@@ -583,7 +583,7 @@ void bd_setup_pieces(entity minigame)
                controller.owner = minigame;
                controller.bd_tilelet = letter;
        #ifdef SVQC
-               Net_LinkEntity(controller, false, 0, bd_controller_send);
+               Net_LinkEntity(controller, false, true, 0, bd_controller_send);
        #endif
        }
 
index 0455e80867eb596cb12e83120a431b80708b505c..0f2d557e496cca25d24280f143eb813584843e19 100644 (file)
@@ -90,7 +90,7 @@ entity msle_spawn(entity minigame_session, entity e)
        e.minigame_autoclean = 1;
        #ifdef SVQC
                setcefc(e, minigame_CheckSend);
-               Net_LinkEntity(e, false, 0, minigame_SendEntity);
+               Net_LinkEntity(e, false, true, 0, minigame_SendEntity);
        #endif
        return e;
 }
index 57f6f46b6153570fe0b4c276875d07664191b539..3cce493aad72644205e58a90e1fd3cfd82c47d7d 100644 (file)
@@ -145,7 +145,7 @@ int minigame_addplayer(entity minigame_session, entity player)
                CS(player).active_minigame = minigame_session;
                player.minigame_players = player_pointer;
                setcefc(player_pointer, minigame_CheckSend);
-               Net_LinkEntity(player_pointer, false, 0, minigame_SendEntity);
+               Net_LinkEntity(player_pointer, false, true, 0, minigame_SendEntity);
 
                if ( !IS_OBSERVER(player) && autocvar_sv_minigames_observer )
                        PutObserverInServer(player, true, true);
@@ -181,7 +181,7 @@ entity start_minigame(entity player, string minigame )
                        end_minigame(minig);
                        return NULL;
                }
-               Net_LinkEntity(minig, false, 0, minigame_SendEntity);
+               Net_LinkEntity(minig, false, true, 0, minigame_SendEntity);
 
                if ( !minigame_sessions )
                        minigame_sessions = minig;
index 2b4d3e34cbe23f61c1bd84ed587dbe705b07edfe..7af5a12ce4abfb009842c3bd4159eac566577056 100644 (file)
@@ -228,7 +228,7 @@ bool Mutator_Add(Mutator mut)
         // good
         if (mutator_log) LOG_TRACEF("Mutator: added %s", mut.m_name);
 #ifdef SVQC
-        Net_LinkEntity(mut, false, 0, Mutator_SendEntity);
+        Net_LinkEntity(mut, false, true, 0, Mutator_SendEntity);
 #endif
         return true;
     }
index c9ded88f00adc6dc05c627199baef0f3f4b80ab7..5748344b5ffc15b49a64e8d1ff426b8e089b30c0 100644 (file)
@@ -85,5 +85,5 @@ MUTATOR_HOOKFUNCTION(damagetext, PlayerDamaged) {
     setthink(net_text, SUB_Remove);
     net_text.nextthink = (time > 10) ? (time + 0.5) : 10; // allow a buffer from start time for clients to load in
 
-    Net_LinkEntity(net_text, false, 0, write_damagetext);
+    Net_LinkEntity(net_text, false, true, 0, write_damagetext);
 }
index 5ea4cb49cfb9a4d4deb6802d8bf8e82d1cad3491..f64e5d329f7fd13da0b38d56bd1ee262395bfe77 100644 (file)
@@ -572,7 +572,7 @@ entity nades_spawn_orb(entity own, entity realown, vector org, float orb_ltime,
        vector size = '1 1 1' * orb.orb_radius / 2;
        setsize(orb, -size, size);
 
-       Net_LinkEntity(orb, true, 0, orb_send);
+       Net_LinkEntity(orb, true, true, 0, orb_send);
        orb.SendFlags |= 1;
 
        setthink(orb, nades_orb_think);
index 328f79ac877519066b85c1de88107b4387aa1682..9dd062a9c2b0fb09b66ab161a60cb8d2b82a0acb 100644 (file)
@@ -136,5 +136,5 @@ MUTATOR_HOOKFUNCTION(physical_items, Item_Spawn)
        item.effects |= EF_NODRAW; // hide the original weapon
        set_movetype(item, MOVETYPE_FOLLOW);
        item.aiment = wep; // attach the original weapon
-       setSendEntity(item, func_null);
+       Net_UnlinkEntity(item);
 }
index f7795094cdb805648c6815fd9e4a353df5528e78..53518842a6830340fbcdf7cc6d671cb0f91075f9 100644 (file)
@@ -143,7 +143,7 @@ void StatusEffects_new(entity this)
     if(this.statuseffects_store)
     {
         setcefc(eff, StatusEffects_customize);
-        Net_LinkEntity(eff, false, 0, StatusEffects_Send);
+        Net_LinkEntity(eff, false, true, 0, StatusEffects_Send);
     }
 }
 void StatusEffects_delete(entity e) { delete(e.statuseffects); e.statuseffects = NULL; }
index 97c26f360dd19d037b166ce6ff25181a59b604c1..88c508229e85edd4a66a11ed724bab2d077035b6 100644 (file)
@@ -1084,7 +1084,7 @@ entity WaypointSprite_Spawn(
     wp.reset2 = WaypointSprite_Reset;
     wp.cnt = icon.m_id;
     wp.colormod = spr.m_color;
-    Net_LinkEntity(wp, false, 0, WaypointSprite_SendEntity);
+    Net_LinkEntity(wp, false, true, 0, WaypointSprite_SendEntity);
     return wp;
 }
 
index e6fe8df76eb3d96028d0f7e292f5efcb40ae6b9b..0ba3fd41d1447ba2fe2789103b4d83c95034ac04 100644 (file)
@@ -1507,7 +1507,7 @@ void Kill_Notification(
        net_notif.nent_client = client;
        net_notif.nent_net_type = MSG_CENTER_KILL;
        net_notif.nent_net_name = ORDINAL(net_cpid);
-       Net_LinkEntity(net_notif, false, autocvar_notification_lifetime_runtime, Net_Write_Notification);
+       Net_LinkEntity(net_notif, false, true, autocvar_notification_lifetime_runtime, Net_Write_Notification);
 
        IL_EACH(g_notifications,
                (it.owner.nent_type == net_type || net_type == MSG_Null) && (it.owner.nent_cpid == net_cpid || net_cpid == CPID_Null),
@@ -1668,7 +1668,7 @@ void Send_Notification(
                        ? (time + autocvar_notification_lifetime_runtime)
                        : autocvar_notification_lifetime_mapload;
 
-               Net_LinkEntity(net_notif, false, 0, Net_Write_Notification);
+               Net_LinkEntity(net_notif, false, true, 0, Net_Write_Notification);
        }
 }
 
index 2e6068bf56ac823cbefc287b163941447c19a7b8..18001df95dc8936d520c18aa270a938241778aaf 100644 (file)
@@ -1194,7 +1194,7 @@ void turret_use(entity this, entity actor, entity trigger)
 
 void turret_link(entity this)
 {
-       Net_LinkEntity(this, true, 0, turret_send);
+       Net_LinkEntity(this, true, true, 0, turret_send);
        setthink(this, turret_think);
        this.nextthink = time;
        this.tur_head.effects = EF_NODRAW;
index 302b39a0d16d66c12b6c328d992a710cd2d0c373..1e0074211f7902e743a3e7cb55a33fcfa2980290 100644 (file)
@@ -59,7 +59,7 @@ void UpdateAuxiliaryXhair(entity own, vector loc, vector clr, int axh_id)
                //axh.drawonlytoclient = own; // not spectatable
                setcefc(axh, AuxiliaryXhair_customize);
                axh.owner = own;
-               Net_LinkEntity(axh, false, 0, SendAuxiliaryXhair);
+               Net_LinkEntity(axh, false, true, 0, SendAuxiliaryXhair);
        }
 
        if(loc != axh.axh_prevorigin)
index 8b34473e398a5894256e386200459a00eec45ada..82c77692b34d78cc1fd3802486a73001ef742430 100644 (file)
@@ -886,7 +886,7 @@ METHOD(Bumblebee, vr_spawn, void(Bumblebee thisveh, entity instance))
         if(instance.gun3.enemy == NULL)
         {
             instance.gun3.enemy = new(bumble_raygun);
-            Net_LinkEntity(instance.gun3.enemy, true, 0, bumble_raygun_send);
+            Net_LinkEntity(instance.gun3.enemy, true, true, 0, bumble_raygun_send);
             instance.gun3.enemy.SendFlags = BRG_SETUP;
             instance.gun3.enemy.cnt = autocvar_g_vehicle_bumblebee_raygun;
             instance.gun3.enemy.effects = EF_NODRAW | EF_LOWPRECISION;
index adffbfce002414ebbac5ab7bffea06cb5d5592d4..d731411ca1a05f5771d00a9b39077d86daf79883 100644 (file)
@@ -571,7 +571,7 @@ METHOD(Racer, vr_spawn, void(Racer thisveh, entity instance))
 METHOD(Racer, vr_death, void(Racer thisveh, entity instance))
 {
 #ifdef SVQC
-    setSendEntity(instance, func_null); // stop networking this racer (for now)
+    Net_UnlinkEntity(instance); // stop networking this racer (for now)
     SetResourceExplicit(instance, RES_HEALTH, 0);
     instance.event_damage      = func_null;
     instance.solid                     = SOLID_CORPSE;
index 54e7d99bd54cb1d31e09cf038ce0fa02493f6637..6f7f8780f70bf2a6f5629ed449c2402b540cecdd 100644 (file)
@@ -539,7 +539,7 @@ void W_Arc_Beam(float burst, entity actor, .entity weaponentity)
        IL_PUSH(g_bot_dodge, beam);
        beam.bot_dodgerating = WEP_CVAR(arc, beam_damage);
        beam.beam_bursting = burst;
-       Net_LinkEntity(beam, false, 0, W_Arc_Beam_Send);
+       Net_LinkEntity(beam, false, true, 0, W_Arc_Beam_Send);
 
        getthink(beam)(beam);
 }
index 43e5ca24eebb010ece7cfe76ad52dd712ed29b62..bb1c015dd36621fa9d18b09451ba94756b66fd17 100644 (file)
@@ -294,7 +294,7 @@ void W_Tuba_NoteOn(entity actor, .entity weaponentity, float hittype)
                setthink(note, W_Tuba_NoteThink);
                note.nextthink = time;
                note.spawnshieldtime = time;
-               Net_LinkEntity(note, false, 0, W_Tuba_NoteSendEntity);
+               Net_LinkEntity(note, false, true, 0, W_Tuba_NoteSendEntity);
        }
 
        actor.(weaponentity).tuba_note.teleport_time = time + WEP_CVAR(tuba, refire) * 2 * W_WeaponRateFactor(actor); // so it can get prolonged safely
index c673b0980781e3b700a549c35936c4c067edfb62..b9d48f6c0e908ca3b67f7d8a0af476845f8fee6a 100644 (file)
@@ -164,7 +164,7 @@ MACRO_END
                e.nextthink = time;
                //e.drawonlytoclient = wep.owner;
                setcefc(e, wepent_customize);
-               Net_LinkEntity(e, false, 0, wepent_send);
+               Net_LinkEntity(e, false, true, 0, wepent_send);
        }
 
 #endif
index 70e2c1a15e9bf10f6a4a09bf9378a10f724ba5c8..6d33d15a7bf7f2b45e80dc53506fda4fefc3bb20 100644 (file)
@@ -121,12 +121,11 @@ void CSQCModel_CheckUpdate(entity e)
 
 void CSQCModel_LinkEntity(entity e)
 {
-       setSendEntity(e, CSQCModel_Send);
-       e.SendFlags = 0xFFFFFF;
+       Net_LinkEntity(e, true, false, 0, CSQCModel_Send);
        CSQCModel_CheckUpdate(e);
 }
 
 void CSQCModel_UnlinkEntity(entity e)
 {
-       setSendEntity(e, func_null);
+       Net_UnlinkEntity(e);
 }
index c9cdf6981b8533cf6eb85f88a478c8ee4150c8ea..5648d79829db052609e2e9f96e347089e9e3ac27 100644 (file)
@@ -115,7 +115,7 @@ STATIC_INIT(C2S_Protocol_renumber) { FOREACH(C2S_Protocol, true, it.m_id = i); }
        IntrusiveList g_uncustomizables;
        STATIC_INIT(g_uncustomizables) { g_uncustomizables = IL_NEW(); }
 
-       void Net_LinkEntity(entity e, bool docull, float dt, bool(entity this, entity to, int sendflags) sendfunc)
+       void Net_LinkEntity(entity e, bool docull, bool checkmodel, float dt, bool(entity this, entity to, int sendflags) sendfunc)
        {
                if (e.classname == "")
                {
@@ -123,7 +123,7 @@ STATIC_INIT(C2S_Protocol_renumber) { FOREACH(C2S_Protocol, true, it.m_id = i); }
                    e.classname = "net_linked";
                }
 
-               if (e.model == "" || e.modelindex == 0)
+               if (checkmodel && (e.model == "" || e.modelindex == 0))
                {
                        vector mi = e.mins;
                        vector ma = e.maxs;
index 1bb1aeb6a404d0b8ed4ec2e3200c8c92446204e6..2b52e69de48b9ac997a4f355316aed2b24cdd657 100644 (file)
@@ -161,14 +161,10 @@ float WarpZone_Teleport(entity wz, entity player, float f0, float f1)
 
                entity ts = new(warpzone_teleported);
                setmodel(ts, MDL_Null);
-               setSendEntity(ts, WarpZone_Teleported_Send);
-               ts.SendFlags = 0xFFFFFF;
+               Net_LinkEntity(ts, false, false, 1, WarpZone_Teleported_Send);
                ts.drawonlytoclient = player;
-               setthink(ts, SUB_Remove);
-               ts.nextthink = time + 1;
                ts.owner = player;
                ts.enemy = wz;
-               ts.effects = EF_NODEPTHTEST;
                ts.angles = wz.warpzone_transform;
        }
        #elif defined(CSQC)
@@ -716,9 +712,7 @@ spawnfunc(trigger_warpzone)
                setsize(this, this.mins * this.scale, this.maxs * this.scale);
        else
                setsize(this, this.mins, this.maxs);
-       setSendEntity(this, WarpZone_Send);
-       this.SendFlags = 0xFFFFFF;
-       BITSET_ASSIGN(this.effects, EF_NODEPTHTEST);
+       Net_LinkEntity(this, false, false, 0, WarpZone_Send);
        this.warpzone_next = warpzone_first;
        warpzone_first = this;
 
@@ -744,8 +738,7 @@ spawnfunc(func_camera)
                this.solid = SOLID_BSP;
        else if(this.solid < 0)
                this.solid = SOLID_NOT;
-       setSendEntity(this, WarpZone_Camera_Send);
-       this.SendFlags = 0xFFFFFF;
+       Net_LinkEntity(this, true, false, 0, WarpZone_Camera_Send);
        this.warpzone_next = warpzone_camera_first;
        warpzone_camera_first = this;
 }
index 2e6e9e6b852c84a6b6ffe5bec87524fb59e6a260..3557ad10e2f3d804511cd1fb5afa306307ecee3c 100644 (file)
@@ -158,7 +158,7 @@ bool ClientData_Send(entity this, entity to, int sf)
 
 void ClientData_Attach(entity this)
 {
-       Net_LinkEntity(CS(this).clientdata = new_pure(clientdata), false, 0, ClientData_Send);
+       Net_LinkEntity(CS(this).clientdata = new_pure(clientdata), false, true, 0, ClientData_Send);
        CS(this).clientdata.drawonlytoclient = this;
        CS(this).clientdata.owner = this;
 }
@@ -665,7 +665,7 @@ void PutPlayerInServer(entity this)
 
        entity spawnevent = new_pure(spawnevent);
        spawnevent.owner = this;
-       Net_LinkEntity(spawnevent, false, 0.5, SpawnEvent_Send);
+       Net_LinkEntity(spawnevent, false, true, 0.5, SpawnEvent_Send);
 
        // Cut off any still running player sounds.
        stopsound(this, CH_PLAYER_SINGLE);
@@ -896,7 +896,7 @@ void ClientInit_Spawn()
 {
        entity e = new_pure(clientinit);
        setthink(e, ClientInit_CheckUpdate);
-       Net_LinkEntity(e, false, 0, ClientInit_SendEntity);
+       Net_LinkEntity(e, false, true, 0, ClientInit_SendEntity);
 
        ClientInit_CheckUpdate(e);
 }
index 12e130c9e80ddf25aa17ba4da4583762ddcb95bd..446dbf466386e3965c33ca1360119284a915814a 100644 (file)
@@ -97,7 +97,7 @@ bool Nagger_SendEntity(entity this, entity to, float sendflags)
 
 void Nagger_Init()
 {
-       Net_LinkEntity(nagger = new_pure(nagger), false, 0, Nagger_SendEntity);
+       Net_LinkEntity(nagger = new_pure(nagger), false, true, 0, Nagger_SendEntity);
 }
 
 void Nagger_VoteChanged()
index 28d10276625b8682f13bbce233eafe7986b06143..b207cd0c1d22dfba137009978e65c07a123c8bbe 100644 (file)
@@ -31,6 +31,6 @@ void EliminatedPlayers_Init(float(entity) isEliminated_func)
                backtrace("Can't spawn eliminatedPlayers again!");
                return;
        }
-       Net_LinkEntity(eliminatedPlayers = new_pure(eliminatedPlayers), false, 0, EliminatedPlayers_SendEntity);
+       Net_LinkEntity(eliminatedPlayers = new_pure(eliminatedPlayers), false, true, 0, EliminatedPlayers_SendEntity);
        eliminatedPlayers.isEliminated = isEliminated_func;
 }
index a50830348a49caaf109b60fd7269ca3fc02c1554..989ca23667da32a6e51a3091532e676daa3dd2d8 100644 (file)
@@ -414,7 +414,7 @@ void FireGrapplingHook(entity actor, .entity weaponentity)
 
        missile.hook_start = missile.hook_end = missile.origin;
 
-       Net_LinkEntity(missile, false, 0, GrapplingHookSend);
+       Net_LinkEntity(missile, false, true, 0, GrapplingHookSend);
 }
 
 // NOTE: using PRECACHE here to make sure it's called after everything else
index 99c0165fd3a1b51061979bf4ff3fb384ab3bcdd2..7d1c46f3f30b7c5a8dbcedb66d10580994aa3f27 100644 (file)
@@ -1133,7 +1133,7 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default
        else
                Item_Reset(this);
 
-       Net_LinkEntity(this, !(def.instanceOfPowerup || def.instanceOfHealth || def.instanceOfArmor), 0, ItemSend);
+       Net_LinkEntity(this, !(def.instanceOfPowerup || def.instanceOfHealth || def.instanceOfArmor), true, 0, ItemSend);
 
        // call this hook after everything else has been done
        if (MUTATOR_CALLHOOK(Item_Spawn, this))
index 9242a5b6f4d057aa99e95f356cf80098eb2f6a12..cbb9729c6d3414d2b0161a6aa591a23b038335b3 100644 (file)
@@ -406,7 +406,7 @@ bool MapVote_SendEntity(entity this, entity to, int sf)
 
 void MapVote_Spawn()
 {
-       Net_LinkEntity(mapvote_ent = new(mapvote_ent), false, 0, MapVote_SendEntity);
+       Net_LinkEntity(mapvote_ent = new(mapvote_ent), false, true, 0, MapVote_SendEntity);
 }
 
 void MapVote_TouchMask()
index b6244ee24ba2a5e8eb820e9a59581433f8c34374..57c4cc40632c70b686be67b358c3eb6fd5bd4723 100644 (file)
@@ -99,7 +99,7 @@ void TeamScore_Spawn(float t, string name)
        entity ts = new_pure(csqc_score_team);
        ts.netname = name; // not used yet, FIXME
        ts.team = t;
-       Net_LinkEntity(ts, false, 0, TeamScore_SendEntity);
+       Net_LinkEntity(ts, false, true, 0, TeamScore_SendEntity);
        teamscorekeepers[t - 1] = ts;
        ++teamscores_entities_count;
        PlayerStats_GameReport_AddTeam(t);
@@ -227,7 +227,7 @@ void ScoreInfo_Init(int teams)
        else
        {
                scores_initialized = new_pure(ent_client_scoreinfo);
-               Net_LinkEntity(scores_initialized, false, 0, ScoreInfo_SendEntity);
+               Net_LinkEntity(scores_initialized, false, true, 0, ScoreInfo_SendEntity);
        }
        if(teams & BIT(0))
                TeamScore_Spawn(NUM_TEAM_1, "Red");
@@ -328,7 +328,7 @@ void PlayerScore_Attach(entity player)
                error("player already has a scorekeeper");
        entity sk = new_pure(scorekeeper);
        sk.owner = player;
-       Net_LinkEntity(sk, false, 0, PlayerScore_SendEntity);
+       Net_LinkEntity(sk, false, true, 0, PlayerScore_SendEntity);
        CS(player).scorekeeper = sk;
 }
 
index ab0d2bea43f1122610e555bd5eca1d8136eb2e57..dbe15ee19e88ec96f9fd322fc3df395423b745a6 100644 (file)
@@ -87,7 +87,7 @@ void link_spawnpoint(entity this)
        // and don't show non-team spawns in team matches.
        // (Unless useallspawns is activated)
        if(anypoint || !((teamplay && !Team_IsValidTeam(this.team)) || (!teamplay && Team_IsValidTeam(this.team))))
-               Net_LinkEntity(this, false, 0, SpawnPoint_Send);
+               Net_LinkEntity(this, false, true, 0, SpawnPoint_Send);
 }
 
 void relocate_spawnpoint(entity this)
index 150d480ec1e79c2e6496b684d2ca4e7926a4769a..892350c273e712000826ec2f5014d8ad91633bb4 100644 (file)
@@ -47,7 +47,7 @@ void accuracy_init(entity e)
        entity a = CS(e).accuracy = new_pure(accuracy);
        a.owner = e;
        a.drawonlytoclient = e;
-       Net_LinkEntity(a, false, 0, accuracy_send);
+       Net_LinkEntity(a, false, true, 0, accuracy_send);
 }
 
 void accuracy_free(entity e)
index 07f6f5c6651bd1615b35761921119294ee0d8bcd..7170d3ed619080e13e555f5462f00d4653b712bc 100644 (file)
@@ -79,7 +79,7 @@ void CSQCProjectile_Check(entity e)
 
 void CSQCProjectile(entity e, float clientanimate, int type, float docull)
 {
-       Net_LinkEntity(e, docull, 0, CSQCProjectile_SendEntity);
+       Net_LinkEntity(e, docull, true, 0, CSQCProjectile_SendEntity);
 
        e.csqcprojectile_clientanimate = clientanimate;
 
index 41c9705da06f510026176c49d70f787505ad95fa..593b31f9d1bc29e1156d4e1da5bcd12b32b7ac16 100644 (file)
@@ -570,7 +570,7 @@ void RandomSeed_Spawn()
 {
        randomseed = new_pure(randomseed);
        setthink(randomseed, RandomSeed_Think);
-       Net_LinkEntity(randomseed, false, 0, RandomSeed_Send);
+       Net_LinkEntity(randomseed, false, true, 0, RandomSeed_Send);
 
        getthink(randomseed)(randomseed); // sets random seed and nextthink
 }