diff --git a/.luacheckrc b/.luacheckrc index 5f2e2a49a..42e441da0 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -133,6 +133,7 @@ globals = { "ACT_GMOD_GESTURE_WAVE", "ACT_GMOD_IN_CHAT", "ACT_GMOD_TAUNT_CHEER", + "ACT_GMOD_TAUNT_DANCE", "ACT_MP_ATTACK_CROUCH_PRIMARYFIRE", "ACT_MP_ATTACK_STAND_PRIMARYFIRE", "ACT_MP_STAND_IDLE", diff --git a/CONVARS.md b/CONVARS.md index 24d58d587..8c1808274 100644 --- a/CONVARS.md +++ b/CONVARS.md @@ -1336,6 +1336,8 @@ ttt_scoreboard_score 0 // Whether to show the sc ttt_round_summary_tabs summary,hilite,events,scores // The tabs to show in the round summary screen. Changing the order of the values will change the order of the tabs. Excluding a value from the comma-delimited list will prevent that tab from showing. Invalid values will be ignored. Round must be restarted for changes to take effect // Misc. +ttt_disable_headshots 0 // Whether to disable the headshot damage multiplier +ttt_disable_mapwin 0 // Whether to disable the ability for maps to set the round winner directly ttt_death_notifier_enabled 1 // Whether the name and role of a player's killer should be shown to the victim ttt_death_notifier_show_role 1 // Whether to show the killer's role in death notification messages ttt_death_notifier_show_team 0 // Whether to show the killer's team in death notification messages (only used when "ttt_death_notifier_show_role" is disabled) diff --git a/RELEASE.md b/RELEASE.md index 4a19fbbcc..ffd0543b2 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -21,6 +21,7 @@ - Fixed jester, detective, innocent, and traitor role rename ConVars not working - Fixed error in Cannibal's role weapon HUD when weapon was selected from last round (Thanks Stig!) - Fixed detective hats not hiding when the owning player was eaten by the Cannibal +- Fixed Loot Goblin not being able to drop some weapons that were droppable - Ported "Add check for checking weapon GetHeadshotMultiplier" ### Developer diff --git a/docs/tutorials/configuring_convars.html b/docs/tutorials/configuring_convars.html index 86e9f649d..bbdb7a2b1 100644 --- a/docs/tutorials/configuring_convars.html +++ b/docs/tutorials/configuring_convars.html @@ -381,6 +381,18 @@

Miscellaneous ConVars

Boolean Whether to show the killer's team in death notification messages. (Only used when ttt_death_notifier_show_role is disabled.) + + ttt_disable_headshots + 0 + Boolean + Whether to disable the headshot damage multiplier. + + + ttt_disable_mapwin + 0 + Boolean + Whether to disable the ability for maps to set the round winner directly. + ttt_smokegrenade_extinguish 1 diff --git a/gamemodes/terrortown/gamemode/roles/lootgoblin/lootgoblin.lua b/gamemodes/terrortown/gamemode/roles/lootgoblin/lootgoblin.lua index 991419cde..ae0efccb1 100644 --- a/gamemodes/terrortown/gamemode/roles/lootgoblin/lootgoblin.lua +++ b/gamemodes/terrortown/gamemode/roles/lootgoblin/lootgoblin.lua @@ -233,10 +233,16 @@ local function StartGoblinTimers() local wep = nil -- Loop in here so we get a different weapon for each loot goblin (if there are multiple) for _, v in RandomPairs(weps) do - if v and not v.AutoSpawnable and v.CanBuy and #v.CanBuy > 0 and v.AllowDrop then - wep = WEPS.GetClass(v) - break - end + if not v then continue end + + -- Only allow weapons that can be bought, can be dropped, and don't spawn on their own + -- Specifically check AllowDrop for `false` because weapons in this list don't have the base table + -- applied and the base table has AllowDrop defaulting to `true` + if v.AutoSpawnable or v.AllowDrop == false then continue end + if not v.CanBuy or #v.CanBuy == 0 then continue end + + wep = WEPS.GetClass(v) + break end -- Sanity check @@ -344,9 +350,15 @@ hook.Add("PlayerDeath", "LootGoblin_PlayerDeath", function(victim, infl, attacke timer.Create("LootGoblinWeaponDrop", 0.05, lootgoblin_weapons_dropped:GetInt(), function() if #lootTable == 0 then -- Rebuild the loot table if we run out for _, v in ipairs(weapons.GetList()) do - if v and not v.AutoSpawnable and v.CanBuy and #v.CanBuy > 0 and v.AllowDrop then - table.insert(lootTable, WEPS.GetClass(v)) - end + if not v then continue end + + -- Only allow weapons that can be bought, can be dropped, and don't spawn on their own + -- Specifically check AllowDrop for `false` because weapons in this list don't have the base table + -- applied and the base table has AllowDrop defaulting to `true` + if v.AutoSpawnable or v.AllowDrop == false then continue end + if not v.CanBuy or #v.CanBuy == 0 then continue end + + table.insert(lootTable, WEPS.GetClass(v)) end end