Author Topic: Grenade Launcher ( Gravity / actual Range )  (Read 6896 times)

Noyesdude

  • Posts: 44
  • Turrets: +2/-1
Grenade Launcher ( Gravity / actual Range )
« 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
Co-creater of the Pbot installation guide(http://xserverx.com/forum/viewtopic.php?f=44&t=2352) on XserverX, and Tremulous player. and btw its No-yes-dude :D

/dev/humancontroller

  • Posts: 1033
  • Turrets: +1002/-383
Re: Grenade Launcher ( Gravity / actual Range )
« Reply #1 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?

Noyesdude

  • Posts: 44
  • Turrets: +2/-1
Re: Grenade Launcher ( Gravity / actual Range )
« Reply #2 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.
Co-creater of the Pbot installation guide(http://xserverx.com/forum/viewtopic.php?f=44&t=2352) on XserverX, and Tremulous player. and btw its No-yes-dude :D