Cataclysm-dda: Arrows detonate bullets

Created on 2 Jan 2020  路  2Comments  路  Source: CleverRaven/Cataclysm-DDA

Describe the bug

Bullets on ground get detonated by fired arrows (at least in certain circumstances, see below), presumably by thrown rocks as well

Steps To Reproduce

Have (well armored) NPC tank a group of Z's whilst PC shoots them with arrows, on occasion your tank will kill the Z you shoot at exactly as you fire resulting in arrow hitting ground(?) and - if there were any bullets there they will instantly detonate (flying projectile damages such and such ammo msg)

Expected behavior

Arrows not detonating bullets, actually (any) projectiles not detonating bullets - odds of hitting a primer of a bullet lying somewhere within a square meter with randomly fired arrow (especially one aimed at something humanoid standing there) should by astronomically low at best

Screenshots

Versions and configuration

Additional context

<Bug> Items / Item Actions / Item Qualities Ranged

Most helpful comment

I will say more. Arrows detonate arrows in current build.

All 2 comments

I will say more. Arrows detonate arrows in current build.

I can't see a way that this would trigger an explosion as written, but there is a possibility that some memory corruption or something is happening that makes this code:
https://github.com/CleverRaven/Cataclysm-DDA/blob/5d392c0d6b79c1ca5df1cb4c09549746c8a2bcde/src/ballistics.cpp#L427
trigger one.
Specifically it's possible something is writing to or corrupting the static custom_explosion field of the projectile.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

2birdie picture 2birdie  路  3Comments

BorkBorkGoesTheCode picture BorkBorkGoesTheCode  路  3Comments

Taberone picture Taberone  路  3Comments

natsirt721 picture natsirt721  路  3Comments

jeremyshannon picture jeremyshannon  路  3Comments