* May 24, 2013, 11:34:15 PM
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Come Chat with us live! Learn how HERE!
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Grenade Launcher ( Gravity / actual Range )  (Read 309 times)
Noyesdude


Turrets: +2/-1
Posts: 44


« on: May 28, 2012, 06: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
Logged

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 Cheesy
/dev/humancontroller


Turrets: +19/-376
Posts: 855


« Reply #1 on: May 28, 2012, 02: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?
Logged
Noyesdude


Turrets: +2/-1
Posts: 44


« Reply #2 on: May 28, 2012, 05: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.
Logged

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 Cheesy
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
TremPlus theme by Ingar, based on AF316 theme by Fedhog
Valid XHTML 1.0! Valid CSS!