Raised This Month: $124 Target: $400
 31% 

SMAC null cmd explanation.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Visual77
Veteran Member
Join Date: Jan 2009
Old 03-28-2018 , 17:33   SMAC null cmd explanation.
Reply With Quote #1

Hi.

I'm interested to know what the reason is behind blocking null cmd input in OnClientRunCmd. Does anyone from the smac team remember why this code is in here. Is it possibly just a typo and it's ment to return Plugin_Continue ?

smac_eyetest.sp ->

This;
Code:
	// NULL commands
	if (cmdnum <= 0)
		return Plugin_Handled;

Last edited by Visual77; 03-28-2018 at 17:37.
Visual77 is offline
SystematicMania
Senior Member
Join Date: Aug 2012
Old 04-01-2018 , 06:25   Re: SMAC null cmd explanation.
Reply With Quote #2

Formerly, the seed for weapon spread was calculated as seed=MD5_PseudoRandom(cmdnum). Not blocking cmdnum=0 causes a static seed to be easily accessible. Meaning, cheats wouldn't need to brute force this seed by skipping future cmdnums. IIRC, cmdnum=0 is useless and typically caused by clients typing "disconnect" in console.
__________________
SystematicMania is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 04-01-2018 , 07:28   Re: SMAC null cmd explanation.
Reply With Quote #3

Thanks for replying. That explains why it happend frequently on mapchange and on joiniing the spectator team.

Last edited by Visual77; 04-01-2018 at 07:29.
Visual77 is offline
Reply


Thread Tools
Display Modes

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 09:31.


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