From f38a322912dcd9edb72f8d4a9449dc3143970eb6 Mon Sep 17 00:00:00 2001 From: rlebell33 Date: Sat, 22 Nov 2025 13:13:35 -0600 Subject: [PATCH] Improve hitboxes for knives and shivs to better match their sprites (#39100) * update hitbox for kitchen knife and butcher's cleaver * update hitbox for the 4 glass type shivs * update hitbox for the medical shiv * Update the hitbox for the plastic knife * review --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> --- .../Entities/Objects/Misc/utensils.yml | 11 +++++ .../Objects/Specific/Medical/surgery.yml | 11 +++++ .../Entities/Objects/Weapons/Melee/knife.yml | 43 ++++++++++++++++++- 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/Resources/Prototypes/Entities/Objects/Misc/utensils.yml b/Resources/Prototypes/Entities/Objects/Misc/utensils.yml index e735b2dcdd..9c9156ec50 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/utensils.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/utensils.yml @@ -130,6 +130,17 @@ - Plastic - Trash - Knife + - type: Fixtures + fixtures: + fix1: + shape: !type:PhysShapeAabb + bounds: "-0.1,-0.375,0.1,0.375" + density: 20 # derived from base_item + mask: + - ItemMask + restitution: 0.3 + friction: 0.2 + - type: entity parent: UtensilBase diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml index 482809dd61..79fb907a7c 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml @@ -101,6 +101,17 @@ state: shiv - type: Item heldPrefix: shiv + - type: Fixtures + fixtures: + fix1: + shape: !type:PhysShapeAabb + bounds: "-0.375,-0.15,0.35,0.12" + density: 20 # derived from base_item + mask: + - ItemMask + restitution: 0.3 + friction: 0.2 + - type: entity name: advanced scalpel diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml index bd20659696..0311cabf8f 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml @@ -49,6 +49,20 @@ guides: - Chef - FoodRecipes + - type: Fixtures + fixtures: + fix1: + shape: !type:PolygonShape + vertices: + - -0.475,-0.225 + - -0.225,-0.475 + - 0.525,0.275 + - 0.275,0.525 + density: 20 # derived from base_item + mask: + - ItemMask + restitution: 0.3 + friction: 0.2 - type: entity name: butcher's cleaver @@ -76,6 +90,20 @@ guides: - Chef - FoodRecipes + - type: Fixtures + fixtures: + fix1: + shape: !type:PolygonShape + vertices: + - -0.58,-0.12 + - -0.34,-0.55 + - 0.6,-0.075 + - 0.375,0.375 + density: 20 # derived from base_item + mask: + - ItemMask + restitution: 0.3 + friction: 0.2 - type: entity name: combat knife @@ -117,7 +145,6 @@ fixtures: fix1: shape: !type:PolygonShape - radius: 0.01 vertices: - -0.4,-0.2 - -0.2,-0.4 @@ -227,6 +254,20 @@ sprite: Objects/Weapons/Melee/shiv.rsi - type: DisarmMalus malus: 0.225 + - type: Fixtures + fixtures: + fix1: + shape: !type:PolygonShape + vertices: + - -0.365,-0.265 + - 0.077,-0.45 + - 0.364,0.323 + - -0.0735,0.49 + density: 20 # derived from base_item + mask: + - ItemMask + restitution: 0.3 + friction: 0.2 - type: entity name: reinforced shiv