Skip to content

Commit 19180de

Browse files
author
dashodanger
committed
Add DDF BORE special; map MBF21 ripper behvaior to BORE instead of TUNNEL
1 parent 368e4fa commit 19180de

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

source_files/ddf/ddf_thing.cc

+1
Original file line numberDiff line numberDiff line change
@@ -1560,6 +1560,7 @@ static DDFSpecialFlags extended_specials[] = {{"RESPAWN", kExtendedFlagNoRespawn
15601560
{"USABLE", kExtendedFlagUsable, 0},
15611561
{"BLOCK_SHOTS", kExtendedFlagBlockShots, 0},
15621562
{"TUNNEL", kExtendedFlagTunnel, 0},
1563+
{"BORE", (kExtendedFlagTunnel|kExtendedFlagBore), 0},
15631564
{"SIMPLE_ARMOUR", kExtendedFlagSimpleArmour, 0},
15641565
{nullptr, 0, 0}};
15651566

source_files/ddf/ddf_thing.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,11 @@ enum ExtendedFlag
174174
kExtendedFlagCrouching = (1 << 25),
175175
// Missile can tunnel through enemies. -AJA- 2000/10/23
176176
kExtendedFlagTunnel = (1 << 26),
177-
// NO LONGER USED (1 << 27), // was: DLIGHT
177+
// Missile tunnels through enemies, but damages each enemy for as long
178+
// as it is in contact. This differs from the above in that TUNNEL
179+
// only damages each mobj that it passes through once by keeping a simple
180+
// hash list - Dasho
181+
kExtendedFlagBore = (1 << 27),
178182
// Thing has been gibbed.
179183
kExtendedFlagGibbed = (1 << 28),
180184
// -AJA- 2004/07/22: play the monster sounds at full volume

source_files/dehacked/deh_things.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ const FlagName mbf21flag_list[] = {
757757
{kMBF21_RANGEHALF, "RANGEHALF", "TRIGGER_HAPPY"},
758758
{kMBF21_NOTHRESHOLD, "NOTHRESHOLD", "NOGRUDGE"},
759759
{kMBF21_BOSS, "BOSS", "BOSSMAN"},
760-
{kMBF21_RIP, "RIP", "TUNNEL"},
760+
{kMBF21_RIP, "RIP", "BORE"},
761761
{kMBF21_FULLVOLSOUNDS, "FULLVOLSOUNDS", "ALWAYS_LOUD"},
762762

763763
// flags which don't produce an Edge special

source_files/edge/p_action.cc

+10-6
Original file line numberDiff line numberDiff line change
@@ -1790,14 +1790,18 @@ int MissileContact(MapObject *object, MapObject *target)
17901790
// the first impact.
17911791
if (object->extended_flags_ & kExtendedFlagTunnel)
17921792
{
1793-
// this hash is very basic, but should work OK
1794-
uint32_t hash = (uint32_t)(long long)target;
1793+
// unless it uses the new BORE special - Dasho
1794+
if (!(object->extended_flags_ & kExtendedFlagBore))
1795+
{
1796+
// this hash is very basic, but should work OK
1797+
uint32_t hash = (uint32_t)(long long)target;
17951798

1796-
if (object->tunnel_hash_[0] == hash || object->tunnel_hash_[1] == hash)
1797-
return -1;
1799+
if (object->tunnel_hash_[0] == hash || object->tunnel_hash_[1] == hash)
1800+
return -1;
17981801

1799-
object->tunnel_hash_[0] = object->tunnel_hash_[1];
1800-
object->tunnel_hash_[1] = hash;
1802+
object->tunnel_hash_[0] = object->tunnel_hash_[1];
1803+
object->tunnel_hash_[1] = hash;
1804+
}
18011805
if (object->info_->rip_sound_)
18021806
StartSoundEffect(object->info_->rip_sound_, kCategoryObject, object, 0);
18031807
}

0 commit comments

Comments
 (0)