Raised This Month: $ Target: $400
 0% 

why someone said TeleportEntity() always fire after 1 frame?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LinLinLin
Senior Member
Join Date: Sep 2021
Old 05-04-2024 , 13:38   why someone said TeleportEntity() always fire after 1 frame?
Reply With Quote #1

I am not sure about that. Is there any evidence to support this situation? And he also said that DispatchKeyValueVector() will faster than teleport.

I check the code in sourcemod-master. The different between dispatch and teleport is that TeleportEntity() will start a call for gamedata like GlobeFoward to call the server function, and then store it in a arraylist, but DispatchKeyValueVector() use a servertool to set the vector directly for an entity.

Also i have test the time of function fire in game, they always fire in the same GetTickedTime(). Both of them GetEngineTime() is late but sometime they can fire in the same GetEngineTime().

Last edited by LinLinLin; 05-04-2024 at 13:38.
LinLinLin is online now
Evening45
New Member
Join Date: May 2024
Old 05-08-2024 , 08:05   Re: why someone said TeleportEntity() always fire after 1 frame?
Reply With Quote #2

If your tests show similar timings under normal conditions, the real difference might only show under heavy server load or specific scenarios.
Evening45 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 15:07.


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