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

[CSGO] DesiredTimescale UserMsg


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 10-31-2017 , 07:15   [CSGO] DesiredTimescale UserMsg
Reply With Quote #1

Found this usermsg called DesiredTimescale:
PHP Code:
message CCSUsrMsg_DesiredTimescale {
    
optional float desired_timescale 1;
    
optional float duration_realtime_sec 2;
    
optional int32 interpolator_type 3;
    
optional float start_blend_time 4;

I tested it out with this code:
PHP Code:
Handle msg StartMessageOne"DesiredTimescale"client );
if( 
msg != INVALID_HANDLE )
{
    
PrintToServer"Successfully found DesiredTimescale UserMsg" );
    
    
Protobuf pb UserMessageToProtobufmsg );
    
    
pb.SetFloat"desired_timescale"0.5 );
    
pb.SetFloat"duration_realtime_sec"1.0 );
    
pb.SetInt"interpolator_type"g_InterpType );
    
pb.SetFloat"start_blend_time"0.5 );
    
    
EndMessage()
    
    
PrintToServer"******* Interp. type: %i ********"gI_InterpType );
    
g_InterpType++;

On testing it, it seems to work like host_timescale does, and has the same issues with laggines/stuttering that host_timescale does when set on a single client. I was hoping to see if anyone knew what these settings do, and how they affect the timescale. I'm hoping that interpolator_type (or possibly one of the other settings) might be a fix to the stuttering issue, so that's really the focus of the question, from my testing I haven't found any values that make any significant difference and I don't really understand what they do.

If you want to see the what stuttering issue is here's a video showcasing it (only first ~15s): https://www.youtube.com/watch?v=KS_2TsTenyo

Last edited by hmmmmm; 10-31-2017 at 07:21.
hmmmmm is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 10-31-2017 , 23:25   Re: [CSGO] DesiredTimescale UserMsg
Reply With Quote #2

So from testing out I think I've figured out what most of the parameters are and what they do. Wasn't exactly what I was looking for but I'll write it out anyway in case anyone wants this effect and struggles to find any info on it like I did.

Basically it gradually takes clients from their current timescale to the desired timescale (hence the name)


desired_timescale - the desired timescale, pretty self explanatory

duration_realtime_sec - the time in seconds that this change should happen over. e.g. curr timescale is 1.0, desired is 0.1, duration_realtime_sec is 5.0, it will take 5s to go from timescale of 1 to 0.1

interpolator_type - I haven't noticed any major changes from playing with this value but I'm guessing that it uses these to decide how to interpolate between current timescale to desired timescale

start_blend_time - The delay in seconds (real time) before it starts the process of changing timescale

If you're interested in how it does this take a look at https://mxr.alliedmods.net/hl2sdk-cs..._shared.cpp#92 and https://mxr.alliedmods.net/hl2sdk-cs...shared.cpp#127

Last edited by hmmmmm; 11-20-2017 at 00:21. Reason: Found some more details
hmmmmm 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 12:09.


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