From: TimePath Date: Fri, 21 Aug 2015 06:47:39 +0000 (+1000) Subject: Merge branches 'TimePath/weaponsys' and 'Mario/modpack' X-Git-Tag: xonotic-v0.8.2~2062 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8b38ad6987192a2129a7aa55410fd6d729425a28;p=xonotic%2Fxonotic-data.pk3dir.git Merge branches 'TimePath/weaponsys' and 'Mario/modpack' --- 8b38ad6987192a2129a7aa55410fd6d729425a28 diff --cc qcsrc/Makefile index 26797c55a,26797c55a,3f58e672c..143f53249 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@@@ -13,7 -13,7 -13,7 +13,7 @@@@ QCCFLAGS ?= -std=gmqcc \ -O3 -flno \ -Werror -fno-bail-on-werror -Wall \ -- -fftepp -fftepp-predefs -Wcpp -futf8 -frelaxed-switch \ - -fftepp -fftepp-predefs -Wcpp -futf8 -freturn-assignments \ +++ -fftepp -fftepp-predefs -Wcpp -futf8 -frelaxed-switch -freturn-assignments \ $(QCCFLAGS_WTFS) \ $(QCCFLAGS_FEATURES) \ $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK) diff --cc qcsrc/common/weapons/w_fireball.qc index 1cec08e96,32ae555e4,112b6524e..f9a4928b7 --- a/qcsrc/common/weapons/w_fireball.qc +++ b/qcsrc/common/weapons/w_fireball.qc @@@@ -96,10 -97,10 -96,10 +97,10 @@@@ void W_Fireball_Explode(void dir = normalize(e.origin + e.view_ofs - self.origin); if(accuracy_isgooddamage(self.realowner, e)) - - accuracy_add(self.realowner, WEP_FIREBALL, 0, WEP_CVAR_PRI(fireball, bfgdamage) * points); + + accuracy_add(self.realowner, WEP_FIREBALL.m_id, 0, WEP_CVAR_PRI(fireball, bfgdamage) * points); Damage(e, self, self.realowner, WEP_CVAR_PRI(fireball, bfgdamage) * points, self.projectiledeathtype | HITTYPE_BOUNCE | HITTYPE_SPLASH, e.origin + e.view_ofs, WEP_CVAR_PRI(fireball, bfgforce) * dir); -- pointparticles(particleeffectnum("fireball_bfgdamage"), e.origin, -1 * dir, 1); ++ Send_Effect("fireball_bfgdamage", e.origin, -1 * dir, 1); } } diff --cc qcsrc/common/weapons/w_machinegun.qc index 56a89fd9d,92629a0bd,24a0db83f..f320f7114 --- a/qcsrc/common/weapons/w_machinegun.qc +++ b/qcsrc/common/weapons/w_machinegun.qc @@@@ -212,9 -213,9 -212,9 +213,9 @@@@ void W_MachineGun_Attack_Burst(void self.punchangle_y = random() - 0.5; } - - fireBullet(w_shotorg, w_shotdir, WEP_CVAR(machinegun, burst_speed), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), WEP_MACHINEGUN, 0); + + fireBullet(w_shotorg, w_shotdir, WEP_CVAR(machinegun, burst_speed), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), WEP_MACHINEGUN.m_id, 0); -- pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); ++ Send_Effect("uzi_muzzleflash", w_shotorg, w_shotdir * 1000, 1); W_MachineGun_MuzzleFlash(); W_AttachToShotorg(self.muzzle_flash, '5 0 0'); diff --cc qcsrc/common/weapons/w_shotgun.qc index 95195bd3a,1d91689e5,5415b4a6f..d93e9dd3f --- a/qcsrc/common/weapons/w_shotgun.qc +++ b/qcsrc/common/weapons/w_shotgun.qc @@@@ -62,9 -63,9 -62,9 +63,9 @@@@ void W_Shotgun_Attack(float isprimary W_SetupShot(self, true, 5, "weapons/shotgun_fire.wav", ((isprimary) ? CH_WEAPON_A : CH_WEAPON_SINGLE), WEP_CVAR_PRI(shotgun, damage) * WEP_CVAR_PRI(shotgun, bullets)); for(sc = 0;sc < WEP_CVAR_PRI(shotgun, bullets);sc = sc + 1) - - fireBullet(w_shotorg, w_shotdir, WEP_CVAR_PRI(shotgun, spread), WEP_CVAR_PRI(shotgun, solidpenetration), WEP_CVAR_PRI(shotgun, damage), WEP_CVAR_PRI(shotgun, force), WEP_SHOTGUN, 0); + + fireBullet(w_shotorg, w_shotdir, WEP_CVAR_PRI(shotgun, spread), WEP_CVAR_PRI(shotgun, solidpenetration), WEP_CVAR_PRI(shotgun, damage), WEP_CVAR_PRI(shotgun, force), WEP_SHOTGUN.m_id, 0); -- pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 1000, WEP_CVAR_PRI(shotgun, ammo)); ++ Send_Effect("shotgun_muzzleflash", w_shotorg, w_shotdir * 1000, WEP_CVAR_PRI(shotgun, ammo)); // casing code if(autocvar_g_casings >= 1) diff --cc qcsrc/server/g_world.qc index 3e3682400,f40acfd63,de29c9a25..dcfc19eb1 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@@@ -561,10 -560,8 -560,9 +561,9 @@@@ void spawnfunc___init_dedicated_server( // needs to be done so early because of the constants they create static_init(); - - CALL_ACCUMULATED_FUNCTION(RegisterWeapons); CALL_ACCUMULATED_FUNCTION(RegisterNotifications); CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes); ++ CALL_ACCUMULATED_FUNCTION(RegisterEffects); MapInfo_Enumerate(); MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0); @@@@ -610,10 -607,8 -608,9 +609,9 @@@@ void spawnfunc_worldspawn (void // needs to be done so early because of the constants they create static_init(); - - CALL_ACCUMULATED_FUNCTION(RegisterWeapons); CALL_ACCUMULATED_FUNCTION(RegisterNotifications); CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes); ++ CALL_ACCUMULATED_FUNCTION(RegisterEffects); ServerProgsDB = db_load(strcat("server.db", autocvar_sessionid)); diff --cc qcsrc/server/mutators/mutator_buffs.qc index f5e3fa8bd,0f483abaf,b582e1686..f144899c8 --- a/qcsrc/server/mutators/mutator_buffs.qc +++ b/qcsrc/server/mutators/mutator_buffs.qc @@@@ -493,10 -493,10 -493,10 +493,10 @@@@ MUTATOR_HOOKFUNCTION(buffs_PlayerDamage // this... is ridiculous (TODO: fix!) if(frag_attacker.buffs & BUFF_VAMPIRE.m_itemid) if(!frag_target.vehicle) - - if(DEATH_WEAPONOF(frag_deathtype) != WEP_ARC) + + if(DEATH_WEAPONOF(frag_deathtype) != WEP_ARC.m_id) if(!ITEM_DAMAGE_NEEDKILL(frag_deathtype)) if(frag_target.deadflag == DEAD_NO) -- if(IS_PLAYER(frag_target) || (frag_target.flags & FL_MONSTER)) ++ if(IS_PLAYER(frag_target) || IS_MONSTER(frag_target)) if(frag_attacker != frag_target) if(!frag_target.frozen) if(frag_target.takedamage)