From: TimePath Date: Wed, 4 Nov 2015 01:36:48 +0000 (+1100) Subject: Merge branch 'master' into TimePath/debug_draw X-Git-Tag: xonotic-v0.8.2~1729^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F248%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into TimePath/debug_draw # Conflicts: # qcsrc/server/weapons/weaponsystem.qc --- 2b728b9c59ef61318b7ca5a261cb7fa45d2143aa diff --cc qcsrc/common/weapons/weapon/shockwave.qc index 8d2edb814,d7d27fcb9..49737537b --- a/qcsrc/common/weapons/weapon/shockwave.qc +++ b/qcsrc/common/weapons/weapon/shockwave.qc @@@ -229,13 -229,13 +229,13 @@@ void W_Shockwave_Melee_Think(void } } - void W_Shockwave_Melee(Weapon thiswep, entity actor, int slot, int fire) + void W_Shockwave_Melee(Weapon thiswep, entity actor, .entity weaponentity, int fire) { sound(actor, CH_WEAPON_A, SND_SHOTGUN_MELEE, VOL_BASE, ATTN_NORM); - weapon_thinkf(actor, slot, WFRAME_FIRE2, WEP_CVAR(shockwave, melee_animtime), w_ready); + weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(shockwave, melee_animtime), w_ready); - entity meleetemp; - meleetemp = spawn(); + entity meleetemp = new(meleetemp); + make_pure(meleetemp); meleetemp.owner = meleetemp.realowner = actor; meleetemp.think = W_Shockwave_Melee_Think; meleetemp.nextthink = time + WEP_CVAR(shockwave, melee_delay) * W_WeaponRateFactor(); diff --cc qcsrc/common/weapons/weapon/shotgun.qc index 5d9023d34,2de55865a..318800785 --- a/qcsrc/common/weapons/weapon/shotgun.qc +++ b/qcsrc/common/weapons/weapon/shotgun.qc @@@ -181,13 -181,13 +181,13 @@@ void W_Shotgun_Melee_Think(void } } - void W_Shotgun_Attack2(Weapon thiswep, entity actor, int slot, int fire) + void W_Shotgun_Attack2(Weapon thiswep, entity actor, .entity weaponentity, int fire) { sound(actor, CH_WEAPON_A, SND_SHOTGUN_MELEE, VOL_BASE, ATTEN_NORM); - weapon_thinkf(actor, slot, WFRAME_FIRE2, WEP_CVAR_SEC(shotgun, animtime), w_ready); + weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(shotgun, animtime), w_ready); - entity meleetemp; - meleetemp = spawn(); + entity meleetemp = new(meleetemp); + make_pure(meleetemp); meleetemp.realowner = actor; meleetemp.think = W_Shotgun_Melee_Think; meleetemp.nextthink = time + WEP_CVAR_SEC(shotgun, melee_delay) * W_WeaponRateFactor(); diff --cc qcsrc/server/weapons/weaponsystem.qc index ff8743033,71217b9b9..49934d62e --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@@ -439,10 -440,9 +440,10 @@@ void CL_ExteriorWeaponentity_Think( } // spawning weaponentity for client - void CL_SpawnWeaponentity(entity e, int slot) + void CL_SpawnWeaponentity(entity e, .entity weaponentity) { - entity view = e.weaponentity[slot] = new(weaponentity); + entity view = e.(weaponentity) = new(weaponentity); + make_pure(view); view.solid = SOLID_NOT; view.owner = e; setmodel(view, MDL_Null); // precision set when changed @@@ -454,10 -454,10 +455,10 @@@ view.customizeentityforclient = CL_Weaponentity_CustomizeEntityForClient; view.nextthink = time; - if (slot == 0) + if (weaponentity == weaponentities[0]) { - entity exterior = e.exteriorweaponentity = spawn(); - exterior.classname = "exteriorweaponentity"; + entity exterior = e.exteriorweaponentity = new(exteriorweaponentity); + make_pure(exterior); exterior.solid = SOLID_NOT; exterior.exteriorweaponentity = exterior; exterior.owner = e;