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

Damagelogs additional roles. #58

Closed dok441 closed 6 years ago

dok441 commented 6 years ago

Can you make "Damagelog.ULX_Autoslay_ForceRole" function in Damagelogs to work properly? It doesn't work properly with new roles. It is very sad to see when some active role dies because of RDM. Currently if this function is enabled, all new roles will disappear or will not work properly.

iViscosity commented 6 years ago

I've created a solution to this.

As for

Currently if this function is enabled, all new roles will disappear or will not work properly.

This is due to how Tommy implements the ForceRole feature. Basically, he overwrites the SelectRoles() function to prevent people from being selected as Special roles (Traitor/Detective) if they have autoslays. This is done in an Initialize hook, meaning after the Gamemode (TTT2) is done loading. In other words, when SelectRoles() is called, it's calling Tommy's version which, obviously, doesn't include custom roles.

My solution requires you removing from this line down.

dok441 commented 6 years ago

22 Не работает.

dok441 commented 6 years ago

Так же это отключает возрождения шута и неизвестного. Если их убьют.

SchokoShampoo commented 6 years ago

Will be fixed with #116