X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_minstanex.qc;h=2ad71ce798667a92a5fa6d63e0f0b6fc8adca963;hb=2bb2db9c0f8016645a23381d7493588d748ecacf;hp=68d1291684fd001c10519fa03f0876f49d992bc4;hpb=4e6c8c5fcb1b874a8c90f5f571471ff2993ce7dc;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_minstanex.qc b/qcsrc/server/w_minstanex.qc index 68d129168..2ad71ce79 100644 --- a/qcsrc/server/w_minstanex.qc +++ b/qcsrc/server/w_minstanex.qc @@ -14,20 +14,13 @@ void W_MinstaNex_Attack (void) yoda = 0; damage_goodhits = 0; - headshot = 0; - damage_headshotbonus = -1; // no extra damage, just count FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, 10000, 800, 0, 0, 0, 0, WEP_MINSTANEX); - damage_headshotbonus = 0; if(yoda && flying) - AnnounceTo(self, "yoda"); - if(headshot) - { - AnnounceTo(self, "headshot"); - } + Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA); if(damage_goodhits && self.minstanex_lasthit) { - AnnounceTo(self, "impressive"); + Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE); damage_goodhits = 0; // only every second time } @@ -38,39 +31,40 @@ void W_MinstaNex_Attack (void) // teamcolor / hit beam effect vector v; v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos); - if(teamplay) + switch(self.team) { - switch(self.team) - { - case COLOR_TEAM1: // Red - if(damage_goodhits) - WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED_HIT"), w_shotorg, v); - else - WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED"), w_shotorg, v); - break; - case COLOR_TEAM2: // Blue - if(damage_goodhits) - WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE_HIT"), w_shotorg, v); - else - WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE"), w_shotorg, v); - break; - case COLOR_TEAM3: // Yellow - if(damage_goodhits) - WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW_HIT"), w_shotorg, v); - else - WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW"), w_shotorg, v); - break; - case COLOR_TEAM4: // Pink - if(damage_goodhits) - WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3PINK_HIT"), w_shotorg, v); - else - WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3PINK"), w_shotorg, v); - break; - } + case NUM_TEAM_1: // Red + if(damage_goodhits) + WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED_HIT"), w_shotorg, v); + else + WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED"), w_shotorg, v); + break; + case NUM_TEAM_2: // Blue + if(damage_goodhits) + WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE_HIT"), w_shotorg, v); + else + WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE"), w_shotorg, v); + break; + case NUM_TEAM_3: // Yellow + if(damage_goodhits) + WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW_HIT"), w_shotorg, v); + else + WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW"), w_shotorg, v); + break; + case NUM_TEAM_4: // Pink + if(damage_goodhits) + WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3PINK_HIT"), w_shotorg, v); + else + WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3PINK"), w_shotorg, v); + break; + default: + if(damage_goodhits) + WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3_HIT"), w_shotorg, v); + else + WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3"), w_shotorg, v); + break; } - else - WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3"), w_shotorg, v); - + W_DecreaseAmmo(ammo_cells, ((g_minstagib) ? 1 : autocvar_g_balance_minstanex_ammo), autocvar_g_balance_minstanex_reload_ammo); } @@ -177,6 +171,14 @@ float w_minstanex(float req) W_Reload(used_ammo, autocvar_g_balance_minstanex_reload_ammo, autocvar_g_balance_minstanex_reload_time, "weapons/reload.wav"); } + else if (req == WR_SUICIDEMESSAGE) + { + return WEAPON_THINKING_WITH_PORTALS; + } + else if (req == WR_KILLMESSAGE) + { + return WEAPON_MINSTANEX_MURDER; + } return TRUE; } #endif @@ -195,10 +197,6 @@ float w_minstanex(float req) { precache_sound("weapons/neximpact.wav"); } - else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = _("%s is now thinking with portals"); - else if (req == WR_KILLMESSAGE) - w_deathtypestring = _("%s has been vaporized by %s's minstanex"); return TRUE; } #endif