X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmiscfunctions.qc;h=57bbd51d0e1f1c17cf8966c10e3a3c1276b8c2f6;hb=7ad79253dd5e08e66c0b3bab415da69cd3c2a296;hp=a6164747dbdfa8fba56b601c5ea995496c4a35a1;hpb=59b6575d5306d671853a67e37aa795f45315562b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index a6164747d..57bbd51d0 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -501,8 +501,6 @@ float want_weapon(entity weaponinfo, float allguns) // WEAPONTODO: what still ne else d = !(!weaponinfo.weaponstart); - if(g_grappling_hook) // if possible, redirect off-hand hook to on-hand hook - d |= (i == WEP_HOOK.m_id); if(!g_cts && (weaponinfo.spawnflags & WEP_FLAG_MUTATORBLOCKED)) // never default mutator blocked guns d = 0; @@ -708,7 +706,7 @@ void readplayerstartcvars() MUTATOR_CALLHOOK(SetStartItems); - if ((start_items & ITEM_Jetpack.m_itemid) || (g_grappling_hook && (start_weapons & WEPSET_HOOK))) + if (start_items & ITEM_Jetpack.m_itemid) { start_items |= ITEM_JetpackRegen.m_itemid; start_ammo_fuel = max(start_ammo_fuel, cvar("g_balance_fuel_rotstable")); @@ -721,8 +719,10 @@ void readplayerstartcvars() for (i = WEP_FIRST; i <= WEP_LAST; ++i) { e = get_weaponinfo(i); - if(precache_weapons & WepSet_FromWeapon(i)) - WEP_ACTION(i, WR_INIT); + if(precache_weapons & WepSet_FromWeapon(i)) { + Weapon w = get_weaponinfo(i); + w.wr_init(w); + } } start_ammo_shells = max(0, start_ammo_shells); @@ -1155,51 +1155,8 @@ void InitializeEntitiesRun() remove = remove_unsafely; } -void UncustomizeEntitiesRun() -{SELFPARAM(); - for (entity e = NULL; (e = findfloat(e, uncustomizeentityforclient_set, 1)); ) - { - WITH(entity, self, e, e.uncustomizeentityforclient()); - } -} -void SetCustomizer(entity e, float(void) customizer, void(void) uncustomizer) -{ - e.customizeentityforclient = customizer; - e.uncustomizeentityforclient = uncustomizer; - e.uncustomizeentityforclient_set = !!uncustomizer; -} - -void Net_LinkEntity(entity e, bool docull, float dt, bool(entity, int) sendfunc) -{SELFPARAM(); - vector mi, ma; - - if (e.classname == "") - e.classname = "net_linked"; - - if (e.model == "" || self.modelindex == 0) - { - mi = e.mins; - ma = e.maxs; - setmodel(e, MDL_Null); - setsize(e, mi, ma); - } - - e.SendEntity = sendfunc; - e.SendFlags = 0xFFFFFF; - - if (!docull) - e.effects |= EF_NODEPTHTEST; - - if (dt) - { - e.nextthink = time + dt; - e.think = SUB_Remove; - } -} - - .float(entity) isEliminated; -float EliminatedPlayers_SendEntity(entity to, float sendflags) +bool EliminatedPlayers_SendEntity(entity this, entity to, float sendflags) { float i, f, b; entity e; @@ -1733,8 +1690,8 @@ vector gettaginfo_relative(entity e, float tag) .float scale2; -float modeleffect_SendEntity(entity to, int sf) -{SELFPARAM(); +bool modeleffect_SendEntity(entity this, entity to, int sf) +{ float f; WriteByte(MSG_ENTITY, ENT_CLIENT_MODELEFFECT);