set g_balance_devastator_animtime 0.4
set g_balance_devastator_damage 80
set g_balance_devastator_damageforcescale 1
+set g_balance_devastator_damagepush_speedfactor 0
set g_balance_devastator_detonatedelay 0.02
set g_balance_devastator_edgedamage 40
set g_balance_devastator_force 400
set g_balance_devastator_animtime 0.3
set g_balance_devastator_damage 105
set g_balance_devastator_damageforcescale 4
+set g_balance_devastator_damagepush_speedfactor 0
set g_balance_devastator_detonatedelay 0.2
set g_balance_devastator_edgedamage 40
set g_balance_devastator_force 600
set g_balance_devastator_animtime 0.4
set g_balance_devastator_damage 70
set g_balance_devastator_damageforcescale 1
+set g_balance_devastator_damagepush_speedfactor 0
set g_balance_devastator_detonatedelay 0.02
set g_balance_devastator_edgedamage 35
set g_balance_devastator_force 450
set g_balance_devastator_animtime 0.7
set g_balance_devastator_damage 80
set g_balance_devastator_damageforcescale 0
+set g_balance_devastator_damagepush_speedfactor 0
set g_balance_devastator_detonatedelay 999
set g_balance_devastator_edgedamage 40
set g_balance_devastator_force 350
set g_balance_devastator_animtime 0.4
set g_balance_devastator_damage 80
set g_balance_devastator_damageforcescale 1
+set g_balance_devastator_damagepush_speedfactor 0
set g_balance_devastator_detonatedelay 0.02
set g_balance_devastator_edgedamage 40
set g_balance_devastator_force 400
strcpy(forcefog, ReadString());
armorblockpercent = ReadByte() / 255.0;
- damagepush_speedfactor = ReadByte() / 255.0;
serverflags = ReadByte();
const float ALPHA_MIN_VISIBLE = 0.003;
float armorblockpercent;
-float damagepush_speedfactor;
//hooks
int calledhooks;
if(it.damageforcescale)
if(vdist(thisforce, !=, 0))
{
- it.velocity = it.velocity + damage_explosion_calcpush(it.damageforcescale * thisforce, it.velocity, damagepush_speedfactor);
+ // gibs are unscaled by damagepush_speedfactor
+ it.velocity += it.damageforcescale * thisforce;
UNSET_ONGROUND(it);
}
METHOD(Devastator, wr_setup, void(entity thiswep, entity actor, .entity weaponentity))
{
actor.(weaponentity).rl_release = 1;
+ actor.(weaponentity).damagepush_speedfactor = WEP_CVAR(devastator, damagepush_speedfactor);
}
METHOD(Devastator, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
{
BEGIN(class) \
P(class, prefix, ammo, float, NONE) \
P(class, prefix, animtime, float, NONE) \
- P(class, prefix, damageforcescale, float, NONE) \
P(class, prefix, damage, float, NONE) \
+ P(class, prefix, damageforcescale, float, NONE) \
+ P(class, prefix, damagepush_speedfactor, float, NONE) \
P(class, prefix, detonatedelay, float, NONE) \
P(class, prefix, edgedamage, float, NONE) \
P(class, prefix, force, float, NONE) \
else
WriteString(channel, "");
WriteByte(channel, this.count * 255.0); // g_balance_armor_blockpercent
- WriteByte(channel, this.cnt * 255.0); // g_balance_damagepush_speedfactor
WriteByte(channel, serverflags);
WriteCoord(channel, autocvar_g_trueaim_minrange);
}
this.count = autocvar_g_balance_armor_blockpercent;
this.SendFlags |= 1;
}
- if(this.cnt != autocvar_g_balance_damagepush_speedfactor)
- {
- this.cnt = autocvar_g_balance_damagepush_speedfactor;
- this.SendFlags |= 1;
- }
}
void ClientInit_Spawn()
if (force)
if (!IS_PLAYER(targ) || !StatusEffects_active(STATUSEFFECT_SpawnShield, targ) || targ == attacker)
{
- vector farce = damage_explosion_calcpush(targ.damageforcescale * force, targ.velocity, autocvar_g_balance_damagepush_speedfactor);
+ float dp_sf = 0;
+ if (attacker.(weaponentity).damagepush_speedfactor != 0) // if initialized
+ dp_sf = attacker.(weaponentity).damagepush_speedfactor;
+ else
+ dp_sf = autocvar_g_balance_damagepush_speedfactor;
+
+ vector farce = damage_explosion_calcpush(targ.damageforcescale * force, targ.velocity, dp_sf);
if(targ.move_movetype == MOVETYPE_PHYSICS)
{
entity farcent = new(farce);
.float misc_bulletcounter;
+.float damagepush_speedfactor;
+
.int projectiledeathtype;
.float fade_time;
this.m_weapon = newwep;
this.weaponname = newwep.mdl;
this.bulletcounter = 0;
+ this.damagepush_speedfactor = autocvar_g_balance_damagepush_speedfactor;
newwep.wr_setup(newwep, actor, weaponentity);
this.state = WS_RAISE;