Tremulous Forum

Mods => Modding Center => Topic started by: Noyesdude on May 28, 2012, 07:48:19 am

Title: Grenade Launcher ( Gravity / actual Range )
Post by: Noyesdude on May 28, 2012, 07:48:19 am
I'm working on the coding side of a grenade launcher and I'm trying to find out how to give it a farther range than the grenade and not something that flys across the screen to hit the wall or entity then explode. Any help here would be awesome.

Thanks
  Noyesdude
Title: Re: Grenade Launcher ( Gravity / actual Range )
Post by: /dev/humancontroller on May 28, 2012, 03:10:10 pm
I'm working on the coding side of a grenade launcher and I'm trying to find out how to give it a farther range than the grenade
see the launch_grenade() function in g_missile.c, which gets called when a "grenade weapon" is fired. there, in the creation and setup of a new grenade (a missile entity), the velocity of the grenade is set based on the GRENADE_SPEED constant (and the firing direction). in your "copy" of the launch_grenade() function, increase that number.
not something that flys across the screen
what the clockfuck does that mean?
Title: Re: Grenade Launcher ( Gravity / actual Range )
Post by: Noyesdude on May 28, 2012, 06:52:51 pm
see the launch_grenade() function in g_missile.c, which gets called when a "grenade weapon" is fired. there, in the creation and setup of a new grenade (a missile entity), the velocity of the grenade is set based on the GRENADE_SPEED constant (and the firing direction). in your "copy" of the launch_grenade() function, increase that number.

Thanks I missed that.
not something that flys across the screen
what the clockfuck does that mean?

I meant map, Like all the other weapons that, seemingly, have no maximum range.