Skip to content

Commit

Permalink
Fixed: "Bullets not visible in map cheat" (see here http://sourceforg…
Browse files Browse the repository at this point in the history
  • Loading branch information
danij committed Sep 3, 2009
1 parent 00a1ca4 commit 19e479a
Show file tree
Hide file tree
Showing 24 changed files with 380 additions and 413 deletions.
2 changes: 1 addition & 1 deletion doomsday/engine/api/dd_share.h
Expand Up @@ -773,7 +773,7 @@ typedef struct linknode_s {
#define DDMF_VIEWALIGN 0x00000010
#define DDMF_FITTOP 0x00000020 // Don't let the sprite go into the ceiling.
#define DDMF_NOFITBOTTOM 0x00000040
#define DDMF_NOBLOCKMAP 0x00000080
//#define DDMF_UNUSED1 0x00000080 // Formerly DDMF_NOBLOCKMAP
#define DDMF_LIGHTSCALE 0x00000180 // Light scale (0: full, 3: 1/4).
#define DDMF_LIGHTOFFSET 0x0000f000 // How to offset light (along Z axis).
//#define DDMF_RESERVED 0x00030000 // Don't touch these!! (translation class).
Expand Down
4 changes: 2 additions & 2 deletions doomsday/engine/portable/src/p_mobj.c
Expand Up @@ -257,9 +257,9 @@ boolean PIT_LineCollide(linedef_t* ld, void* parm)
return true;
}

boolean PIT_MobjCollide(mobj_t *mo, void *parm)
boolean PIT_MobjCollide(mobj_t* mo, void* parm)
{
checkpos_data_t *tm = parm;
checkpos_data_t* tm = parm;
float blockdist;
boolean overlap = false;

Expand Down
5 changes: 1 addition & 4 deletions doomsday/plugins/common/src/p_actor.c
Expand Up @@ -159,14 +159,11 @@ void P_MobjRemove(mobj_t* mo, boolean noRespawn)
*/
void P_MobjSetPosition(mobj_t* mo)
{
int flags = 0;
int flags = DDLINK_BLOCKMAP;

if(!(mo->flags & MF_NOSECTOR))
flags |= DDLINK_SECTOR;

if(!(mo->flags & MF_NOBLOCKMAP))
flags |= DDLINK_BLOCKMAP;

P_MobjLink(mo, flags);
}

Expand Down
4 changes: 0 additions & 4 deletions doomsday/plugins/common/src/p_map.c
Expand Up @@ -2604,10 +2604,6 @@ boolean PIT_ChangeSector(mobj_t* thing, void* data)
{
mobj_t* mo;

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

if(P_ThingHeightClip(thing))
return true; // Keep checking...

Expand Down
2 changes: 0 additions & 2 deletions doomsday/plugins/common/src/p_saveg.c
Expand Up @@ -1835,8 +1835,6 @@ static int SV_ReadMobj(thinker_t *th)

if(mo->info->flags & MF_SOLID)
mo->ddFlags |= DDMF_SOLID;
if(mo->info->flags & MF_NOBLOCKMAP)
mo->ddFlags |= DDMF_NOBLOCKMAP;
if(mo->info->flags2 & MF2_DONTDRAW)
mo->ddFlags |= DDMF_DONTDRAW;

Expand Down
6 changes: 6 additions & 0 deletions doomsday/plugins/dehread/src/dehmain.c
Expand Up @@ -1336,6 +1336,12 @@ 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: 5 additions & 1 deletion doomsday/plugins/jdoom/defs/flags.ded
Expand Up @@ -5,7 +5,6 @@ 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 @@ -56,3 +55,8 @@ 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 = noblockmap | nogravity | brightshadow;
Flags = nogravity | brightshadow;
Flags2 = cannotpush | noteleport;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

State {
Expand Down Expand Up @@ -12003,7 +12003,7 @@ Thing {
Radius = 8;
Height = 8;
Mass = 100;
Flags = noblockmap | nogravity | viewalign;
Flags = 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_NOBLOCKMAP 0x00000010 // (p) Don't use the blocklinks (inert but displayable)
//#define MF_UNUSED1 0x00000010 // Formerly MF_NOBLOCKMAP
#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
2 changes: 0 additions & 2 deletions doomsday/plugins/jdoom/src/p_mobj.c
Expand Up @@ -873,8 +873,6 @@ mobj_t* P_SpawnMobj3f(mobjtype_t type, float x, float y, float z,

if(info->flags & MF_SOLID)
ddflags |= DDMF_SOLID;
if(info->flags & MF_NOBLOCKMAP)
ddflags |= DDMF_NOBLOCKMAP;
if(info->flags2 & MF2_DONTDRAW)
ddflags |= DDMF_DONTDRAW;

Expand Down
2 changes: 0 additions & 2 deletions doomsday/plugins/jdoom/src/p_oldsvg.c
Expand Up @@ -255,8 +255,6 @@ static void SV_ReadMobj(void)

if(info->flags & MF_SOLID)
ddflags |= DDMF_SOLID;
if(info->flags & MF_NOBLOCKMAP)
ddflags |= DDMF_NOBLOCKMAP;
if(info->flags2 & MF2_DONTDRAW)
ddflags |= DDMF_DONTDRAW;

Expand Down
6 changes: 5 additions & 1 deletion doomsday/plugins/jdoom64/defs/flags.ded
Expand Up @@ -5,7 +5,6 @@ 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 @@ -56,3 +55,8 @@ 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 19e479a

Please sign in to comment.