roflmuffin / CounterStrikeSharp

CounterStrikeSharp allows you to write server plugins in C# for Counter-Strike 2/Source2/CS2
https://docs.cssharp.dev
Other
806 stars 129 forks source link

Server.PrecacheModel does not take effect (?) #341

Open ELDment opened 8 months ago

ELDment commented 8 months ago

I have tested this API on Linux and Windows platforms, but it cannot precache my model as expected (the proof is when I use "CBaseModelEntity.SetModel()", the system prompts the model file cannot be found.) Ps.

roflmuffin commented 8 months ago

Precaching has changed significantly since CSGO, which is what these precache methods are based on, so it's possible they don't work.

More work needs to be done to support this natively, Killstreak has done a plugin for custom resources: https://github.com/KillStr3aK/ResourcePrecacher

samyycX commented 8 months ago

Precaching has changed significantly since CSGO, which is what these precache methods are based on, so it's possible they don't work.

More work needs to be done to support this natively, Killstreak has done a plugin for custom resources: https://github.com/KillStr3aK/ResourcePrecacher

Will this plugin be embedded into counterstrikesharp in the future?

roflmuffin commented 8 months ago

Precaching has changed significantly since CSGO, which is what these precache methods are based on, so it's possible they don't work. More work needs to be done to support this natively, Killstreak has done a plugin for custom resources: https://github.com/KillStr3aK/ResourcePrecacher

Will this plugin be embedded into counterstrikesharp in the future?

The plugin won't be, but a method to do what this plugin does within your own plugin would be.

KillStr3aK commented 8 months ago

We could implement a custom gamesystem to ensure resource precaching

KillStr3aK commented 8 months ago

358