From 9825e264d574dd9e0415c337cc572b00890d40b2 Mon Sep 17 00:00:00 2001 From: zicodxx Date: Sun, 8 Apr 2012 16:59:50 +0200 Subject: [PATCH] plasma fire can ignite bombs which are dropped while firing. to compensate added a timed check where at least one projectile must be older than 200ms to trigger a possible collision. this fixes this issue if the player is moving away from the bomb --- CHANGELOG.txt | 1 + main/collide.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e0764d72b..b437a698d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ D1X-Rebirth Changelog 20120408 -------- main/mission.c, main/mission.h, main/titles.c: added specification for Descent: Destination Saturn briefing screen to properly show briefings; added different briefing structure for Descent 1 Shareware which has a slightly different order of the usual briefings +main/collide.c: plasma fire can ignite bombs which are dropped while firing. to compensate added a timed check where at least one projectile must be older than 200ms to trigger a possible collision. this fixes this issue if the player is moving away from the bomb 20120407 -------- diff --git a/main/collide.c b/main/collide.c index 708093d67..5f5f5da93 100644 --- a/main/collide.c +++ b/main/collide.c @@ -1439,7 +1439,9 @@ int maybe_detonate_weapon(object *weapon1, object *weapon2, vms_vector *collisio void collide_weapon_and_weapon( object * weapon1, object * weapon2, vms_vector *collision_point ) { if ((Weapon_info[weapon1->id].destroyable) || (Weapon_info[weapon2->id].destroyable)) { - + // shooting Plasma will make bombs explode one drops at the same time since hitboxes overlap. Small HACK to get around this issue. if the player moves away from the bomb at least... + if ((GameTime64 < weapon1->ctype.laser_info.creation_time + (F1_0/5)) && (GameTime64 < weapon2->ctype.laser_info.creation_time + (F1_0/5)) && (weapon1->ctype.laser_info.parent_num == weapon2->ctype.laser_info.parent_num)) + return; // Bug reported by Adam Q. Pletcher on September 9, 1994, smart bomb homing missiles were toasting each other. if ((weapon1->id == weapon2->id) && (weapon1->ctype.laser_info.parent_num == weapon2->ctype.laser_info.parent_num)) return;