]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Adjust throwables hitboxes to match sprites (#38985)
authorSlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
Tue, 15 Jul 2025 00:51:14 +0000 (02:51 +0200)
committerGitHub <noreply@github.com>
Tue, 15 Jul 2025 00:51:14 +0000 (17:51 -0700)
Initial commit

Resources/Prototypes/Entities/Objects/Misc/pen.yml
Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml
Resources/Prototypes/Entities/Objects/Specific/chemistry.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/arrows.yml
Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml
Resources/Prototypes/Entities/Objects/Weapons/Melee/mining.yml
Resources/Prototypes/Entities/Objects/Weapons/Throwable/bola.yml
Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml
Resources/Prototypes/Entities/Objects/Weapons/Throwable/projectile_grenades.yml
Resources/Prototypes/Entities/Objects/Weapons/Throwable/scattering_grenades.yml

index bead4786b1fe77a65832f61d246a1097332e22ae..a9329b67829235d1644f6af82a7ebbf21f1b934d 100644 (file)
     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.
 
index 0a01e65eb9cb86a4085abb47386c4bc73c2d16da..35c9e51533cd693177c7fc8a1cde3c2dfc07fa42 100644 (file)
       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
   - type: EmbeddableProjectile
     sound: /Audio/Weapons/pop.ogg
     embedOnThrow: True
+    offset: "0,-0.1"
   - type: ThrowingAngle
     angle: 0
   - type: LandAtCursor
index 86214ca224d400b4decd9599904dc9553009de35..ebd785ab7e3028ffa6b27a332f32e1cd68c13c00 100644 (file)
     inHandsMaxFillLevels: 3
     inHandsFillBaseName: -fill-
   - type: EmbeddableProjectile
-    offset: "-0.1,0"
+    offset: "0,-0.1"
     minimumSpeed: 3
     removalTime: 0.25
     embedOnThrow: false
index 2c770adaa07dd702b7be6cd0b2d9e0662a600754..e9a0c6a38122e65ffbb12a51658cb1388b9255f7 100644 (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
index edab0e8a9401fb2a9f4f9e71352ca313a1954b4e..71e6d163820453accc4cc4462c6014b6a70143bd 100644 (file)
     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
     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
index 3ed57e0495ac584a14ed6093df68283aa7478ebb..cc09a5a37873a2056a7b5eafd2879257ed2e0547 100644 (file)
     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
index 7e4071b37ef9bf283ee70826f161bb576caae170..69f37004260eb9cb5415eac86e8d50e592c689c3 100644 (file)
     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
index fbc7bc74ea88ec763c0bbec5b0c92d5a74ce1758..4d65cc0806a76a12cd0d028ab55625a5844cc137 100644 (file)
   - 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
index b6e235292cc6c77ffdc7883b7c389a9a7567d1d2..bdd8370b104b000cc26e5258b24bbba486854500 100644 (file)
   - 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]
index 0fbc9e1694ed9d0bec90cd2c5b39f1e1df1fbe6b..9038df13e01b271c8de4a780a7b8a6ce50175ed2 100644 (file)
   - 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]