Added cvar fcs_bombtaltthrow, to randomize bomb throwing velocities

This commit is contained in:
Marco Cawthorne 2019-03-24 16:28:19 +01:00
parent ac227d6732
commit ca3cdb3a28
8 changed files with 15 additions and 7 deletions

View file

@ -24,15 +24,16 @@ var int autocvar_mp_friendlyfire = FALSE;
// New, FreeCS exclusive variables
var int autocvar_fcs_voxannounce = FALSE;
var int autocvar_fcs_knifeonly = FALSE; // Disallows buying and spawning with weps
var int autocvar_fcs_swapteams = FALSE; // Swaps spawnpoints
var int autocvar_fcs_nopickups = FALSE; // Disable weapon items
var int autocvar_fcs_knifeonly = FALSE; /* Disallows buying and spawning with weps */
var int autocvar_fcs_swapteams = FALSE; /* Swaps spawnpoints */
var int autocvar_fcs_nopickups = FALSE; /* Disable weapon items */
var int autocvar_fcs_reward_kill = 300;
var int autocvar_fcs_penalty_pain = -150;
var int autocvar_fcs_penalty_kill = -1500;
var int autocvar_fcs_maxmoney = 16000;
var int autocvar_fcs_fillweapons = FALSE; // This will automatically get ammo for the weapon you buy
var int autocvar_fcs_fix_bombtimer = FALSE;
var int autocvar_fcs_fillweapons = FALSE; /* This will automatically get ammo for the weapon you buy */
var int autocvar_fcs_fix_bombtimer = FALSE; /* If true, the bomb-timer will dictate the round-end */
var int autocvar_fcs_bombaltthrow = FALSE; /* Randomize the bomb-throw every time ever so slightly */
// Mapcycle features
var string autocvar_mapcyclefile = "mapcycle.txt";

View file

@ -501,9 +501,16 @@ void Weapon_DropWeapon( int iSlot ) {
eDrop.nextthink = time + 1.0f;
eDrop.health = self.(wptTable[ fWeapon ].iMagfld);
setsize( eDrop, '-16 -16 0', '16 16 16' );
makevectors( self.v_angle );
eDrop.velocity = aim( self, 10000 ) * 256;
if (fWeapon == WEAPON_C4BOMB && autocvar_fcs_bombaltthrow) {
eDrop.velocity = v_forward * random(32, 96);
eDrop.velocity += v_right * random(-64, 64);
eDrop.velocity[2] = 0;
} else {
eDrop.velocity = self.velocity + v_forward * 256;
}
self.weapon = 0;
Weapon_SwitchBest();

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.