Skip to content

Commit d79c7b5

Browse files
authored
Corpses: Inherit bodygroups (#1809)
1 parent ec6340d commit d79c7b5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ All notable changes to TTT2 will be documented here. Inspired by [keep a changel
1111
- Fixed propspec not working (by @wgetJane)
1212
- Fixed a regression in TTT voice chat team colors (see <https://github.com/Facepunch/garrysmod/commit/38b7394ced29ffe318213e580efa4b1090828ac7>)
1313
- Fixed ghost viewmodels briefly appearing from weapons held by other players (by @TW1STaL1CKY)
14+
- Fixed corpses not inheriting the bodygroups from the players model (by @NickCloudAT)
1415

1516
## [v0.14.3b](https://github.com/TTT-2/TTT2/tree/v0.14.3b) (2025-03-18)
1617

gamemodes/terrortown/gamemode/server/sv_corpse.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,11 @@ function CORPSE.Create(ply, attacker, dmginfo, realPlayerCorpse)
527527
rag:SetAngles(ply:GetAngles())
528528
rag:SetColor(ply:GetColor())
529529

530+
-- Also add bodygroups to the corpse
531+
for k, v in pairs(ply:GetBodyGroups()) do
532+
rag:SetBodygroup(v.id, ply:GetBodygroup(v.id))
533+
end
534+
530535
rag:Spawn()
531536
rag:Activate()
532537

0 commit comments

Comments
 (0)