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

Run speed issue after upgrading to SteamCMD and latest AMX Mod X


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
3vo
Junior Member
Join Date: Nov 2017
Old 11-15-2017 , 22:54   Run speed issue after upgrading to SteamCMD and latest AMX Mod X
Reply With Quote #1

Cross post from SuperHero scripting help (https://forums.alliedmods.net/showthread.php?t=302915, but the issue appears to likely be related to AMXX itself after upgrading AMX Mod X from 1.8.1.x to 1.8.2.

So, the gist of the issue is that when a client joins the server, their movement speed is set to whatever values their cl_[forward|back|side]speeds happen to be set as. If a client respawns in the middle of a round, their speeds are also set to those cl_ values.

Running everything via HLDS and AMXX 1.8.1, I do not encounter any issues and plugins interact with speeds as expected. If I run the exact same plugins with AMXX 1.8.2 on SteamCMD, I encounter the issues above. This also continues to happen when recompiling plugins with 1.8.2.

The main plugin (SH) hooks Ham_Spawn to set user variables. Did something change with Ham_Spawn between 1.8.1 and 1.8.2 that I'm not seeing? If anyone can help with fixing this issue, it would be greatly appreciated. I can share full repro steps with files and/or host a server if needed.
3vo is offline
TheWhitesmith
Senior Member
Join Date: Oct 2017
Location: Morocco :c
Old 11-19-2017 , 19:13   Re: Run speed issue after upgrading to SteamCMD and latest AMX Mod X
Reply With Quote #2

set_user_maxspeed ?
I dont understand what's your problem, if you could be more explicit?
TheWhitesmith is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-20-2017 , 05:25   Re: Run speed issue after upgrading to SteamCMD and latest AMX Mod X
Reply With Quote #3

Nothing is going to change in how ham functions work, since they are not implemented in amxx, this are game functions.

You should show a minimal code that produces this bug(don't just copy paste a 10000 lines file and expect someone to debug it).
__________________
HamletEagle is offline
3vo
Junior Member
Join Date: Nov 2017
Old 11-20-2017 , 12:18   Re: Run speed issue after upgrading to SteamCMD and latest AMX Mod X
Reply With Quote #4

Quote:
Originally Posted by TheWhitesmith View Post
set_user_maxspeed ?
I dont understand what's your problem, if you could be more explicit?
Not quite sure how I could be more explicit. set_user_maxspeed does not work within a Ham_Spawn call any longer, even when setting the post flag to 1, whereas you were able to affect a client within that call prior.

Quote:
Originally Posted by HamletEagle View Post
Nothing is going to change in how ham functions work, since they are not implemented in amxx, this are game functions.

You should show a minimal code that produces this bug(don't just copy paste a 10000 lines file and expect someone to debug it).
Something did change with how Ham_Spawn functions though, even if it isn't with Ham_Spawn itself. It is very easy to test and I can send files or quickly start a server to display it if you would like.

Using my older setup, functions could be ran on clients directly within a Ham_Spawn call with setting post to 1 ( RegisterHam(Ham_Spawn, "player", "ham_PlayerSpawn_Post", 1) ). Now, anything you try to do to a client in that call does not actually happen. The only workaround that I was able to find was to set a task 0.1 seconds later that contains anything you want to do to a client.
3vo is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-20-2017 , 13:42   Re: Run speed issue after upgrading to SteamCMD and latest AMX Mod X
Reply With Quote #5

Quote:
Originally Posted by 3vo View Post
Not quite sure how I could be more explicit. set_user_maxspeed does not work within a Ham_Spawn call any longer, even when setting the post flag to 1, whereas you were able to affect a client within that call prior.



Something did change with how Ham_Spawn functions though, even if it isn't with Ham_Spawn itself. It is very easy to test and I can send files or quickly start a server to display it if you would like.

Using my older setup, functions could be ran on clients directly within a Ham_Spawn call with setting post to 1 ( RegisterHam(Ham_Spawn, "player", "ham_PlayerSpawn_Post", 1) ). Now, anything you try to do to a client in that call does not actually happen. The only workaround that I was able to find was to set a task 0.1 seconds later that contains anything you want to do to a client.
No, it didn't. Provide some test code because I'm sure you are doing something wrong.
__________________

Last edited by HamletEagle; 11-20-2017 at 13:42.
HamletEagle is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 11-20-2017 , 14:15   Re: Run speed issue after upgrading to SteamCMD and latest AMX Mod X
Reply With Quote #6

regular spawn works fine, I've had problems with order of execution when combining it with Ham_CS_RoundRespawn but can't be arsed to try to reproduce, I needed a quick solution so also did a 0.5 sec task

if you want help then produce a small script that recreates your issue
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
3vo
Junior Member
Join Date: Nov 2017
Old 11-20-2017 , 20:47   Re: Run speed issue after upgrading to SteamCMD and latest AMX Mod X
Reply With Quote #7

Quote:
Originally Posted by HamletEagle View Post
No, it didn't. Provide some test code because I'm sure you are doing something wrong.
https://forums.alliedmods.net/showthread.php?t=76081

Set sv_maxspeed to 2000. Set your client-side cl_*speed values to 2000. Run the above on AMXX 1.8.1. Then try running it again on AMXX 1.8.2+.

When you first spawn into the game on the first trial, your run speed is what you would expect it to be. When you first spawn into the game on the second trial, you will move at 2000 speed. This same thing happens when you respawn in the middle of a round; on 1.8.1 you will move at your correct speed whereas on 1.8.2+, you will move at 2000.

Functionality does change without there being a code change in the plugin.
3vo is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-21-2017 , 06:49   Re: Run speed issue after upgrading to SteamCMD and latest AMX Mod X
Reply With Quote #8

Quote:
Originally Posted by 3vo View Post
https://forums.alliedmods.net/showthread.php?t=76081

Set sv_maxspeed to 2000. Set your client-side cl_*speed values to 2000. Run the above on AMXX 1.8.1. Then try running it again on AMXX 1.8.2+.

When you first spawn into the game on the first trial, your run speed is what you would expect it to be. When you first spawn into the game on the second trial, you will move at 2000 speed. This same thing happens when you respawn in the middle of a round; on 1.8.1 you will move at your correct speed whereas on 1.8.2+, you will move at 2000.

Functionality does change without there being a code change in the plugin.
I said a simple test code, not an entire mod. Basically a plugin that only change speed and which can prove that there's a bug.
__________________
HamletEagle 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 13:32.


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