![]() |
Using clientr, client, serverr, server vars wisely.
All of these vars need to be sent to the player on update serverside. This can create lag. Also, client and server vars being updated constantly clientside can create a lot of output to the server.
Alt+4 shows input/output bytes for the player. A few of the old reused damage functions on Classic have been updating constantly clientside, and there were a lot of variables being sent to the player from the serverside of the damage system. Variables that the player didn't need to have immediate access to. If the player doesn't need immediate access to a variable clientside, just set the variable as a player.var serverside. The variable will save in the flags when you set a player.var as a non-prefixed var. Hope people take some wisdom from this. Still need to work it out of the drunk movement system, but need to approach how. |
Non-prefixed variables in the flags are not able to be read clientside, are they?
|
Quote:
|
Quote:
|
Also, if you need data to be visible from one player's clientside to the rest, attr vars are the only way to do that. However, you can minimize the number of attr vars you have to modify by using bitflags (unless you need to send a string)
...Yea, now my damage system is doing a lot better. |
Quote:
|
Quote:
|
Quote:
You implied that server. varsare sent to the client, which is just wrong; they are only seen serverside. serverr. strings are sent to the clients, but as read-only. Your post also implied that server vars can be written to clientside, which is just plain wrong. |
Quote:
|
Quote:
|
Quote:
|
Hey give me some credit here for helping you figure all this out ;)
|
Quote:
You can also use client.vars to reduce lag instead of having to use triggeractions. |
Quote:
|
Quote:
|
All times are GMT +2. The time now is 09:03 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.