set g_balance_grenadelauncher_secondary_ammo 2
set g_balance_grenadelauncher_secondary_health 70
set g_balance_grenadelauncher_secondary_damageforcescale 4
+set g_balance_grenadelauncher_secondary_bouncefactor 0.5
+set g_balance_grenadelauncher_secondary_bouncestop 0.075
// }}}
// {{{ electro
set g_balance_electro_lightning 0
set g_balance_grenadelauncher_secondary_ammo 2
set g_balance_grenadelauncher_secondary_health 10
set g_balance_grenadelauncher_secondary_damageforcescale 4
+set g_balance_grenadelauncher_secondary_bouncefactor 0.5
+set g_balance_grenadelauncher_secondary_bouncestop 0.075
// }}}
// {{{ electro
set g_balance_electro_lightning 0
set g_balance_grenadelauncher_secondary_ammo 2
set g_balance_grenadelauncher_secondary_health 0
set g_balance_grenadelauncher_secondary_damageforcescale 0
+set g_balance_grenadelauncher_secondary_bouncefactor 0.5
+set g_balance_grenadelauncher_secondary_bouncestop 0.075
// }}}
// {{{ electro
set g_balance_electro_lightning 1
set g_balance_grenadelauncher_secondary_ammo 2
set g_balance_grenadelauncher_secondary_health 70
set g_balance_grenadelauncher_secondary_damageforcescale 4
+set g_balance_grenadelauncher_secondary_bouncefactor 0.5
+set g_balance_grenadelauncher_secondary_bouncestop 0.075
// }}}
// {{{ electro
set g_balance_electro_lightning 0
}
}
+.float bouncefactor;
+.float bouncestop;
void Ent_Projectile()
{
- float f;
+ float f, s;
// projectile properties:
// kind (interpolated, or clientside)
self.velocity_z = ReadCoord();
self.gravity = ReadCoord();
+ s = ReadByte();
+
+ if (s & 1)
+ {
+ self.bouncefactor = ReadCoord();
+ self.bouncestop = ReadCoord();
+ }
+
self.move_origin = self.origin;
self.move_velocity = self.velocity;
+ self.move_bounce_factor = self.bouncefactor;
+ self.move_bounce_stopspeed = self.bouncestop;
}
if(time == self.spawntime || (self.count & 0x80) || (f & 0x10))
float CSQCProjectile_SendEntity(entity to, float sf)
{
float ft, fr;
+ float s;
// note: flag 0x10 = no trail please
sf = sf & 0x1F;
sf |= 0x20;
}
+ // HACK: subflags for sendflags = 0x80
+
+ s = 0;
+
+ if (self.movetype == MOVETYPE_BOUNCEMISSILE || self.movetype == MOVETYPE_BOUNCE)
+ s |= 1;
+
WriteByte(MSG_ENTITY, ENT_CLIENT_PROJECTILE);
WriteByte(MSG_ENTITY, sf);
WriteCoord(MSG_ENTITY, self.velocity_y);
WriteCoord(MSG_ENTITY, self.velocity_z);
WriteCoord(MSG_ENTITY, self.gravity);
+
+ WriteByte(MSG_ENTITY, s);
+
+ if (s & 1)
+ {
+ WriteCoord(MSG_ENTITY, self.bouncefactor);
+ WriteCoord(MSG_ENTITY, self.bouncestop);
+ }
}
if(sf & 0x20)
gren.bot_dodge = TRUE;
gren.bot_dodgerating = cvar("g_balance_grenadelauncher_secondary_damage");
gren.movetype = MOVETYPE_BOUNCE;
+ gren.bouncefactor = cvar("g_balance_grenadelauncher_secondary_bouncefactor");
+ gren.bouncestop = cvar("g_balance_grenadelauncher_secondary_bouncestop");
PROJECTILE_MAKETRIGGER(gren);
gren.projectiledeathtype = WEP_GRENADE_LAUNCHER | HITTYPE_SECONDARY;
setsize(gren, '0 0 -3', '0 0 -3');