Drakath Posted March 9, 2014 Share Posted March 9, 2014 Will it lag for the player if I use too much onClientRender? Link to comment
Karuzo Posted March 9, 2014 Share Posted March 9, 2014 This event and onClientPreRender will trigger whatever function it is attached to with every frame. Depending on the server's maximum FPS and what your computer might handle - you might end up triggering the function 30-60 times per second.As a result, this event may cause severe lag and/or even crashes if not used cautiously. Link to comment
teQuilla Posted March 9, 2014 Share Posted March 9, 2014 If used to much , yes , it could cause lag to the client . But there are alot of variables that play in wether it lags the client or not . CPU and GPU play a big role here though . Depends from case to case. Link to comment
Drakath Posted March 9, 2014 Author Share Posted March 9, 2014 What about 'onClientHUDRender'? Link to comment
xXMADEXx Posted March 9, 2014 Share Posted March 9, 2014 What about 'onClientHUDRender'? It's the same as onClientRender and onClientPreRender. It's just triggered at a different time in the render process. https://wiki.multitheftauto.com/wiki/Ga ... sing_Order Link to comment
madis Posted March 10, 2014 Share Posted March 10, 2014 I suggest you add timer and output how long your callback took on each call (outputting time might be slow itself, keep that in mind), extra 0-3ms is very OK in my opinion. Link to comment
Mr_Moose Posted March 10, 2014 Share Posted March 10, 2014 The main usage of that event is basically if you want to draw a text for instance with dxdrawtext, I'm using it in multiple resources and every frame it calls getElementData to verify if it should write anything, defines around 0-10 local variables (to calculate distance between some objects and output it), and some more. Let's not forget thought that this is a client sided function so the performance required to use it will be provided by the client computers and not the server. As long you doesn't add really heavy CPU wasting code in it there won't be any problem. Link to comment
Moderators IIYAMA Posted March 10, 2014 Moderators Share Posted March 10, 2014 Just, try to reduce the amount of handlers, then you will be fine. Link to comment
Dealman Posted March 10, 2014 Share Posted March 10, 2014 It really depends on what you're gonna do using those events. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now