set g_balance_electro_combo_comboradius 300
set g_balance_electro_combo_comboradius_thruwall 200
set g_balance_electro_combo_damage 50
+set g_balance_electro_combo_duration 0
set g_balance_electro_combo_edgedamage 25
set g_balance_electro_combo_force 120
+set g_balance_electro_combo_power 3
set g_balance_electro_combo_radius 150
set g_balance_electro_combo_safeammocheck 1
set g_balance_electro_combo_speed 2000
set g_balance_electro_combo_comboradius 0
set g_balance_electro_combo_comboradius_thruwall 0
set g_balance_electro_combo_damage 80
+set g_balance_electro_combo_duration 0
set g_balance_electro_combo_edgedamage 0
set g_balance_electro_combo_force 200
+set g_balance_electro_combo_power 3
set g_balance_electro_combo_radius 250
set g_balance_electro_combo_safeammocheck 0
set g_balance_electro_combo_speed 2000
set g_balance_electro_combo_comboradius 300
set g_balance_electro_combo_comboradius_thruwall 200
set g_balance_electro_combo_damage 50
+set g_balance_electro_combo_duration 0
set g_balance_electro_combo_edgedamage 25
set g_balance_electro_combo_force 120
+set g_balance_electro_combo_power 3
set g_balance_electro_combo_radius 150
set g_balance_electro_combo_safeammocheck 1
set g_balance_electro_combo_speed 2000
set g_balance_electro_combo_comboradius 300
set g_balance_electro_combo_comboradius_thruwall 200
set g_balance_electro_combo_damage 50
+set g_balance_electro_combo_duration 0
set g_balance_electro_combo_edgedamage 25
set g_balance_electro_combo_force 120
+set g_balance_electro_combo_power 3
set g_balance_electro_combo_radius 150
set g_balance_electro_combo_safeammocheck 1
set g_balance_electro_combo_speed 2000
set g_balance_electro_combo_comboradius 275
set g_balance_electro_combo_comboradius_thruwall 200
set g_balance_electro_combo_damage 50
+set g_balance_electro_combo_duration 0
set g_balance_electro_combo_edgedamage 25
set g_balance_electro_combo_force 120
+set g_balance_electro_combo_power 3
set g_balance_electro_combo_radius 175
set g_balance_electro_combo_safeammocheck 1
set g_balance_electro_combo_speed 2000
set g_balance_electro_combo_comboradius 300
set g_balance_electro_combo_comboradius_thruwall 200
set g_balance_electro_combo_damage 50
+set g_balance_electro_combo_duration 0
set g_balance_electro_combo_edgedamage 25
set g_balance_electro_combo_force 120
+set g_balance_electro_combo_power 3
set g_balance_electro_combo_radius 150
set g_balance_electro_combo_safeammocheck 1
set g_balance_electro_combo_speed 2000
}
}
+void W_Electro_ExplodeComboThink(entity this)
+{
+ float dt = time - this.teleport_time;
+ float dmg_remaining_next = (bound(0, 1 - dt / this.dmg_duration, 1) ** this.dmg_power);
+
+ float f = this.dmg_last - dmg_remaining_next;
+ this.dmg_last = dmg_remaining_next;
+
+ RadiusDamage(this, this.realowner, this.dmg * f, this.dmg_edge * f, this.dmg_radius, NULL, NULL, this.dmg_force * f, this.projectiledeathtype, this.weaponentity_fld, NULL);
+ this.projectiledeathtype |= HITTYPE_BOUNCE; // ensure it doesn't spam its effect
+
+ if(dt < this.dmg_duration)
+ this.nextthink = time + 0.05; // soon
+ else
+ delete(this);
+}
+
void W_Electro_ExplodeCombo(entity this)
{
W_Electro_TriggerCombo(this.origin, WEP_CVAR(electro, combo_comboradius), this.realowner);
this.event_damage = func_null;
+ if(WEP_CVAR(electro, combo_duration))
+ {
+ this.projectiledeathtype = WEP_ELECTRO.m_id | HITTYPE_SPLASH;
+ this.event_damage = func_null;
+ settouch(this, func_null);
+ this.effects |= EF_NODRAW;
+
+ setthink(this, W_Electro_ExplodeComboThink);
+ this.nextthink = time;
+ this.dmg = WEP_CVAR(electro, combo_damage);
+ this.dmg_edge = WEP_CVAR(electro, combo_edgedamage);
+ this.dmg_radius = WEP_CVAR(electro, combo_radius);
+ this.dmg_force = WEP_CVAR(electro, combo_force);
+ this.dmg_power = WEP_CVAR(electro, combo_power);
+ this.dmg_duration = WEP_CVAR(electro, combo_duration);
+ this.teleport_time = time;
+ this.dmg_last = 1;
+ set_movetype(this, MOVETYPE_NONE);
+ return;
+ }
+
RadiusDamage(
this,
this.realowner,
}
else
{
- if(w_deathtype & HITTYPE_BOUNCE)
+ if(w_deathtype & HITTYPE_SPLASH)
+ {
+ org2 = w_org + w_backoff * 2;
+ pointparticles(EFFECT_HOOK_EXPLODE, org2, '0 0 0', 1);
+ if(!w_issilent)
+ sound(actor, CH_SHOTS, SND_ELECTRO_IMPACT_COMBO, VOL_BASE, ATTEN_NORM);
+ }
+ else if(w_deathtype & HITTYPE_BOUNCE)
{
// this is sent as "primary (w_deathtype & HITTYPE_BOUNCE)" to distinguish it from (w_deathtype & HITTYPE_SECONDARY) bounced balls
pointparticles(EFFECT_ELECTRO_COMBO, org2, '0 0 0', 1);
/* spawnfunc */ ATTRIB(Electro, m_canonical_spawnfunc, string, "weapon_electro");
/* ammotype */ ATTRIB(Electro, ammo_type, int, RES_CELLS);
/* impulse */ ATTRIB(Electro, impulse, int, 5);
-/* flags */ ATTRIB(Electro, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
+/* flags */ ATTRIB(Electro, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
/* rating */ ATTRIB(Electro, bot_pickupbasevalue, float, 5000);
/* color */ ATTRIB(Electro, wpcolor, vector, '0 0.5 1');
/* modelname */ ATTRIB(Electro, mdl, string, "electro");
P(class, prefix, combo_comboradius, float, NONE) \
P(class, prefix, combo_comboradius_thruwall, float, NONE) \
P(class, prefix, combo_damage, float, NONE) \
+ P(class, prefix, combo_duration, float, NONE) \
P(class, prefix, combo_edgedamage, float, NONE) \
P(class, prefix, combo_force, float, NONE) \
P(class, prefix, combo_radius, float, NONE) \
+ P(class, prefix, combo_power, float, NONE) \
P(class, prefix, combo_safeammocheck, float, NONE) \
P(class, prefix, combo_speed, float, NONE) \
P(class, prefix, count, float, SEC) \
SPAWNFUNC_WEAPON(weapon_electro, WEP_ELECTRO)
#ifdef SVQC
+.float dmg;
+.float dmg_edge;
+.float dmg_radius;
+.float dmg_force;
+.float dmg_power;
+.float dmg_duration;
+.float dmg_last;
+
.float electro_count;
.float electro_secondarytime;
void W_Electro_ExplodeCombo(entity this);
total_damage_to_creatures = 0;
- if(deathtype != (WEP_HOOK.m_id | HITTYPE_SECONDARY | HITTYPE_BOUNCE)) // only send gravity bomb damage once
+ if(deathtype != (WEP_HOOK.m_id | HITTYPE_SECONDARY | HITTYPE_BOUNCE) && deathtype != (WEP_ELECTRO.m_id | HITTYPE_BOUNCE | HITTYPE_SPLASH)) // only send damage over time bombs once
if(DEATH_WEAPONOF(deathtype) != WEP_TUBA) // do not send tuba damage (bandwidth hog)
{
force = inflictorvelocity;