Raised This Month: $ Target: $400
 0% 

Detect +USE key


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 11-14-2007 , 08:38   Re: Detect +USE key
Reply With Quote #1

Quote:
Originally Posted by alien View Post
Thank you Orangutanz. May I have a couple of questions?

What are these?

#define FMRES_HANDLED 2 // Probably to block forward into the engine?
#define FMRES_SUPERCEDE 4 // To pass forward into the engine?
#define FMRES_IGNORED 1 // To ... well.
#define FMRES_OVERRIDE 3 // To lol. No idea!

And what's random_seed parameter?
See here about the handling defines:
MetaMod Coding

random_seed will be as it suggests (random numbers), looking deeper at it obviously there is something which is random within the structure of CmdStart possibly UC_LerpMsec or UC_Msec, unsure exactly where it is used.
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 11-10-2007 , 19:14   Re: Detect +USE key
Reply With Quote #2

wow so my shove mod uses bad practices.. I should update this to FM_CmdStart

Thanks
Styles is offline
Send a message via AIM to Styles
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 11-11-2007 , 05:21   Re: Detect +USE key
Reply With Quote #3

Quote:
Originally Posted by styles View Post
wow so my shove mod uses bad practices.. I should update this to FM_CmdStart

Thanks
Historically, it's been good practice back when people first used the buttons entvar because a FM_CmdStart forward didn't even exist then.
__________________
hello, i am pm
PM is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-11-2007 , 05:27   Re: Detect +USE key
Reply With Quote #4

Quote:
Originally Posted by PM View Post
Historically, it's been good practice back when people first used the buttons entvar because a FM_CmdStart forward didn't even exist then.
o.O, prehistoric era! hi PM :-)
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 11-11-2007 , 09:15   Re: Detect +USE key
Reply With Quote #5

Quote:
Originally Posted by PM View Post
Historically, it's been good practice back when people first used the buttons entvar because a FM_CmdStart forward didn't even exist then.
True just a good job a few of us AMX guys joined AMXX. I took a particular liking to FakeMeta so suggested improvements and bug fixes, CmdStart being one of them (I believe) quite a few anyhow
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd

Last edited by Orangutanz; 11-11-2007 at 09:18.
Orangutanz is offline
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 11-12-2007 , 20:57   Re: Detect +USE key
Reply With Quote #6

May I use it for every single IN_ command? What an optimization this came down to be!
__________________
alien is offline
Send a message via ICQ to alien
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 11-12-2007 , 21:38   Re: Detect +USE key
Reply With Quote #7

Quote:
Originally Posted by alien View Post
May I use it for every single IN_ command? What an optimization this came down to be!
Yes
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 11-13-2007 , 05:40   Re: Detect +USE key
Reply With Quote #8

Why would you get the players buttons and then check the timer?

That should be the first thing in the function.
(before is_user_alive, even - it's much faster to check one global variable than to call any function ever written)
purple_pixie 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 01:13.


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