TTT-2 / TTT2

Trouble in Terrorist Town 2 for Garry's Mod (gmod)
https://steamcommunity.com/sharedfiles/filedetails/?id=1357204556
179 stars 77 forks source link

[Hotreload] Hotreload breaks shops #1091

Open TimGoll opened 1 year ago

TimGoll commented 1 year ago

Shops with standard items (not with manually selected items) are broken after hotreload. This is because the functions has to be called after a hotreload: https://github.com/TTT-2/TTT2/blob/master/gamemodes/terrortown/gamemode/client/cl_equip.lua#L1117-L1130

TimGoll commented 1 year ago

It seems to be more tricky then expected. Things I've learned so far:

ZenBre4ker commented 1 year ago

I tested this a lot as well and I think there was a problem in the TTT2RegisterSWEP part.

TimGoll commented 1 year ago

I tested this a lot as well and I think there was a problem in the TTT2RegisterSWEP part.

yes, but it is hard to debug because all these functions seem to be called all over the place

ZenBre4ker commented 1 year ago

This here fixed the hotreload for weapon stats I remember: https://github.com/TTT-2/TTT2/commit/b72ae87d6b644280ec73d1f53506b9a5182da65a

stale[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.