From 414c59c6ba9e29a54e8561465d2f18589cada76b Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 4 Apr 2021 22:01:25 +0000 Subject: [PATCH] Enable backtick-based segment reporting in D1 This is a developer feature that is useful in D2. Backport it to D1. --- similar/main/collide.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/similar/main/collide.cpp b/similar/main/collide.cpp index 6a0c8dd75..ac0ef2523 100644 --- a/similar/main/collide.cpp +++ b/similar/main/collide.cpp @@ -780,24 +780,21 @@ static window_event_result collide_weapon_and_wall( multi_digi_link_sound_to_pos(SOUND_FORCEFIELD_BOUNCE_WEAPON, hitseg, 0, hitpt, 0, f1_0); return window_event_result::ignored; //bail here. physics code will bounce this object } +#endif #ifndef NDEBUG if (keyd_pressed[KEY_LAPOSTRO]) if (weapon->ctype.laser_info.parent_num == get_local_player().objnum) { // MK: Real pain when you need to know a seg:side and you've got quad lasers. HUD_init_message(HM_DEFAULT, "Hit at segment = %hu, side = %i", static_cast(hitseg), hitwall); +#if defined(DXX_BUILD_DESCENT_II) if (get_weapon_id(weapon) < 4) subtract_light(LevelSharedDestructibleLightState, hitseg, hitwall); else if (get_weapon_id(weapon) == weapon_id_type::FLARE_ID) add_light(LevelSharedDestructibleLightState, hitseg, hitwall); - } - - //@@#ifdef EDITOR - //@@Cursegp = &Segments[hitseg]; - //@@Curside = hitwall; - //@@#endif - #endif #endif + } + #endif if ((weapon->mtype.phys_info.velocity.x == 0) && (weapon->mtype.phys_info.velocity.y == 0) && (weapon->mtype.phys_info.velocity.z == 0)) { Int3(); // Contact Matt: This is impossible. A weapon with 0 velocity hit a wall, which doesn't move.