How to make grenades fly straight
Code to be Deleted or Commented out
Code to be Added or Changed
g_weapon.c
The following lines in the weapon_grenadelauncher_fire function adds alittle height when you fire off a grenade, so comment them out by adding a // infront of them, that will make them fire just straight forward where you point to.
// extra vertical velocity
// forward[2] += 0.2;
// VectorNormalize( forward );
g_missile.c
Let's make the grenades fly straight and not effected by gravity and fall to the floor, so in the fire_grenade find the line:-
bolt->s.pos.trType = TR_GRAVITY;
and change it to
bolt->s.pos.trType = TR_LINEAR; |