Raised This Month: $ Target: $400
 0% 

Prethink velocity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Prajch
Senior Member
Join Date: Dec 2007
Location: anger++
Old 08-29-2008 , 19:26   Prethink velocity
Reply With Quote #1

If I give someone an upward velocity during their prethink, will they still be touching the ground on their next prethink (i.e. does the velocity immediately cause a displacement or does it take a full "frame" before they move)?
Prajch is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-29-2008 , 19:44   Re: Prethink velocity
Reply With Quote #2

Why don't you test and find out?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Prajch
Senior Member
Join Date: Dec 2007
Location: anger++
Old 08-29-2008 , 19:58   Re: Prethink velocity
Reply With Quote #3

Because I've been trying to for the last several hours...
Prajch is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-29-2008 , 20:11   Re: Prethink velocity
Reply With Quote #4

Code:
#include <amxmodx> #include <fakemeta> new bool:g_up[33]; public plugin_init() {     register_plugin("PreThink Velocity Test", "0.1", "Exolent");         register_forward(FM_PlayerPreThink, "FwdPlayerPreThink"); } public client_connect(client) {     g_up[client] = false; } public FwdPlayerPreThink(client) {     if( !is_user_alive(client) ) return;         new Float:velocity[3];     pev(client, pev_velocity, velocity);         if( velocity[2] <= 0.0 && g_up[client] )     {         // client just now starts to fall after rising         g_up[client] = false;     }     else if( velocity[2] > 0.0 && !g_up[client] )     {         // client just now starts to rise         g_up[client] = true;                 if( pev(client, pev_flags) & FL_ONGROUND )         {             client_print(client, print_chat, "You are moving up while on the ground");         }         else         {             client_print(client, print_chat, "You are moving up and not on the ground");         }     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Prajch
Senior Member
Join Date: Dec 2007
Location: anger++
Old 08-30-2008 , 04:38   Re: Prethink velocity
Reply With Quote #5

Thanks for the code. Apparently the problem I'm having has nothing to do with that though, oh well... I'd give you karma but it says I can't anymore.
Prajch 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 03:13.


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