Facepunch / sbox-issues

175 stars 12 forks source link

Overlapping asset names will override each other depending on which game you load into first #2618

Closed ShadowBrian closed 1 year ago

ShadowBrian commented 1 year ago

Describe the bug

Whenever I play my game called Bat Golf and then play Tennis Golf which is a fork of that game, I'll get the incorrect models loading in from the first game I play.

To Reproduce

Start Bat Golf. Quit Bat Golf. Start Tennis Golf. Observe Bat model and Baseball model instead of Tennis racket and Tennis ball.

Expected behavior

I'd expect it to know when a new addon tries to load a model that's already been loaded, and for it to load the correct new one rather than keep the old one loaded in.

Media/Files

No response

Additional context

These are VR titles so I suppose you'll need VR hooked up to see the reproduction, but I'm sure many other addons will suffer from a similar issue in the future. Figured I'd make an issue now since my reproduction and case of the bug is going to become commonplace once forks of games are more common.

Note that this likely also counts for any other files in an addon, textures, sounds etc.

Remscar commented 1 year ago

There is also some really funky behavior if the assets have the same name and content as well.

handsomematt commented 1 year ago

This should work fine when playing from asset.party now.