Skip to content

Commit f38a322

Browse files
Improve hitboxes for knives and shivs to better match their sprites (space-wizards#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>
1 parent 7672076 commit f38a322

3 files changed

Lines changed: 64 additions & 1 deletion

File tree

Resources/Prototypes/Entities/Objects/Misc/utensils.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,17 @@
130130
- Plastic
131131
- Trash
132132
- Knife
133+
- type: Fixtures
134+
fixtures:
135+
fix1:
136+
shape: !type:PhysShapeAabb
137+
bounds: "-0.1,-0.375,0.1,0.375"
138+
density: 20 # derived from base_item
139+
mask:
140+
- ItemMask
141+
restitution: 0.3
142+
friction: 0.2
143+
133144

134145
- type: entity
135146
parent: UtensilBase

Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,17 @@
101101
state: shiv
102102
- type: Item
103103
heldPrefix: shiv
104+
- type: Fixtures
105+
fixtures:
106+
fix1:
107+
shape: !type:PhysShapeAabb
108+
bounds: "-0.375,-0.15,0.35,0.12"
109+
density: 20 # derived from base_item
110+
mask:
111+
- ItemMask
112+
restitution: 0.3
113+
friction: 0.2
114+
104115

105116
- type: entity
106117
name: advanced scalpel

Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,20 @@
4949
guides:
5050
- Chef
5151
- FoodRecipes
52+
- type: Fixtures
53+
fixtures:
54+
fix1:
55+
shape: !type:PolygonShape
56+
vertices:
57+
- -0.475,-0.225
58+
- -0.225,-0.475
59+
- 0.525,0.275
60+
- 0.275,0.525
61+
density: 20 # derived from base_item
62+
mask:
63+
- ItemMask
64+
restitution: 0.3
65+
friction: 0.2
5266

5367
- type: entity
5468
name: butcher's cleaver
@@ -76,6 +90,20 @@
7690
guides:
7791
- Chef
7892
- FoodRecipes
93+
- type: Fixtures
94+
fixtures:
95+
fix1:
96+
shape: !type:PolygonShape
97+
vertices:
98+
- -0.58,-0.12
99+
- -0.34,-0.55
100+
- 0.6,-0.075
101+
- 0.375,0.375
102+
density: 20 # derived from base_item
103+
mask:
104+
- ItemMask
105+
restitution: 0.3
106+
friction: 0.2
79107

80108
- type: entity
81109
name: combat knife
@@ -117,7 +145,6 @@
117145
fixtures:
118146
fix1:
119147
shape: !type:PolygonShape
120-
radius: 0.01
121148
vertices:
122149
- -0.4,-0.2
123150
- -0.2,-0.4
@@ -227,6 +254,20 @@
227254
sprite: Objects/Weapons/Melee/shiv.rsi
228255
- type: DisarmMalus
229256
malus: 0.225
257+
- type: Fixtures
258+
fixtures:
259+
fix1:
260+
shape: !type:PolygonShape
261+
vertices:
262+
- -0.365,-0.265
263+
- 0.077,-0.45
264+
- 0.364,0.323
265+
- -0.0735,0.49
266+
density: 20 # derived from base_item
267+
mask:
268+
- ItemMask
269+
restitution: 0.3
270+
friction: 0.2
230271

231272
- type: entity
232273
name: reinforced shiv

0 commit comments

Comments
 (0)