Raised This Month: $ Target: $400
 0% 

problem with setting gravity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 02-05-2009 , 08:34   Re: problem with setting gravity
Reply With Quote #3

Quote:
Originally Posted by L// View Post
set_pev(id, pev_gravity, 1.0)

gravity = 800


Other ie:

new Float:gravity = 0.5
set_pev(id, pev_gravity, gravity)

gravity = 450
First simple math:
900 * 0.5 = 450, but
800 * 0.5 = 400
Also your example only happens if sv_gravity is the default 800.
In pev_gravity, 3rd parameter is a factor for the sv_gravity cvar.
Example:
sv_gravity = 200
set_pev(player_index, pev_gravity, 0.5);
Player's gravity is 200 * 0.5 = 100

Last edited by SnoW; 02-05-2009 at 08:39.
SnoW is offline
Send a message via MSN to SnoW
 



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 On
HTML code is Off

Forum Jump


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


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode