Skip to content

Commit

Permalink
Fixed All games: "General: Mobjs overlapping more than one sector". (…
Browse files Browse the repository at this point in the history
…see here http://sourceforge.net/tracker/?func=detail&aid=2855894&group_id=74815&atid=542099)

Revised the fix applied in beta6.6 for the "Bullets not visible in map cheat" issue. Although we now want all mobjs added to the blockmap it is not correct that all mobjs with MF_SOLID are considered so everywhere. This means that we still need the MF_NOBLOCKMAP flag as it defines slightly different behaviour compared to !MF_SOLID. We still ignore the MF_NOBLOCKMAP flag as far as linking goes however it is now checked for in the iteration methods which were previously sensitive to this (namely, PIT_ChangeSector).

Ensure you exectute packres.py as the Thing and Flag definitions have changed.
  • Loading branch information
danij-deng committed Apr 4, 2010
1 parent e9e2fb1 commit 4c32b9d
Show file tree
Hide file tree
Showing 15 changed files with 392 additions and 377 deletions.
4 changes: 4 additions & 0 deletions doomsday/plugins/common/src/p_map.c
Expand Up @@ -2621,6 +2621,10 @@ void P_SlideMove(mobj_t* mo)
boolean PIT_ChangeSector(mobj_t* thing, void* data)
{
mobj_t* mo;

// Don't check things that aren't blocklinked (supposedly immaterial).
if(thing->info->flags & MF_NOBLOCKMAP)
return true;

if(P_ThingHeightClip(thing))
return true; // Keep checking...
Expand Down
6 changes: 0 additions & 6 deletions doomsday/plugins/dehread/src/dehmain.c
Expand Up @@ -1406,12 +1406,6 @@ int PatchThing(int thingy)

if(vchanged)
{
if(value & 0x10) // Old MF_NOBLOCKMAP
{
// Ensure vanilla compatibility; clear incompatible flags.
value &= ~(0x2 /*=MF_SOLID*/| 0x4 /*=MF_SHOOTABLE*/);
}

info->flags[0] = value;

if(value & 0x100) // Spawnceiling?
Expand Down
6 changes: 1 addition & 5 deletions doomsday/plugins/jdoom/defs/flags.ded
Expand Up @@ -5,6 +5,7 @@ Flag { ID = "mf_special"; Value = 0x1; }
Flag { ID = "mf_solid"; Value = 0x2; }
Flag { ID = "mf_shootable"; Value = 0x4; }
Flag { ID = "mf_nosector"; Value = 0x8; }
Flag { ID = "mf_noblockmap"; Value = 0x10; }
Flag { ID = "mf_ambush"; Value = 0x20; }
Flag { ID = "mf_justhit"; Value = 0x40; }
Flag { ID = "mf_justattacked"; Value = 0x80; }
Expand Down Expand Up @@ -55,8 +56,3 @@ Flag { ID = "mf2_dontdraw"; Value = 0x100000; }

# Mobj flags3:
Flag { ID = "mf3_noinfight"; Value = 0x1; }

#
# Obsolete (unused) flags:
#
Flag { ID = "mf_noblockmap"; Value = 0; }
48 changes: 24 additions & 24 deletions doomsday/plugins/jdoom/defs/objects.ded
Expand Up @@ -135,7 +135,7 @@ Thing {
Radius = 20;
Height = 16;
Mass = 100;
Flags = nogravity | brightshadow;
Flags = noblockmap | nogravity | brightshadow;
Flags2 = cannotpush | noteleport;
}

Expand Down Expand Up @@ -190,7 +190,7 @@ Thing {
Height = 8;
Mass = 100;
Damage = 10;
Flags = missile | dropoff | nogravity;
Flags = noblockmap | missile | dropoff | nogravity;
Flags2 = noteleport;
}

Expand All @@ -215,7 +215,7 @@ Thing {
Radius = 20;
Height = 16;
Mass = 100;
Flags = nogravity;
Flags = noblockmap | nogravity;
Flags2 = cannotpush | noteleport;
}

Expand Down Expand Up @@ -270,7 +270,7 @@ Thing {
Height = 8;
Mass = 100;
Damage = 8;
Flags = missile | dropoff | nogravity;
Flags = noblockmap | missile | dropoff | nogravity;
Flags2 = noteleport;
}

Expand Down Expand Up @@ -465,7 +465,7 @@ Thing {
Height = 8;
Mass = 100;
Damage = 8;
Flags = missile | dropoff | nogravity;
Flags = noblockmap | missile | dropoff | nogravity;
Flags2 = noteleport;
}

Expand Down Expand Up @@ -738,7 +738,7 @@ Thing {
Radius = 20;
Height = 32;
Mass = 100;
Flags = nosector;
Flags = noblockmap | nosector;
}

Thing {
Expand All @@ -762,7 +762,7 @@ Thing {
Radius = 20;
Height = 32;
Mass = 100;
Flags = nosector;
Flags = noblockmap | nosector;
}

Thing {
Expand All @@ -788,7 +788,7 @@ Thing {
Height = 32;
Mass = 100;
Damage = 3;
Flags = missile | dropoff | nogravity | noclip;
Flags = noblockmap | missile | dropoff | nogravity | noclip;
Flags2 = cannotpush | noteleport;
}

Expand All @@ -813,7 +813,7 @@ Thing {
Radius = 20;
Height = 16;
Mass = 100;
Flags = nogravity;
Flags = noblockmap | nogravity;
Flags2 = cannotpush | noteleport;
}

Expand Down Expand Up @@ -865,7 +865,7 @@ Thing {
Height = 8;
Mass = 100;
Damage = 3;
Flags = brightexplode | dropoff | missile | nogravity | brightshadow;
Flags = brightexplode | dropoff | missile | noblockmap | nogravity | brightshadow;
Flags2 = noteleport;
}

Expand All @@ -892,7 +892,7 @@ Thing {
Height = 8;
Mass = 100;
Damage = 5;
Flags = missile | dropoff | nogravity;
Flags = noblockmap | missile | dropoff | nogravity;
Flags2 = noteleport;
}

Expand All @@ -919,7 +919,7 @@ Thing {
Height = 8;
Mass = 100;
Damage = 20;
Flags = missile | dropoff | nogravity | brightexplode;
Flags = noblockmap | missile | dropoff | nogravity | brightexplode;
Flags2 = noteleport;
}

Expand All @@ -946,7 +946,7 @@ Thing {
Height = 8;
Mass = 100;
Damage = 5;
Flags = missile | dropoff | nogravity | brightshadow;
Flags = noblockmap | missile | dropoff | nogravity | brightshadow;
Flags2 = noteleport;
}

Expand All @@ -973,7 +973,7 @@ Thing {
Height = 8;
Mass = 100;
Damage = 100;
Flags = missile | dropoff | nogravity | brightexplode | brightshadow;
Flags = noblockmap | missile | dropoff | nogravity | brightexplode | brightshadow;
Flags2 = noteleport;
}

Expand All @@ -1000,7 +1000,7 @@ Thing {
Height = 8;
Mass = 100;
Damage = 5;
Flags = missile | dropoff | nogravity;
Flags = noblockmap | missile | dropoff | nogravity;
Flags2 = noteleport;
}

Expand All @@ -1025,7 +1025,7 @@ Thing {
Radius = 8;
Height = 8;
Mass = 100;
Flags = nogravity | viewalign;
Flags = noblockmap | nogravity | viewalign;
Flags2 = cannotpush | noteleport;
}

Expand All @@ -1050,7 +1050,7 @@ Thing {
Radius = 20;
Height = 16;
Mass = 100;
Flags = viewalign;
Flags = noblockmap | viewalign;
Flags2 = cannotpush | noteleport;
}

Expand All @@ -1075,7 +1075,7 @@ Thing {
Radius = 20;
Height = 16;
Mass = 100;
Flags = nogravity;
Flags = noblockmap | nogravity;
Flags2 = cannotpush | noteleport;
}

Expand All @@ -1100,7 +1100,7 @@ Thing {
Radius = 20;
Height = 16;
Mass = 100;
Flags = nogravity;
Flags = noblockmap | nogravity;
Flags2 = cannotpush | noteleport;
}

Expand All @@ -1125,7 +1125,7 @@ Thing {
Radius = 20;
Height = 16;
Mass = 100;
Flags = nosector | local;
Flags = noblockmap | nosector | local;
Flags2 = cannotpush;
}

Expand All @@ -1150,7 +1150,7 @@ Thing {
Radius = 20;
Height = 16;
Mass = 100;
Flags = nogravity | brightshadow;
Flags = noblockmap | nogravity | brightshadow;
Flags2 = cannotpush | noteleport;
}

Expand Down Expand Up @@ -3457,7 +3457,7 @@ Thing {
Radius = 16;
Height = 16;
Mass = 100;
Flags = local | nogravity;
Flags = local | noblockmap | nogravity;
}

State {
Expand Down Expand Up @@ -11961,7 +11961,7 @@ Thing {
Radius = 1;
Height = 1;
Mass = 100;
Flags = local | nosector | nogravity;
Flags = local | nosector | noblockmap | nogravity;
}

State {
Expand Down Expand Up @@ -12003,7 +12003,7 @@ Thing {
Radius = 8;
Height = 8;
Mass = 100;
Flags = nogravity | viewalign;
Flags = noblockmap | nogravity | viewalign;
}

State {
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/jdoom/include/p_mobj.h
Expand Up @@ -62,7 +62,7 @@
#define MF_SOLID 0x00000002 // Blocks.
#define MF_SHOOTABLE 0x00000004 // Can be hit.
#define MF_NOSECTOR 0x00000008 // (p) Don't use the sector links (invisible but touchable).
//#define MF_UNUSED1 0x00000010 // Formerly MF_NOBLOCKMAP
#define MF_NOBLOCKMAP 0x00000010 // (p) Don't use the blocklinks (inert but displayable)
#define MF_AMBUSH 0x00000020 // Not to be activated by sound, deaf monster.
#define MF_JUSTHIT 0x00000040 // Will try to attack right back.
#define MF_JUSTATTACKED 0x00000080 // Will take at least one step before attacking.
Expand Down
6 changes: 1 addition & 5 deletions doomsday/plugins/jdoom64/defs/flags.ded
Expand Up @@ -5,6 +5,7 @@ Flag { ID = "mf_special"; Value = 0x1; }
Flag { ID = "mf_solid"; Value = 0x2; }
Flag { ID = "mf_shootable"; Value = 0x4; }
Flag { ID = "mf_nosector"; Value = 0x8; }
Flag { ID = "mf_noblockmap"; Value = 0x10; }
Flag { ID = "mf_ambush"; Value = 0x20; }
Flag { ID = "mf_justhit"; Value = 0x40; }
Flag { ID = "mf_justattacked"; Value = 0x80; }
Expand Down Expand Up @@ -55,8 +56,3 @@ Flag { ID = "mf2_dontdraw"; Value = 0x100000; }

# Mobj flags3:
Flag { ID = "mf3_noinfight"; Value = 0x1; }

#
# Obsolete (unused) flags:
#
Flag { ID = "mf_noblockmap"; Value = 0; }

0 comments on commit 4c32b9d

Please sign in to comment.