lfnetwork.com mark read register faq members calendar

Thread: What is the falling of projectiles governed by?
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 02-19-2004, 10:40 PM   #1
sroerick
 
sroerick's Avatar
 
Join Date: Jun 2002
Posts: 90
What is the falling of projectiles governed by?

E.G repeater alternate fire. Where would you change how fast it falls?
sroerick is offline   you may: quote & reply,
Old 04-18-2004, 08:14 AM   #2
Codja X
Junior Member
 
Codja X's Avatar
 
Join Date: Mar 2004
Location: South Wales, UK
Posts: 445
Gravity.

Seriously - there's a gravity cvar that is set by default to 800, so if you change it, you can change the trajectory of it. This would affect other weapons as well and projectiles such as the grenades etc.

My 1st post in the coding forum - hope it helps someone
Codja X is offline   you may: quote & reply,
Old 04-18-2004, 08:54 AM   #3
Jon Denver
Rookie
 
Join Date: Apr 2004
Location: Denver, CO
Posts: 10
I would think that every entity has a 'weight', at least that would make sense...


Programmers are just a tool to convert coffee into code.
Jon Denver is offline   you may: quote & reply,
Old 04-18-2004, 10:31 AM   #4
Codja X
Junior Member
 
Codja X's Avatar
 
Join Date: Mar 2004
Location: South Wales, UK
Posts: 445
I'm pretty sure the cvar is sv_gravity. Type it in the console - the lower the number specified, the lower the gravity. You could probably set this in the .cfg per map and wouldn't need coding or compiling.
Codja X is offline   you may: quote & reply,
Old 04-19-2004, 01:20 PM   #5
Wudan
Got Balance?
 
Wudan's Avatar
 
Join Date: Oct 2002
Location: Salt Lake, UT
Posts: 1,442
Yes, but changing the cvar affects everything.

The code for the behavior of this projectile is in g_weapon.c, the function is "static void WP_RepeaterAltFire( gentity_t *ent )", it's at line 1074.

To make it descend slower, just alter the line:
Code:
missile->s.pos.trDelta[2] += 40.0f; //give a slight boost in the upward direction
as you see fit. What i'd do is make a server side cvar, tie it to missile->s.pos.trDelta[2] and then play with the setting to get it where you want it.


Mt-Wudan.com
I made a silly little program called Dragon, which is an animation tool for the GLA format, used in Jedi Outcast, Jedi Academy and Krakatoa.
Wudan is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > What is the falling of projectiles governed by?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:01 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.