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);
}
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, 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 == targ) // only apply dp_sf to self-force
+ 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);