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

[Request]High resolution timer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SimonB
Junior Member
Join Date: Apr 2017
Location: home
Old 05-02-2017 , 23:42   [Request]High resolution timer
Reply With Quote #1

Is there any timer with a resolution of less than a millisecond for sourcemod?
SimonB is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 05-03-2017 , 03:11   Re: [Request]High resolution timer
Reply With Quote #2

Most public timers that I'm aware of all record down to the ten thousandths of a second (.xxxx), but only display to the tenths/hundreths in the hud.
__________________
sneaK is offline
ESK0
BANNED
Join Date: May 2014
Location: Czech Republic
Old 05-03-2017 , 13:51   Re: [Request]High resolution timer
Reply With Quote #3

Use OnGameFrame()
ESK0 is offline
Chaosxk
Veteran Member
Join Date: Aug 2010
Location: Westeros
Old 05-03-2017 , 15:54   Re: [Request]High resolution timer
Reply With Quote #4

+ GetGameTime()
~ 15.2 ms for 66 Tick (orange box games)
~ 7.8 ms for 128 Tick (CS:GO)
__________________

Last edited by Chaosxk; 05-03-2017 at 16:00.
Chaosxk is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 05-03-2017 , 17:45   Re: [Request]High resolution timer
Reply With Quote #5

OSWO's timer updates HUD very frequently, but isn't finished. You can change update rate of HUD easily though on other timers. Most have it update every 0.1s on a timer, just change that to OnPlayerRunCmd or OnGameFrame. But like sneak said, most timers still record times very accurately, just update HUD less than that.

Last edited by hmmmmm; 05-03-2017 at 17:45.
hmmmmm is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 05-10-2017 , 05:47   Re: [Request]High resolution timer
Reply With Quote #6

You can't make this faster than your server tickrate.
But a timer which checks the player position with a 0.1s timer is pretty inaccurate, this can even cause problems where the player is very fast and passes a zone without detection.
This can happen even if you check the client position every tick, but you have to be really fast than.
My old timer was working with trigger_multiple, since you fix both issues like that.
It will trigger no matter how faster you are, the engine checks the player position (which is faster than checking manually by sourcemod.

However there are 2 problems with trigger_multiple:

1. You can't change the zone shape, only square zones are possible (without pre compiled models, the players wouldn't need to download them btw).

2. The End touch event is always 1 tick delayed, which means if you teleport from inside a zone the end touch event will be triggered when you have been teleported already, this will conflict if you try to mix this method with non-squared zones (You'll need some exra checks).
__________________
zipcore 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 14:04.


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