Xonotic Forums

Full Version: What are CSQC players?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I keep seeing the phrase "CSQC players" around the forums. I know CSQC stands for Client Side Quake Code (I think), but beyond that I know nothing Sad

Could someone explain to this newbie programmer what it is, and why it's important/useful?
A CSQC entity is a game object that is managed on the client's side.

Nexuiz 2.3 made no use of CSQC, and everything was managed by the server and sent to its clients. Later, some entity stuff got moved to CSQC - for instance, projectiles and gibs.

That means for example that when a gib or a rocket is spawned, the server tells the client basic information about it (in the case of a rocket, direction for example) and the client does the rest. It knows how fast the rocket should be going (the server told it) and therefore knows where the rocket will be at any time. When the rocket is remotely guided, the server regularly sends updates to the client which then updates its rocket entity to have it display correctly.

"CSQC players" means that player entities are partially managed by CSQC, which means CSQC code can access data such as the positions of teammates, and use it to display waypoints appropriately.
Thanks for the info Smile

But am I right to think that CSQC players have more applications than to display waypoints? Because that's the impression I got on a couple of threads here.
Sure, they could be used to display health info on the HUD, or manipulating any information associated with a player entity in general.