Am Freitag, 29. M�rz 2002 15:58 schrieb botman:
> > Just wondering, it seems so stupid, I mean, I could see why for the
> > client, it has to show the models, but for the server?! It doesn't
> > display the models or play the sounds?! Why does it need to load them?
>
> Precaching entities basically tells the engine (server side), "I am going
> to use these things at some point in my MOD".  The engine (server side) can
> then load these entities to verify that they exist and are valid (proper
> format, size, etc.).  When the client connects, the engine sends the client
> this list of precached entities (filenames).  All clients will receive the
> same list of precached entities and load these into memory so that they can
> be quickly displayed (or played in the event of sounds).  Clients will not
> successfully connect to the server if they don't have these same files
> available for precaching.

There is also the issue of ID numbers. Since it would be stupid to send an
entire string like "ambient/mortar5.wav" over the network when a sound plays,
an ID is sent instead. The precache is necessary to get consistent ID numbers
on client and server.

Theoretically it should be possible to precache on the fly, but it would get
really hairy because the network connections are basically unreliable (so the
play sound message could arrive before the associated precache message).

That's why you need to precache before players join.

cu,
Prefect
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to