Skip to content

Commit

Permalink
proper fix limbs destruction with organs drop like brain and eyes
Browse files Browse the repository at this point in the history
  • Loading branch information
TokenStyle committed Nov 23, 2024
1 parent 1d8ae69 commit d9aef8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
20 changes: 8 additions & 12 deletions Content.Shared/Body/Systems/SharedBodySystem.Body.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,20 +397,16 @@ public virtual HashSet<EntityUid> GibPart(

RemovePartChildren((partId, part), bodyEnt);

_gibbingSystem.TryGibEntityWithRef(partId,
partId,
GibType.Gib,
GibContentsOption.Drop,
ref gibs,
playAudio: true,
launchGibs: true,
launchDirection: splatDirection,
launchImpulse: GibletLaunchImpulse * splatModifier,
launchImpulseVariance: GibletLaunchImpulseVariance,
launchCone: splatCone);
// We have to iterate though every organ to drop it when part is being destroyed
foreach (var organ in GetPartOrgans(partId, part))
{
_gibbingSystem.TryGibEntityWithRef(bodyEnt, organ.Id, GibType.Drop, GibContentsOption.Skip,
ref gibs, playAudio: false, launchImpulse: GibletLaunchImpulse * splatModifier,
launchImpulseVariance: GibletLaunchImpulseVariance, launchCone: splatCone);
}
}

// Corvax-Next-Surgery
// Corvax-Next-Surgery
_gibbingSystem.TryGibEntityWithRef(partId, partId, GibType.Gib, GibContentsOption.Drop, ref gibs,
playAudio: true, launchGibs: true, launchDirection: splatDirection, launchImpulse: GibletLaunchImpulse * splatModifier,
launchImpulseVariance: GibletLaunchImpulseVariance, launchCone: splatCone);
Expand Down
6 changes: 3 additions & 3 deletions Resources/Prototypes/Body/Parts/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@
- trigger:
!type:DamageTypeTrigger
damageType: Blunt
damage: 150 # was 75 . TODO gettin dissapear if lower than dettach health
damage: 75
behaviors:
- !type:GibPartBehavior { }
- trigger:
!type:DamageTypeTrigger
damageType: Slash
damage: 200 # was 100 . TODO gettin dissapear if lower than dettach health
damage: 100
behaviors:
- !type:GibPartBehavior { }
- trigger:
!type:DamageTypeTrigger
damageType: Heat
damage: 400 # was 200 . TODO gettin dissapear if lower than dettach health
damage: 200
behaviors:
- !type:SpawnEntitiesBehavior
spawnInContainer: true
Expand Down

0 comments on commit d9aef8e

Please sign in to comment.