Raised This Month: $51 Target: $400
 12% 

Grenade Gravity Ignores Server Gravity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 04-10-2022 , 01:56   Grenade Gravity Ignores Server Gravity
Reply With Quote #1

I've been on here a while today and done a bunch of testing. I'm trying to make it so that a grenade thrown always behaves like it is sv_gravity = 800, even if sv_gravity is 200, or 3000, etc. Essentially, I want the nade to fly the same no matter what the server gravity is.

Here's my code


Since it wasnt working perfectly, I have it do nothing to alter the nade during normal gravity. My guess is that the split second it spawns, the trajectory vector is already altered due to the server gravity, and even after fixing its gravity, the angles/velocity are already altered, so it comes out slightly different.

Note: I've also tried setting:
PHP Code:
SetEntityGravity(iEnt1.0); 
and
PHP Code:
SetEntityGravity(iEntview_as<float>(1.0/GetEntityGravity(iEnt))); 
Also experimented with SDKHook_Spawn vs SDKHook_SpawnPost, and using a 0.1 second timer vs RequestFrame (the timer took too long and gravity was applied mid-flight).

Anyone tackle this one or have an idea how to make it perfect?
__________________

Last edited by ThatOneGuy; 04-10-2022 at 02:00.
ThatOneGuy is offline
Reply



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 08:04.


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