TTT2
TTT2 copied to clipboard
[Hotreload] Hotreload breaks shops
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
It seems to be more tricky then expected. Things I've learned so far:
- Recaching the materials on hotreload doesn't solve the issue. For items it works kind of (even though they are not buyable then), but weapons are stil not there
.materialof all weapons isnilAddEquipmentKeyValuesis not called on hotreload, it sets up the equipment
I tested this a lot as well and I think there was a problem in the TTT2RegisterSWEP part.
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
This here fixed the hotreload for weapon stats I remember: https://github.com/TTT-2/TTT2/commit/b72ae87d6b644280ec73d1f53506b9a5182da65a
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.