]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Improve hitboxes for knives and shivs to better match their sprites (#39100)
authorrlebell33 <rlebell33@gmail.com>
Sat, 22 Nov 2025 19:13:35 +0000 (13:13 -0600)
committerGitHub <noreply@github.com>
Sat, 22 Nov 2025 19:13:35 +0000 (19:13 +0000)
* 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>
Resources/Prototypes/Entities/Objects/Misc/utensils.yml
Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml
Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml

index e735b2dcddce97bc2f91fb33623d4a4191416dba..9c9156ec504d153fdac7149f41b8bc6b941d8d7e 100644 (file)
     - 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
index 482809dd61c6399b6be0fdbc3593a5957e3c443a..79fb907a7c374d5ab8fb538de966b5c9a1f0b250 100644 (file)
     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
index bd206596960e8687971ef1b523421b1521d0ec41..0311cabf8f4baec27a5ca6394a0a71dab8db00ac 100644 (file)
     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
     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
     fixtures:
       fix1:
         shape: !type:PolygonShape
-          radius: 0.01
           vertices:
           - -0.4,-0.2
           - -0.2,-0.4
     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