Client side is really dumb. There is not much to it:
- render world and view model
- render visible entities
- render temporary entites
- render dynamlic lights
- demo playback
- connects to a server and parses messages
- collecting input data and sends them
Original Quake has two states to track the client:
- connection state: disconnected, connecting, connected
- signon number: 1, 2, 3, 4
- server data received, client sends prespawn, server sends signon message (baseline, statics), going to 2
- server baseline received, client sends name, color and spawn, server sends stats and lightstyle, going to 3
- server marked client as spawned
- only used by client, set to 4 when the first entity updates have been received
- Host._Frame
- CL.ReadFromServer
- CL.GetMessage
- CL.ParseServerMessage
- parses entity updates
- handles Protocol.svc messages
- CL.RelinkEntities
- CL.UpdateTEnts
- CL.ReadFromServer
CL.Init CL.Connect(sock) CL.Disconnect()