X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fvaporizer.qc;h=15b50f8ca456ef85b8bd87f4f2562cd034d44f7b;hp=dbf24c7964d94ff229b30ac068d4a0d315a251ba;hb=90d9f7c775306324957323d53d5a4ad995d999e3;hpb=ab8141544c2cacf1e647072ea64749625cc13b00 diff --git a/qcsrc/common/weapons/weapon/vaporizer.qc b/qcsrc/common/weapons/weapon/vaporizer.qc index dbf24c7964..15b50f8ca4 100644 --- a/qcsrc/common/weapons/weapon/vaporizer.qc +++ b/qcsrc/common/weapons/weapon/vaporizer.qc @@ -33,7 +33,6 @@ void Draw_VaporizerBeam_trace_callback(vector start, vector hit, vector end) } .vector vorg1, vorg2; -.float spawn_time; void VaporizerBeam_Draw(entity this) { //draw either the old v2.3 beam or the new beam @@ -86,7 +85,7 @@ NET_HANDLE(TE_CSQC_VAPORBEAMPARTICLE, bool isNew) this.sv_entnum = myowner; this.team = ReadByte() - 1; - pointparticles(EFFECT_VORTEX_MUZZLEFLASH, this.vorg1, normalize(this.vorg2 - this.vorg1) * 1000, 1); + //pointparticles(EFFECT_VORTEX_MUZZLEFLASH, this.vorg1, normalize(this.vorg2 - this.vorg1) * 1000, 1); if(autocvar_cl_vaporizerbeam_particle) { @@ -128,6 +127,7 @@ void W_Vaporizer_Attack(Weapon thiswep, entity actor, .entity weaponentity) FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, vaporizer_damage, WEP_CVAR_PRI(vaporizer, force), 0, 0, 0, 0, thiswep.m_id); // do this now, as goodhits is disabled below + W_MuzzleFlash(actor, weaponentity, EFFECT_VORTEX_MUZZLEFLASH, w_shotorg, w_shotdir * 1000); SendCSQCVaporizerBeamParticle(actor, damage_goodhits); if(yoda && flying) @@ -187,7 +187,7 @@ void W_RocketMinsta_Attack2(entity actor, .entity weaponentity) W_SetupShot_ProjectileSize (actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, SND_CRYLINK_FIRE, CH_WEAPON_A, autocvar_g_rm_laser_damage, WEP_ELECTRO.m_id); - Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1); + W_MuzzleFlash(actor, weaponentity, EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000); while(counter < total) { @@ -239,7 +239,7 @@ void W_RocketMinsta_Attack3 (entity actor, .entity weaponentity) W_SetupShot_ProjectileSize (actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, SND_ELECTRO_FIRE2, CH_WEAPON_A, autocvar_g_rm_laser_damage, WEP_ELECTRO.m_id); - Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1); + W_MuzzleFlash(actor, weaponentity, EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000); while(counter < total) { @@ -281,7 +281,7 @@ void W_RocketMinsta_Attack3 (entity actor, .entity weaponentity) METHOD(Vaporizer, wr_aim, void(entity thiswep, entity actor, .entity weaponentity)) { - if(GetResource(actor, thiswep.ammo_type) > 0) + if((actor.items & IT_UNLIMITED_AMMO) || GetResource(actor, thiswep.ammo_type) > 0) PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, 1000000, 0, 1, false); else PHYS_INPUT_BUTTON_ATCK2(actor) = bot_aim(actor, weaponentity, WEP_CVAR_SEC(vaporizer, speed), 0, WEP_CVAR_SEC(vaporizer, lifetime), false); // WEAPONTODO: replace with proper vaporizer cvars