ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.68k stars 624 forks source link

Model dependencies are not precached, doesn't cache when put in .res files #1180

Open johndrinkwater opened 11 years ago

johndrinkwater commented 11 years ago

From https://github.com/ValveSoftware/steam-for-linux/issues/2520 by @ConnorMcLeod

Hello, On Counter-Strike 1.6, but should be the same on all goldsource games, models dependencies (extern textures _T.mdl or _t.mdl) (groups _01.mdl _02.mdl) are not precached by the engine (should be nice if it could be done when game dll sends pfnPrecacheModel), and it has never been the case. But before the update, put .mdl files pathes in .res files was effective.

This is a problem because lot of maps can't be run on server without an addon that force those models to precache.

ConnorMcLeod commented 11 years ago

I'm not sure this should be considerated as a feature request, because this was possible in .res file and has be broken with pfnPrecacheGeneric extension filtering (which is a good thing to have added). So, maps that were playable in the past can't be anymore, i see this more as a bug fix request with higher priority, anyway, your decision.

ConnorMcLeod commented 10 years ago

Any new after 6 monthes ?

SamVanheer commented 5 years ago

I created a simple res file for the map bounce with a model listed in it. Contents are as follows:

"models/hgrunt01.mdl"

The engine printed this:

Precaching from maps\bounce.res
----------------------------------
  models/hgrunt01.mdl
----------------------------------

The file is being added to the list of generic precaches, and as far as i can tell nothing prevents downloading of these files.

The model files are never referenced in a way that would depend on them being precached as models, the client loads sequence files here: https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/cl_dll/StudioModelRenderer.cpp#L362-L388

And in equivalent code in the engine. Texture files are loaded on demand by the renderer and are loaded as a separate model but don't depend on the resource list either.

This should be tested again to see if it still occurs. If so, the problem needs to be identified. Is the server refusing to upload the files, or is the client refusing to download them? Are they not being added to the generic precache list like they should be?