TTT-2 / TTT2

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

Buyable items slots are broken #644

Closed charrllie closed 4 years ago

charrllie commented 4 years ago

Your version of TTT2 (mandatory)

0.7.2 (github/workshop) / 0.7.3 (workshop)

Describe the bug (mandatory)

Hey there! During a test of my TTT2 server one of my admins has noticed a very strange and easy to overlook bug. Almost all buyable items slots are fixed to "slot 7". You can buy multiple items without the slot limit.

First I thought that it is a bug related to my personal changes in a code, but it seems to be a bug in gamemode itself.

I've:

Pics: https://imgur.com/a/LFjMv45

Video from other server (play at timestamp): https://youtu.be/uYtjjegDavk?t=1237

Steps to reproduce the behaviour:

TimGoll commented 4 years ago

I think slot 7 has by default an infinite amount of slots for weapons. Or was it slot 8? Since this is something UI related, it is something that should be adressed in our upcoming UI rework!

Thanks for the detailed bugreport btw.

charrllie commented 4 years ago

Thanks for the quick response! I've just double checked, indeed a lot of items are assigned to the "slot 7" by default, so I explicitly tested items assigned to some other slot. Both C4 and silenced pistol are assigned to slot 6, I am able to buy them both at once. I moved them to slot 1 - same.

It looks like slot is forced to 7 no matter what I set in a lua file. I also checked to be sure - they are not overwritten by TTT2 gamemode.

I've checked default TTT (disabled TTT2) - slots are working correctly, I am not able to carry both weapons at once. Considering the fact that slots are assigned in client-side code it might be UI related bug but it breaks the game a bit. bug_v2

TimGoll commented 4 years ago

The slot is irrelevant in TTT2, the wapon type defines the slot

Ref: https://docs.ttt2.neoxult.de/developers/content-creation/creating-a-weapon/#important-swep-values

charrllie commented 4 years ago

Ohhhh that explains why grenades work fine. Big thanks!

TimGoll commented 4 years ago

So, I'm not 100% sure if your report is still a bug. Is there something that doesn't work?

charrllie commented 4 years ago

I've checked, I am unable to buy/carry more than 1 buyable grenade, so yes report is not a bug after all. I guess I'll just have to change SWEP.KIND for some of buyable items. Thank You once again for Your time, sorry for false alarm.

TimGoll commented 4 years ago

Sounds great, so no bug after all! :D

A small tip for you: Check out the "TTT2 Inventory" tab in ulx to change the amount of carried weapons per slot