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

[orpheu] Set airaccelerate


Post New Thread Reply   
 
Thread Tools Display Modes
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 09-13-2011 , 10:32   Re: [orpheu] Set airaccelerate
Reply With Quote #11

Quote:
Originally Posted by Arkshine View Post
sv_airaccelerate is SERVER cvar, so a global setting and not per player.
And it can't be created as he wants?
dark_style is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-13-2011 , 10:46   Re: [orpheu] Set airaccelerate
Reply With Quote #12

About your problem, no idea because it modifies the param of the structure on the fly and I don't see how it could be flood on the player unless you send a weird value. Try to sent a value as integer not float.
__________________
Arkshine is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 09-13-2011 , 13:01   Re: [orpheu] Set airaccelerate
Reply With Quote #13

When the value is not a float, the function is not working and after second player try to connect he gets the same error.
dark_style is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-13-2011 , 13:28   Re: [orpheu] Set airaccelerate
Reply With Quote #14

You're right, it should be float.

Still, I don't see how it could be flood on player just by changing a param on the fly.
Have you tried lowered value for example 15 and see what happens ?
__________________
Arkshine is offline
kostov
Member
Join Date: Jan 2010
Location: Bulgaria, Sofia
Old 09-13-2011 , 14:04   Re: [orpheu] Set airaccelerate
Reply With Quote #15

Quote:
Originally Posted by Arkshine View Post
You're right, it should be float.

Still, I don't see how it could be flood on player just by changing a param on the fly.
Have you tried lowered value for example 15 and see what happens ?
I set 15.0, the result was the same:

WARNING: reliable overflow for NickName
Dropped NickName from server
Reason: Reliable channel overflowed
kostov is offline
Old 09-13-2011, 14:24
Arkshine
This message has been deleted by Arkshine. Reason: nvm
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-13-2011 , 14:40   Re: [orpheu] Set airaccelerate
Reply With Quote #16

After thinking, I guess I understand why it floods.

PM_Move() is called when a player is moving, so called for all players and a lot of time.
The param we change on the fly is a structure containing the values of server cvars related to movement.

When a player connects to a server, a SVC_NEWMOVEVARS message is sent, containing the value of theses cvars, so the client is updated properly.
Each time you change the value of these cvars through the console, it checks if the value saved (movevars structure) is the same as the entered value, and if not, a message is sent to the client. Actually it checks constantly if there is a change.

So, now, what happens when you hook PM_Move, something called very often, and you change a value from the movevar structure ? A SVC_NEWMOVEVARS message is most likely be sent each time to the client, resulting a flood.

As solution it might be enough to sent only one time SVC_NEWMOVEVARS manually and you remove the need of hooking PM_Move. Though I have no idea if it will work, it may detect a change between client/server and the server may sent a new message.
__________________

Last edited by Arkshine; 09-13-2011 at 14:46.
Arkshine is offline
kostov
Member
Join Date: Jan 2010
Location: Bulgaria, Sofia
Old 09-13-2011 , 15:12   Re: [orpheu] Set airaccelerate
Reply With Quote #17

Quote:
Originally Posted by Arkshine View Post
After thinking, I guess I understand why it floods.

PM_Move() is called when a player is moving, so called for all players and a lot of time.
The param we change on the fly is a structure containing the values of server cvars related to movement.

When a player connects to a server, a SVC_NEWMOVEVARS message is sent, containing the value of theses cvars, so the client is updated properly.
Each time you change the value of these cvars through the console, it checks if the value saved (movevars structure) is the same as the entered value, and if not, a message is sent to the client. Actually it checks constantly if there is a change.

So, now, what happens when you hook PM_Move, something called very often, and you change a value from the movevar structure ? A SVC_NEWMOVEVARS message is most likely be sent each time to the client, resulting a flood.

As solution it might be enough to sent only one time SVC_NEWMOVEVARS manually and you remove the need of hooking PM_Move. Though I have no idea if it will work, it may detect a change between client/server and the server may sent a new message.
I do not know if this is correct, but block SVC_NEWMOVEVARS like this:

PHP Code:
set_msg_block(SVC_NEWMOVEVARSBLOCK_SET); 
Тhe result was the same. Sorry, can you give sample code to limit SVC_NEWMOVEVARS witch orpheu?
kostov is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-13-2011 , 15:24   Re: [orpheu] Set airaccelerate
Reply With Quote #18

You can't hook/block it, it's used internally in the engine. But you can send it manually.

A solution would be probably to send manually one time and to not use the native (more the method using PM_Move which is a bad way).
__________________
Arkshine is offline
kostov
Member
Join Date: Jan 2010
Location: Bulgaria, Sofia
Old 09-13-2011 , 15:31   Re: [orpheu] Set airaccelerate
Reply With Quote #19

Quote:
Originally Posted by Arkshine View Post
You can't hook/block it, it's used internally in the engine. But you can send it manually.

A solution would be probably to send manually one time and to not use the native (more the method using PM_Move which is a bad way).
Well then the problem does not exist. Ok, Thank you for your help
kostov is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-13-2011 , 15:39   Re: [orpheu] Set airaccelerate
Reply With Quote #20

Not sure if you have understood me..
__________________
Arkshine 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 17:18.


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