Adjust throwables hitboxes to match sprites (#38985)

Initial commit
This commit is contained in:
SlamBamActionman
2025-07-15 02:51:14 +02:00
committed by GitHub
parent 3122adbd34
commit f8322d548e
10 changed files with 103 additions and 3 deletions

View File

@@ -42,6 +42,20 @@
damage:
types:
Piercing: 3
- type: Fixtures
fixtures:
fix1:
shape: !type:PolygonShape
vertices:
- -0.3,0.1
- -0.1,0.3
- 0.3,-0.1
- 0.1,-0.3
density: 20 # derived from base_item
mask:
- ItemMask
restitution: 0.3
friction: 0.2
#TODO: I want the luxury pen to write a cool font like Merriweather in the future.

View File

@@ -240,7 +240,7 @@
projectile:
shape:
!type:PhysShapeAabb
bounds: "-0.1,-0.1,0.1,0.1"
bounds: "-0.2,-0.4,0.2,-0.1"
hard: false
mask:
- Impassable
@@ -248,6 +248,7 @@
- type: EmbeddableProjectile
sound: /Audio/Weapons/pop.ogg
embedOnThrow: True
offset: "0,-0.1"
- type: ThrowingAngle
angle: 0
- type: LandAtCursor

View File

@@ -473,7 +473,7 @@
inHandsMaxFillLevels: 3
inHandsFillBaseName: -fill-
- type: EmbeddableProjectile
offset: "-0.1,0"
offset: "0,-0.1"
minimumSpeed: 3
removalTime: 0.25
embedOnThrow: false

View File

@@ -20,7 +20,7 @@
projectile:
shape:
!type:PhysShapeAabb
bounds: "-0.1,-0.1,0.1,0.1"
bounds: "-0.1,-0.3,0.1,-0.1"
hard: false
mask:
- Impassable

View File

@@ -111,6 +111,21 @@
malus: 0.225
- type: ThrowingAngle
angle: 225
- type: Fixtures
fixtures:
fix1:
shape: !type:PolygonShape
radius: 0.01
vertices:
- -0.4,-0.2
- -0.2,-0.4
- 0.4,0.2
- 0.2,0.4
density: 20 # derived from base_item
mask:
- ItemMask
restitution: 0.3
friction: 0.2
- type: entity
name: survival knife
@@ -304,3 +319,18 @@
angle: 225
- type: StaticPrice
price: 500 # 2000 for a set of 4
- type: Fixtures
fixtures:
fix1:
shape: !type:PolygonShape
radius: 0.01
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

View File

@@ -195,6 +195,21 @@
malus: 0.225
- type: ThrowingAngle
angle: 225
- type: Fixtures
fixtures:
fix1:
shape: !type:PolygonShape
radius: 0.01
vertices:
- -0.4,-0.2
- -0.2,-0.4
- 0.4,0.2
- 0.2,0.4
density: 20 # derived from base_item
mask:
- ItemMask
restitution: 0.3
friction: 0.2
# Less mark damage in exchange for more healing. Also has a better ratio of blunt to slash damage, but less structural.
- type: entity

View File

@@ -49,3 +49,13 @@
canMoveBreakout: true
maxEnsnares: 1
- type: LandAtCursor
- type: Fixtures
fixtures:
fix1:
shape: !type:PhysShapeCircle
radius: 0.4
density: 20 # derived from base_item
mask:
- ItemMask
restitution: 0.3
friction: 0.2

View File

@@ -38,6 +38,16 @@
- type: Tag
tags:
- HandGrenade
- type: Fixtures
fixtures:
fix1:
shape: !type:PhysShapeCircle
radius: 0.2
density: 20 # derived from base_item
mask:
- ItemMask
restitution: 0.3
friction: 0.2
- type: entity
name: explosive grenade

View File

@@ -28,6 +28,16 @@
- type: Tag
tags:
- HandGrenade
- type: Fixtures
fixtures:
fix1:
shape: !type:PhysShapeCircle
radius: 0.2
density: 20 # derived from base_item
mask:
- ItemMask
restitution: 0.3
friction: 0.2
- type: entity
parent: [ProjectileGrenadeBase, BaseSecurityContraband]

View File

@@ -23,6 +23,16 @@
- type: Tag
tags:
- HandGrenade
- type: Fixtures
fixtures:
fix1:
shape: !type:PhysShapeCircle
radius: 0.2
density: 20 # derived from base_item
mask:
- ItemMask
restitution: 0.3
friction: 0.2
- type: entity
parent: [ScatteringGrenadeBase, BaseSecurityContraband]