Eternal
Arena |
|
|
Coding Tutorials
|
Monday, May 14 |
|
Coding Tutorials - Weapon Coding
Code to be Deleted or
Commented out Code to be Added or Changed
Grenades |
You can make the Grenade Launcher fire the
grenades over long distances and in straight lines so the
grenades aren't effected by gravity. |
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 |
Lets 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;
| | |
Advertisement |
|
Web Search |
|
Poll |
|
|