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

[REQ] store origin everytime I start falling down


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lazarev
Veteran Member
Join Date: Sep 2008
Old 05-29-2012 , 17:20   [REQ] store origin everytime I start falling down
Reply With Quote #1

basically I want to store origin right after my velocity starts going from positive to negative
lazarev is offline
kp3t3h
Senior Member
Join Date: Feb 2011
Old 05-29-2012 , 19:00   Re: [REQ] store origin everytime I start falling down
Reply With Quote #2

jumping too?
__________________
need help with the following
no.1, no.2, no.3, no.4 no.5
kp3t3h is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-30-2012 , 01:07   Re: [REQ] store origin everytime I start falling down
Reply With Quote #3

In client_PreThink, store origin and flags, if in next prethink :
origin[2] is < stored_origin[2] && ~flags&FL_ONGROUND && stored_flags & FL_ONGROUND
Then it means you are falling down and you can keep what is already stored as the last "onground" origin before you fall.
You can have a look at what i have done in MpBhop plugin.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 05-30-2012 at 01:07.
ConnorMcLeod is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 05-30-2012 , 02:54   Re: [REQ] store origin everytime I start falling down
Reply With Quote #4

Quote:
Originally Posted by kp3t3h View Post
jumping too?
yes.
lazarev is offline
Old 05-30-2012, 03:20
lazarev
This message has been deleted by lazarev.
lazarev
Veteran Member
Join Date: Sep 2008
Old 05-30-2012 , 11:31   Re: [REQ] store origin everytime I start falling down
Reply With Quote #5

I figured it out, but the problem now is that ducking mess up the actual position :/
lazarev is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-30-2012 , 12:12   Re: [REQ] store origin everytime I start falling down
Reply With Quote #6

Code:
new Float:origin[3]; entity_get_vector(id, EV_VEC_origin, origin); if(get_entity_flags(id) & FL_DUCKING) {     origin[2] += 18.0; } // you have the proper origin
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 15:10.


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