Add a new attack mode to Arc (disabled by default)
authorMario <mario@smbclan.net>
Tue, 2 Feb 2016 23:07:26 +0000 (09:07 +1000)
committerMario <mario@smbclan.net>
Tue, 2 Feb 2016 23:07:26 +0000 (09:07 +1000)
21 files changed:
bal-wep-nexuiz25.cfg
bal-wep-overkill.cfg
bal-wep-samual.cfg
bal-wep-xdf.cfg
bal-wep-xonotic.cfg
bal-wep-xpm.cfg
effectinfo.txt
models/arctrail.mdl [new file with mode: 0644]
models/arctrail.mdl_0.skin [new file with mode: 0644]
qcsrc/client/weapons/projectile.qc
qcsrc/common/constants.qh
qcsrc/common/effects/all.inc
qcsrc/common/effects/effectinfo.inc
qcsrc/common/models/all.inc
qcsrc/common/notifications.inc
qcsrc/common/weapons/weapon/arc.qc
scripts/projectiles.shader
textures/projectiles/arc_projectile_core.tga [new file with mode: 0644]
textures/projectiles/arc_projectile_core_glow.tga [new file with mode: 0644]
textures/projectiles/arc_projectile_long.tga [new file with mode: 0644]
textures/projectiles/arc_projectile_long_glow.tga [new file with mode: 0644]

index 4800657..c185c5e 100644 (file)
@@ -751,6 +751,18 @@ set g_balance_arc_beam_range 1000
 set g_balance_arc_beam_refire 0.5
 set g_balance_arc_beam_returnspeed 8
 set g_balance_arc_beam_tightness 0.5
+set g_balance_arc_bolt 0
+set g_balance_arc_bolt_ammo 1
+set g_balance_arc_bolt_damage 25
+set g_balance_arc_bolt_damageforcescale 0
+set g_balance_arc_bolt_edgedamage 12.5
+set g_balance_arc_bolt_force 100
+set g_balance_arc_bolt_health 15
+set g_balance_arc_bolt_lifetime 5
+set g_balance_arc_bolt_radius 65
+set g_balance_arc_bolt_refire 0.16667
+set g_balance_arc_bolt_speed 2200
+set g_balance_arc_bolt_spread 0.03
 set g_balance_arc_burst_ammo 15
 set g_balance_arc_burst_damage 150
 set g_balance_arc_burst_healing_aps 100
index 8f8e24c..9f54315 100644 (file)
@@ -746,6 +746,18 @@ set g_balance_arc_beam_range 1000
 set g_balance_arc_beam_refire 0.5
 set g_balance_arc_beam_returnspeed 8
 set g_balance_arc_beam_tightness 0.5
+set g_balance_arc_bolt 0
+set g_balance_arc_bolt_ammo 1
+set g_balance_arc_bolt_damage 25
+set g_balance_arc_bolt_damageforcescale 0
+set g_balance_arc_bolt_edgedamage 12.5
+set g_balance_arc_bolt_force 100
+set g_balance_arc_bolt_health 15
+set g_balance_arc_bolt_lifetime 5
+set g_balance_arc_bolt_radius 65
+set g_balance_arc_bolt_refire 0.16667
+set g_balance_arc_bolt_speed 2200
+set g_balance_arc_bolt_spread 0.03
 set g_balance_arc_burst_ammo 15
 set g_balance_arc_burst_damage 250
 set g_balance_arc_burst_healing_aps 100
index 9fde147..e20a870 100644 (file)
@@ -264,6 +264,18 @@ set g_balance_arc_beam_range 1000
 set g_balance_arc_beam_refire 0.5
 set g_balance_arc_beam_returnspeed 8
 set g_balance_arc_beam_tightness 0.5
+set g_balance_arc_bolt 0
+set g_balance_arc_bolt_ammo 1
+set g_balance_arc_bolt_damage 25
+set g_balance_arc_bolt_damageforcescale 0
+set g_balance_arc_bolt_edgedamage 12.5
+set g_balance_arc_bolt_force 100
+set g_balance_arc_bolt_health 15
+set g_balance_arc_bolt_lifetime 5
+set g_balance_arc_bolt_radius 65
+set g_balance_arc_bolt_refire 0.16667
+set g_balance_arc_bolt_speed 2200
+set g_balance_arc_bolt_spread 0.03
 set g_balance_arc_burst_ammo 0
 set g_balance_arc_burst_damage 500
 set g_balance_arc_burst_healing_aps 100
index ce00717..f268507 100644 (file)
@@ -751,6 +751,18 @@ set g_balance_arc_beam_range 1000
 set g_balance_arc_beam_refire 0.5
 set g_balance_arc_beam_returnspeed 8
 set g_balance_arc_beam_tightness 0.5
+set g_balance_arc_bolt 0
+set g_balance_arc_bolt_ammo 1
+set g_balance_arc_bolt_damage 25
+set g_balance_arc_bolt_damageforcescale 0
+set g_balance_arc_bolt_edgedamage 12.5
+set g_balance_arc_bolt_force 100
+set g_balance_arc_bolt_health 15
+set g_balance_arc_bolt_lifetime 5
+set g_balance_arc_bolt_radius 65
+set g_balance_arc_bolt_refire 0.16667
+set g_balance_arc_bolt_speed 2200
+set g_balance_arc_bolt_spread 0.03
 set g_balance_arc_burst_ammo 15
 set g_balance_arc_burst_damage 250
 set g_balance_arc_burst_healing_aps 100
index ec50bdf..9ebab48 100644 (file)
@@ -751,6 +751,18 @@ set g_balance_arc_beam_range 1000
 set g_balance_arc_beam_refire 0.5
 set g_balance_arc_beam_returnspeed 8
 set g_balance_arc_beam_tightness 0.5
+set g_balance_arc_bolt 0
+set g_balance_arc_bolt_ammo 1
+set g_balance_arc_bolt_damage 25
+set g_balance_arc_bolt_damageforcescale 0
+set g_balance_arc_bolt_edgedamage 12.5
+set g_balance_arc_bolt_force 100
+set g_balance_arc_bolt_health 15
+set g_balance_arc_bolt_lifetime 5
+set g_balance_arc_bolt_radius 65
+set g_balance_arc_bolt_refire 0.16667
+set g_balance_arc_bolt_speed 2200
+set g_balance_arc_bolt_spread 0.03
 set g_balance_arc_burst_ammo 15
 set g_balance_arc_burst_damage 250
 set g_balance_arc_burst_healing_aps 100
index ec50bdf..9ebab48 100644 (file)
@@ -751,6 +751,18 @@ set g_balance_arc_beam_range 1000
 set g_balance_arc_beam_refire 0.5
 set g_balance_arc_beam_returnspeed 8
 set g_balance_arc_beam_tightness 0.5
+set g_balance_arc_bolt 0
+set g_balance_arc_bolt_ammo 1
+set g_balance_arc_bolt_damage 25
+set g_balance_arc_bolt_damageforcescale 0
+set g_balance_arc_bolt_edgedamage 12.5
+set g_balance_arc_bolt_force 100
+set g_balance_arc_bolt_health 15
+set g_balance_arc_bolt_lifetime 5
+set g_balance_arc_bolt_radius 65
+set g_balance_arc_bolt_refire 0.16667
+set g_balance_arc_bolt_speed 2200
+set g_balance_arc_bolt_spread 0.03
 set g_balance_arc_burst_ammo 15
 set g_balance_arc_burst_damage 250
 set g_balance_arc_burst_healing_aps 100
index 4ba0766..b2544fa 100644 (file)
@@ -8161,3 +8161,95 @@ effect rocketminsta_laser_neutral
        trailspacing 12
        velocityjitter 50 50 50
        velocityoffset 0 0 15
+effect arc_muzzleflash
+       type smoke
+       alpha 256 256 512
+       color 0x00ff00 0x8f4333
+       count 2
+       lightcolor 0.3 2 0.2
+       lightradiusfade 2000
+       lightradius 200
+       originjitter 1.5 1.5 1.5
+       size 5 5
+       tex 0 8
+       velocityjitter 6 6 6
+       velocitymultiplier 0.010000
+effect arc_muzzleflash
+       type spark
+       airfriction 12
+       alpha 0 128 1024
+       color 0x00ff00 0x8f4333
+       count 15
+       originjitter 1 1 1
+       rotate -180 180 -400 400
+       size 5 10
+       stretchfactor 2
+       tex 48 55
+       velocityjitter 200 200 200
+       velocitymultiplier 0.500000
+effect arc_bolt_explode
+       type decal
+       alpha 256 256 0
+       countabsolute 1
+       lightcolor 8 4 1
+       lightradiusfade 400
+       lightradius 120
+       originjitter 14 14 14
+       size 28 38
+       tex 8 16
+effect arc_bolt_explode
+       type smoke
+       airfriction 8
+       alpha 80 200 356
+       bounce 1.500000
+       color 0x00ffff 0x00ffff
+       count 3.500000
+       liquidfriction 8
+       notunderwater
+       originjitter 8 8 8
+       sizeincrease 5
+       size 16 26
+       tex 48 55
+       velocityjitter 156 156 156
+effect arc_bolt_explode
+       type static
+       airfriction 12
+       alpha 128 256 456
+       bounce 1.500000
+       color 0x00ff00 0x8f4333
+       count 12
+       liquidfriction 8
+       notunderwater
+       originjitter 8 8 8
+       sizeincrease 15
+       size 20 26
+       tex 48 55
+       velocityjitter 286 286 286
+effect arc_bolt_explode
+       type bubble
+       alpha 128 256 64
+       bounce 1.500000
+       color 0x404040 0x808080
+       count 16
+       gravity -0.125000
+       liquidfriction 0.250000
+       originjitter 16 16 16
+       size 3 3
+       tex 62 62
+       underwater
+       velocityjitter 96 96 96
+effect arc_bolt_explode
+       type spark
+       airfriction 1
+       alpha 644 956 684
+       bounce 1.600000
+       color 0x00ff00 0x8f4333
+       count 16
+       gravity 1
+       liquidfriction 0.800000
+       notunderwater
+       originjitter 16 16 16
+       size 1 0.100000
+       tex 40 40
+       velocityjitter 224 224 224
+       velocityoffset 0 0 80
diff --git a/models/arctrail.mdl b/models/arctrail.mdl
new file mode 100644 (file)
index 0000000..5669bc4
Binary files /dev/null and b/models/arctrail.mdl differ
diff --git a/models/arctrail.mdl_0.skin b/models/arctrail.mdl_0.skin
new file mode 100644 (file)
index 0000000..96ddf30
--- /dev/null
@@ -0,0 +1,2 @@
+Plane01,arc_projectile_core
+Plane02,arc_projectile_long
index c0f644b..c8e246a 100644 (file)
@@ -294,6 +294,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                        HANDLE(GRENADE_BOUNCING)   this.traileffect = EFFECT_TR_GRENADE.m_id; break;
                        HANDLE(MINE)               this.traileffect = EFFECT_TR_GRENADE.m_id; break;
                        HANDLE(BLASTER)            this.traileffect = EFFECT_Null.m_id; break;
+                       HANDLE(ARC_BOLT)           this.traileffect = EFFECT_Null.m_id; break;
                        HANDLE(HLAC)               this.traileffect = EFFECT_Null.m_id; break;
                        HANDLE(PORTO_RED)          this.traileffect = EFFECT_TR_WIZSPIKE.m_id; this.scale = 4; break;
                        HANDLE(PORTO_BLUE)         this.traileffect = EFFECT_TR_WIZSPIKE.m_id; this.scale = 4; break;
index b2302f6..b0445ab 100644 (file)
@@ -200,6 +200,8 @@ const int PROJECTILE_SHAMBLER_LIGHTNING = 33;
 
 const int PROJECTILE_ROCKETMINSTA_LASER = 34;
 
+const int PROJECTILE_ARC_BOLT = 35;
+
 // projectile IDs 40-50 reserved
 
 const int PROJECTILE_RPC = 60;
index b341800..060367a 100644 (file)
@@ -12,6 +12,7 @@ EFFECT(0, SMOKE_SMALL,              "smoke_small")
 EFFECT(0, SMOKE_LARGE,              "smoke_large")
 
 
+EFFECT(0, ARC_MUZZLEFLASH,          "arc_muzzleflash")
 
 EFFECT(0, BLASTER_IMPACT,           "laser_impact")
 EFFECT(0, BLASTER_MUZZLEFLASH,      "laser_muzzleflash")
@@ -23,6 +24,7 @@ EFFECT(0, ARC_BEAM,                 "arc_beam")
 EFFECT(0, ARC_BEAM_HEAL,            "arc_beam_heal")
 EFFECT(0, ARC_BEAM_HEAL_IMPACT,     "arc_beam_healimpact")
 EFFECT(0, ARC_BEAM_HEAL_IMPACT2,    "healray_impact")
+EFFECT(0, ARC_BOLT_EXPLODE,         "arc_bolt_explode")
 EFFECT(0, ARC_OVERHEAT,             "arc_overheat")
 EFFECT(0, ARC_OVERHEAT_FIRE,        "arc_overheat_fire")
 EFFECT(0, ARC_SMOKE,                "arc_smoke")
index 7a0fc66..56303a4 100644 (file)
@@ -8731,3 +8731,145 @@ SUB(arc_overheat_fire) {
 #include "effectinfo_buffs.inc"
 
 #include "effectinfo_instagib.inc"
+
+DEF(arc_muzzleflash);
+SUB(arc_muzzleflash) {
+       MY(alpha_min) = 256;
+       MY(alpha_max) = 256;
+       MY(alpha_fade) = 512;
+       MY(color_min) = "0x00ff00";
+       MY(color_max) = "0x8f4333";
+       MY(count) = 2;
+       MY(lightcolor) = '0.3 2.0 0.2';
+       MY(lightradiusfade) = 2000;
+       MY(lightradius) = 200;
+       MY(originjitter) = '1.5 1.5 1.5';
+       MY(size_min) = 5;
+       MY(size_max) = 5;
+       MY(tex_max) = 8;
+       MY(type) = "smoke";
+       MY(velocityjitter) = '6.0 6.0 6.0';
+       MY(velocitymultiplier) = 0.010000;
+}
+SUB(arc_muzzleflash) {
+       MY(airfriction) = 12;
+       MY(alpha_max) = 128;
+       MY(alpha_fade) = 1024;
+       MY(color_min) = "0x00ff00";
+       MY(color_max) = "0x8f4333";
+       MY(count) = 15;
+       MY(originjitter) = '1.0 1.0 1.0';
+       MY(startangle_min) = -180;
+       MY(startangle_max) = 180;
+       MY(spin_min) = -400;
+       MY(spin_max) = 400;
+       MY(size_min) = 5;
+       MY(size_max) = 10;
+       MY(stretchfactor) = 2;
+       MY(tex_min) = 48;
+       MY(tex_max) = 55;
+       MY(type) = "spark";
+       MY(velocityjitter) = '200.0 200.0 200.0';
+       MY(velocitymultiplier) = 0.500000;
+}
+
+DEF(arc_bolt_explode);
+// decal
+SUB(arc_bolt_explode) {
+       MY(alpha_min) = 256;
+       MY(alpha_max) = 256;
+       MY(countabsolute) = 1;
+       MY(lightcolor) = '8.0 4.0 1.0';
+       MY(lightradiusfade) = 400;
+       MY(lightradius) = 120;
+       MY(originjitter) = '14.0 14.0 14.0';
+       MY(size_min) = 28;
+       MY(size_max) = 38;
+       MY(tex_min) = 8;
+       MY(tex_max) = 16;
+       MY(type) = "decal";
+}
+// fire effect which make bright dot inside
+SUB(arc_bolt_explode) {
+       MY(airfriction) = 8;
+       MY(alpha_min) = 80;
+       MY(alpha_max) = 200;
+       MY(alpha_fade) = 356;
+       MY(bounce) = 1.500000;
+       MY(color_min) = "0x00ffff";
+       MY(color_max) = "0x00ffff";
+       MY(count) = 3.500000;
+       MY(liquidfriction) = 8;
+       MY(notunderwater) = true;
+       MY(originjitter) = '8.0 8.0 8.0';
+       MY(sizeincrease) = 5;
+       MY(size_min) = 16;
+       MY(size_max) = 26;
+       MY(tex_min) = 48;
+       MY(tex_max) = 55;
+       MY(type) = "smoke";
+       MY(velocityjitter) = '156.0 156.0 156.0';
+}
+// fire effect which expands then slows
+SUB(arc_bolt_explode) {
+       MY(airfriction) = 12;
+       MY(alpha_min) = 128;
+       MY(alpha_max) = 256;
+       MY(alpha_fade) = 456;
+       MY(bounce) = 1.500000;
+       MY(color_min) = "0x00ff00";
+       MY(color_max) = "0x8f4333";
+       MY(count) = 12;
+       MY(liquidfriction) = 8;
+       MY(notunderwater) = true;
+       MY(originjitter) = '8.0 8.0 8.0';
+       MY(sizeincrease) = 15;
+       MY(size_min) = 20;
+       MY(size_max) = 26;
+       MY(tex_min) = 48;
+       MY(tex_max) = 55;
+       MY(type) = "static";
+       MY(velocityjitter) = '286.0 286.0 286.0';
+}
+// underwater bubbles
+SUB(arc_bolt_explode) {
+       MY(alpha_min) = 128;
+       MY(alpha_max) = 256;
+       MY(alpha_fade) = 64;
+       MY(bounce) = 1.500000;
+       MY(color_min) = "0x404040";
+       MY(color_max) = "0x808080";
+       MY(count) = 16;
+       MY(gravity) = -0.125000;
+       MY(liquidfriction) = 0.250000;
+       MY(originjitter) = '16.0 16.0 16.0';
+       MY(size_min) = 3;
+       MY(size_max) = 3;
+       MY(tex_min) = 62;
+       MY(tex_max) = 62;
+       MY(type) = "bubble";
+       MY(underwater) = true;
+       MY(velocityjitter) = '96.0 96.0 96.0';
+}
+// bouncing sparks
+SUB(arc_bolt_explode) {
+       MY(airfriction) = 1;
+       MY(alpha_min) = 644;
+       MY(alpha_max) = 956;
+       MY(alpha_fade) = 684;
+       MY(bounce) = 1.600000;
+       MY(color_min) = "0x00ff00";
+       MY(color_max) = "0x8f4333";
+       MY(count) = 16;
+       MY(gravity) = 1;
+       MY(liquidfriction) = 0.800000;
+       MY(notunderwater) = true;
+       MY(originjitter) = '16.0 16.0 16.0';
+       MY(size_min) = 1;
+       MY(size_max) = 0.100000;
+       MY(tex_min) = 40;
+       MY(tex_max) = 40;
+       MY(type) = "spark";
+       MY(velocityjitter) = '224.0 224.0 224.0';
+       MY(velocityoffset) = '0.0 0.0 80.0';
+}
index 354df9a..08aeaae 100644 (file)
@@ -88,6 +88,8 @@ MODEL(PROJECTILE_HOOKBOMB,              "models/grenademodel.md3");
 MODEL(PROJECTILE_HAGAR,                 "models/hagarmissile.mdl");
 MODEL(PROJECTILE_HAGAR_BOUNCING,        "models/hagarmissile.mdl");
 
+MODEL(PROJECTILE_ARC_BOLT,              "models/arctrail.mdl");
+
 // napalm grenade
 MODEL(PROJECTILE_NAPALM_FOUNTAIN,       "null");
 // fireball primary
index a36dc23..545b878 100644 (file)
     MSG_INFO_NOTIF(1, INFO_WEAPON_ACCORDEON_MURDER,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weapontuba",             _("^BG%s%s^K1 died of ^BG%s^K1's great playing on the @!#%%'n Accordeon%s%s"), "")
     MSG_INFO_NOTIF(1, INFO_WEAPON_ACCORDEON_SUICIDE,             2, 1, "s1 s2loc spree_lost", "s1",                 "weapontuba",             _("^BG%s^K1 hurt their own ears with the @!#%%'n Accordeon%s%s"), "")
     MSG_INFO_NOTIF(1, INFO_WEAPON_ARC_MURDER,                    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponarc",              _("^BG%s%s^K1 was electrocuted by ^BG%s^K1's Arc%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_ARC_MURDER_SPRAY,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponarc",              _("^BG%s%s^K1 was blasted by ^BG%s^K1's Arc bolts%s%s"), "")
     MSG_INFO_NOTIF(1, INFO_WEAPON_BLASTER_MURDER,                3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponlaser",            _("^BG%s%s^K1 was shot to death by ^BG%s^K1's Blaster%s%s"), "")
     MSG_INFO_NOTIF(1, INFO_WEAPON_BLASTER_SUICIDE,               2, 1, "s1 s2loc spree_lost", "s1",                 "weaponlaser",            _("^BG%s^K1 shot themself to hell with their Blaster%s%s"), "")
     MSG_INFO_NOTIF(1, INFO_WEAPON_CRYLINK_MURDER,                3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponcrylink",          _("^BG%s%s^K1 felt the strong pull of ^BG%s^K1's Crylink%s%s"), "")
     MSG_MULTI_NOTIF(1, WEAPON_ACCORDEON_MURDER,              NO_MSG,        INFO_WEAPON_ACCORDEON_MURDER,              NO_MSG)
     MSG_MULTI_NOTIF(1, WEAPON_ACCORDEON_SUICIDE,             NO_MSG,        INFO_WEAPON_ACCORDEON_SUICIDE,             CENTER_DEATH_SELF_GENERIC)
     MSG_MULTI_NOTIF(1, WEAPON_ARC_MURDER,                    NO_MSG,        INFO_WEAPON_ARC_MURDER,                    NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_ARC_MURDER_SPRAY,              NO_MSG,        INFO_WEAPON_ARC_MURDER_SPRAY,              NO_MSG)
     MSG_MULTI_NOTIF(1, WEAPON_BLASTER_MURDER,                NO_MSG,        INFO_WEAPON_BLASTER_MURDER,                NO_MSG)
     MSG_MULTI_NOTIF(1, WEAPON_BLASTER_SUICIDE,               NO_MSG,        INFO_WEAPON_BLASTER_SUICIDE,               CENTER_DEATH_SELF_GENERIC)
     MSG_MULTI_NOTIF(1, WEAPON_CRYLINK_MURDER,                NO_MSG,        INFO_WEAPON_CRYLINK_MURDER,                NO_MSG)
index ba36d8f..1d6a4a7 100644 (file)
@@ -17,6 +17,18 @@ CLASS(Arc, Weapon)
 
 #define X(BEGIN, P, END, class, prefix) \
        BEGIN(class) \
+               P(class, prefix, bolt, float, NONE) \
+               P(class, prefix, bolt_ammo, float, NONE) \
+        P(class, prefix, bolt_damageforcescale, float, NONE) \
+        P(class, prefix, bolt_damage, float, NONE) \
+        P(class, prefix, bolt_edgedamage, float, NONE) \
+        P(class, prefix, bolt_force, float, NONE) \
+        P(class, prefix, bolt_health, float, NONE) \
+        P(class, prefix, bolt_lifetime, float, NONE) \
+        P(class, prefix, bolt_radius, float, NONE) \
+        P(class, prefix, bolt_refire, float, NONE) \
+        P(class, prefix, bolt_speed, float, NONE) \
+        P(class, prefix, bolt_spread, float, NONE) \
                P(class, prefix, beam_ammo, float, NONE) \
         P(class, prefix, beam_animtime, float, NONE) \
         P(class, prefix, beam_botaimlifetime, float, NONE) \
@@ -217,6 +229,77 @@ void Arc_Player_SetHeat(entity player)
        //dprint("Heat: ",ftos(player.arc_heat_percent*100),"%\n");
 }
 
+void W_Arc_Bolt_Explode()
+{SELFPARAM();
+       self.event_damage = func_null;
+       RadiusDamage(self, self.realowner, WEP_CVAR(arc, bolt_damage), WEP_CVAR(arc, bolt_edgedamage), WEP_CVAR(arc, bolt_radius), world, world, WEP_CVAR(arc, bolt_force), self.projectiledeathtype, other);
+
+       remove(self);
+}
+
+void W_Arc_Bolt_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+{
+       if(this.health <= 0)
+               return;
+
+       if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1))
+               return; // g_projectiles_damage says to halt
+
+       this.health = this.health - damage;
+       this.angles = vectoangles(this.velocity);
+
+       if(this.health <= 0)
+               WITH(entity, self, this, W_PrepareExplosionByDamage(attacker, this.think));
+}
+
+void W_Arc_Bolt_Touch()
+{SELFPARAM();
+       PROJECTILE_TOUCH;
+       self.use();
+}
+
+void W_Arc_Attack_Bolt(Weapon thiswep)
+{SELFPARAM();
+       entity missile;
+
+       W_DecreaseAmmo(thiswep, self, WEP_CVAR(arc, bolt_ammo));
+
+       W_SetupShot(self, false, 2, SND(LASERGUN_FIRE), CH_WEAPON_A, WEP_CVAR(arc, bolt_damage));
+
+       Send_Effect(EFFECT_ARC_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
+
+       missile = new(missile);
+       missile.owner = missile.realowner = self;
+       missile.bot_dodge = true;
+       missile.bot_dodgerating = WEP_CVAR(arc, bolt_damage);
+
+       missile.takedamage = DAMAGE_YES;
+       missile.health = WEP_CVAR(arc, bolt_health);
+       missile.damageforcescale = WEP_CVAR(arc, bolt_damageforcescale);
+       missile.event_damage = W_Arc_Bolt_Damage;
+       missile.damagedbycontents = true;
+
+       missile.touch = W_Arc_Bolt_Touch;
+       missile.use = W_Arc_Bolt_Explode;
+       missile.think = adaptor_think2use_hittype_splash;
+       missile.nextthink = time + WEP_CVAR(arc, bolt_lifetime);
+       PROJECTILE_MAKETRIGGER(missile);
+       missile.projectiledeathtype = WEP_ARC.m_id | HITTYPE_SECONDARY;
+       setorigin(missile, w_shotorg);
+       setsize(missile, '0 0 0', '0 0 0');
+
+       missile.movetype = MOVETYPE_FLY;
+       W_SetupProjVelocity_PRE(missile, arc, bolt_);
+
+       missile.angles = vectoangles(missile.velocity);
+       missile.flags = FL_PROJECTILE;
+       missile.missile_flags = MIF_SPLASH;
+
+       CSQCProjectile(missile, true, PROJECTILE_ARC_BOLT, true);
+
+       MUTATOR_CALLHOOK(EditProjectile, self, missile);
+}
+
 void W_Arc_Beam_Think()
 {SELFPARAM();
        if(self != self.owner.arc_beam)
@@ -227,7 +310,7 @@ void W_Arc_Beam_Think()
 
 
        float burst = 0;
-       if( self.owner.BUTTON_ATCK2 || self.beam_bursting)
+       if( (self.owner.BUTTON_ATCK2 && !WEP_CVAR(arc, bolt)) || self.beam_bursting)
        {
                if(!self.beam_bursting)
                        self.beam_bursting = true;
@@ -665,8 +748,10 @@ void Arc_Smoke()
                        Arc_Player_SetHeat(actor);
                        Arc_Smoke();
 
+                       bool beam_fire2 = ((fire & 2) && !WEP_CVAR(arc, bolt));
+
                        if (time >= actor.arc_overheat)
-                       if ((fire & 1) || (fire & 2) || actor.arc_beam.beam_bursting)
+                       if ((fire & 1) || beam_fire2 || actor.arc_beam.beam_bursting)
                        {
 
                                if(actor.arc_BUTTON_ATCK_prev)
@@ -681,9 +766,9 @@ void Arc_Smoke()
 
                                if((!actor.arc_beam) || wasfreed(actor.arc_beam))
                                {
-                                       if(weapon_prepareattack(thiswep, actor, weaponentity, boolean(fire & 2), 0))
+                                       if(weapon_prepareattack(thiswep, actor, weaponentity, boolean(beam_fire2), 0))
                                        {
-                                               W_Arc_Beam(boolean(fire & 2));
+                                               W_Arc_Beam(boolean(beam_fire2));
 
                                                if(!actor.arc_BUTTON_ATCK_prev)
                                                {
@@ -695,6 +780,14 @@ void Arc_Smoke()
 
                                return;
                        }
+                       else if(fire & 2)
+                       {
+                               if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(arc, bolt_refire)))
+                               {
+                                       W_Arc_Attack_Bolt(thiswep);
+                                       weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR(arc, bolt_refire), w_ready);
+                               }
+                       }
 
                        if(actor.arc_BUTTON_ATCK_prev)
                        {
@@ -734,12 +827,22 @@ void Arc_Smoke()
                METHOD(Arc, wr_checkammo2, bool(entity thiswep))
                {
                        SELFPARAM();
-                       return WEP_CVAR(arc, overheat_max) > 0 &&
-                               ((!WEP_CVAR(arc, burst_ammo)) || (self.(thiswep.ammo_field) > 0));
+                       if(WEP_CVAR(arc, bolt))
+                       {
+                               float ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(arc, bolt_ammo);
+                               ammo_amount += self.(weapon_load[WEP_ARC.m_id]) >= WEP_CVAR(arc, bolt_ammo);
+                               return ammo_amount;
+                       }
+                       else
+                               return WEP_CVAR(arc, overheat_max) > 0 &&
+                                       ((!WEP_CVAR(arc, burst_ammo)) || (self.(thiswep.ammo_field) > 0));
                }
                METHOD(Arc, wr_killmessage, int(entity thiswep))
                {
-                       return WEAPON_ARC_MURDER;
+                       if(w_deathtype & HITTYPE_SECONDARY)
+                               return WEAPON_ARC_MURDER_SPRAY;
+                       else
+                               return WEAPON_ARC_MURDER;
                }
                METHOD(Arc, wr_drop, void(entity thiswep))
                {
@@ -759,6 +862,17 @@ void Arc_Smoke()
                }
 #endif
 #ifdef CSQC
+               METHOD(Arc, wr_impacteffect, void(entity thiswep))
+               {
+                       if(w_deathtype & HITTYPE_SECONDARY)
+                       {
+                               vector org2;
+                               org2 = w_org + w_backoff * 6;
+                               pointparticles(EFFECT_ARC_BOLT_EXPLODE, org2, w_backoff * 1000, 1);
+                               if(!w_issilent) { sound(self, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTN_NORM); }
+                       }
+               }
+
 void Draw_ArcBeam_callback(vector start, vector hit, vector end)
 {
        entity beam = Draw_ArcBeam_callback_entity;
index 16847e5..6273b82 100644 (file)
@@ -1,3 +1,25 @@
+arc_projectile_core
+{
+       surfaceparm nonsolid
+       surfaceparm nolightmap
+       deformVertexes autosprite
+       {
+               map textures/projectiles/arc_projectile_core.tga
+               blendfunc GL_SRC_ALPHA GL_ONE
+               rgbGen lightingDiffuse
+       }
+}
+arc_projectile_long
+{
+       surfaceparm nonsolid
+       surfaceparm nolightmap
+       deformVertexes autosprite2
+       {
+               map textures/projectiles/arc_projectile_long.tga
+               blendfunc GL_SRC_ALPHA GL_ONE
+               rgbGen lightingDiffuse
+       }
+}
 crylink_projectile_core
 {
        surfaceparm nonsolid
diff --git a/textures/projectiles/arc_projectile_core.tga b/textures/projectiles/arc_projectile_core.tga
new file mode 100644 (file)
index 0000000..61ffec1
Binary files /dev/null and b/textures/projectiles/arc_projectile_core.tga differ
diff --git a/textures/projectiles/arc_projectile_core_glow.tga b/textures/projectiles/arc_projectile_core_glow.tga
new file mode 100644 (file)
index 0000000..bf0bd8b
Binary files /dev/null and b/textures/projectiles/arc_projectile_core_glow.tga differ
diff --git a/textures/projectiles/arc_projectile_long.tga b/textures/projectiles/arc_projectile_long.tga
new file mode 100644 (file)
index 0000000..a878dc2
Binary files /dev/null and b/textures/projectiles/arc_projectile_long.tga differ
diff --git a/textures/projectiles/arc_projectile_long_glow.tga b/textures/projectiles/arc_projectile_long_glow.tga
new file mode 100644 (file)
index 0000000..a878dc2
Binary files /dev/null and b/textures/projectiles/arc_projectile_long_glow.tga differ