diff --git a/source_files/ddf/ddf_thing.cc b/source_files/ddf/ddf_thing.cc index a798429f0..83b8b5c2d 100644 --- a/source_files/ddf/ddf_thing.cc +++ b/source_files/ddf/ddf_thing.cc @@ -1560,6 +1560,7 @@ static DDFSpecialFlags extended_specials[] = {{"RESPAWN", kExtendedFlagNoRespawn {"USABLE", kExtendedFlagUsable, 0}, {"BLOCK_SHOTS", kExtendedFlagBlockShots, 0}, {"TUNNEL", kExtendedFlagTunnel, 0}, + {"BORE", (kExtendedFlagTunnel|kExtendedFlagBore), 0}, {"SIMPLE_ARMOUR", kExtendedFlagSimpleArmour, 0}, {nullptr, 0, 0}}; diff --git a/source_files/ddf/ddf_thing.h b/source_files/ddf/ddf_thing.h index 11430f240..9d0409184 100644 --- a/source_files/ddf/ddf_thing.h +++ b/source_files/ddf/ddf_thing.h @@ -174,7 +174,11 @@ enum ExtendedFlag kExtendedFlagCrouching = (1 << 25), // Missile can tunnel through enemies. -AJA- 2000/10/23 kExtendedFlagTunnel = (1 << 26), - // NO LONGER USED (1 << 27), // was: DLIGHT + // Missile tunnels through enemies, but damages each enemy for as long + // as it is in contact. This differs from the above in that TUNNEL + // only damages each mobj that it passes through once by keeping a simple + // hash list - Dasho + kExtendedFlagBore = (1 << 27), // Thing has been gibbed. kExtendedFlagGibbed = (1 << 28), // -AJA- 2004/07/22: play the monster sounds at full volume diff --git a/source_files/dehacked/deh_things.cc b/source_files/dehacked/deh_things.cc index 90cf2885e..c5a4b9f0c 100644 --- a/source_files/dehacked/deh_things.cc +++ b/source_files/dehacked/deh_things.cc @@ -757,7 +757,7 @@ const FlagName mbf21flag_list[] = { {kMBF21_RANGEHALF, "RANGEHALF", "TRIGGER_HAPPY"}, {kMBF21_NOTHRESHOLD, "NOTHRESHOLD", "NOGRUDGE"}, {kMBF21_BOSS, "BOSS", "BOSSMAN"}, - {kMBF21_RIP, "RIP", "TUNNEL"}, + {kMBF21_RIP, "RIP", "BORE"}, {kMBF21_FULLVOLSOUNDS, "FULLVOLSOUNDS", "ALWAYS_LOUD"}, // flags which don't produce an Edge special diff --git a/source_files/edge/p_action.cc b/source_files/edge/p_action.cc index 5195dd4f8..10a50bd6d 100644 --- a/source_files/edge/p_action.cc +++ b/source_files/edge/p_action.cc @@ -1790,14 +1790,18 @@ int MissileContact(MapObject *object, MapObject *target) // the first impact. if (object->extended_flags_ & kExtendedFlagTunnel) { - // this hash is very basic, but should work OK - uint32_t hash = (uint32_t)(long long)target; + // unless it uses the new BORE special - Dasho + if (!(object->extended_flags_ & kExtendedFlagBore)) + { + // this hash is very basic, but should work OK + uint32_t hash = (uint32_t)(long long)target; - if (object->tunnel_hash_[0] == hash || object->tunnel_hash_[1] == hash) - return -1; + if (object->tunnel_hash_[0] == hash || object->tunnel_hash_[1] == hash) + return -1; - object->tunnel_hash_[0] = object->tunnel_hash_[1]; - object->tunnel_hash_[1] = hash; + object->tunnel_hash_[0] = object->tunnel_hash_[1]; + object->tunnel_hash_[1] = hash; + } if (object->info_->rip_sound_) StartSoundEffect(object->info_->rip_sound_, kCategoryObject, object, 0); }