ZacharyHinds / ttt2-role-glutton

1 stars 4 forks source link

unknown role hunger bar not work after kill by glutton or ravenous #24

Open Racpy opened 6 months ago

Racpy commented 6 months ago

Unknown Role

I try to fixed this issue https://github.com/ZacharyHinds/ttt2-role-glutton/blob/a173107e505846d8ee2f639832a2d8de1f2742ce/lua/terrortown/autorun/shared/sh_glut_hunger.lua#L119

if (ply:GetSubRole() ~= ROLE_GLUTTON and ply:GetSubRole() ~= ROLE_RAVENOUS and ply:GetSubRole() ~= ROLE_UNKNOWN) then return end

https://github.com/ZacharyHinds/ttt2-role-glutton/blob/a173107e505846d8ee2f639832a2d8de1f2742ce/lua/terrortown/entities/roles/glutton/shared.lua#L107

if ply:GetSubRole() ~= ROLE_GLUTTON and ply:GetSubRole() ~= ROLE_RAVENOUS and ply:GetSubRole() ~= ROLE_UNKNOWN then return end

It seems to be ok, I don’t know if there is a better solution