Skip to content

Duke3D: Failed tripbomb placements no longer consume ammo (accurate to Duke 1.5)

Dino Bollinger requested to merge dibollinger/eduke32:316_tripbomb_fix into master

In DOS Duke 1.5, the tripbomb not consume any ammo if the animation plays but the placement fails. Currently, eduke32 does however.

I suspect this was caused by a very, very early refactoring in eduke32 (prior to 2004!) where the ammo subtraction was moved out of this code into another location.

Original logic can be seen here: https://github.com/videogamepreservation/dukenukem3d/blob/ef609159bd352985a0c63734a11241d86c873fe5/source/PLAYER.C#L959

With this change, if the sprite cannot be placed, the player's ammo is refunded, to counteract the subtraction that occurs elsewhere. Probably the least likely to break other functionality.

Merge request reports

Loading