Merge branch 'maint'

This commit is contained in:
Christoph Oelckers 2013-08-09 20:36:08 +02:00
commit 9c12c03684
12 changed files with 30 additions and 3 deletions

View File

@ -113,6 +113,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
blockprojectiles = <bool>;// Line blocks all projectiles
blockuse = <bool>; // Line blocks all use actions
blocksight = <bool>; // Line blocks monster line of sight
blockhitscan = <bool>; // Line blocks hitscan attacks
locknumber = <int>; // Line special is locked
arg0str = <string>; // Alternate string-based version of arg0
@ -204,6 +205,8 @@ Note: All <bool> fields default to false unless mentioned otherwise.
// Parameter is the conversation ID, 0 meaning none.
countsecret = <bool>; // Picking up this actor counts as a secret.
arg0str = <string>; // Alternate string-based version of arg0
gravity = <float>; // Set per-actor gravity. Positive values are multiplied with the class's property,
// negative values are used as their absolute. Default = 1.0.
* Note about arg0str

View File

@ -268,7 +268,7 @@ enum
MF5_DONTDRAIN = 0x00000001, // cannot be drained health from.
/* = 0x00000002, */
MF5_NODROPOFF = 0x00000004, // cannot drop off under any circumstances.
/* = 0x00000008, */
MF5_NOFORWARDFALL = 0x00000008, // Does not make any actor fall forward by being damaged by this
MF5_COUNTSECRET = 0x00000010, // From Doom 64: actor acts like a secret
MF5_AVOIDINGDROPOFF = 0x00000020, // Used to move monsters away from dropoffs
MF5_NODAMAGE = 0x00000040, // Actor can be shot and reacts to being shot but takes no damage

View File

@ -153,6 +153,7 @@ enum ELineFlags
ML_BLOCKPROJECTILE = 0x01000000,
ML_BLOCKUSE = 0x02000000, // blocks all use actions through this line
ML_BLOCKSIGHT = 0x04000000, // blocks monster line of sight
ML_BLOCKHITSCAN = 0x08000000, // blocks hitscan attacks
};
@ -342,6 +343,7 @@ struct FMapThing
int special;
int args[5];
int Conversation;
fixed_t gravity;
void Serialize (FArchive &);
};

View File

@ -465,6 +465,7 @@ xx(blockprojectiles)
xx(blockuse)
xx(hidden)
xx(blocksight)
xx(blockhitscan)
xx(Renderstyle)

View File

@ -698,6 +698,7 @@ static int LoadSprites (spritetype *sprites, Xsprite *xsprites, int numsprites,
mapthings[count].SkillFilter = 0xffff;
mapthings[count].flags = MTF_SINGLE|MTF_COOPERATIVE|MTF_DEATHMATCH;
mapthings[count].special = 0;
mapthings[count].gravity = FRACUNIT;
if (xsprites != NULL && sprites[i].lotag == 710)
{ // Blood ambient sound

View File

@ -1143,7 +1143,9 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
&& (pr_damagemobj()&1)
// [RH] But only if not too fast and not flying
&& thrust < 10*FRACUNIT
&& !(target->flags & MF_NOGRAVITY))
&& !(target->flags & MF_NOGRAVITY)
&& (inflictor == NULL || !(inflictor->flags5 & MF5_NOFORWARDFALL))
)
{
ang += ANG180;
thrust *= 4;

View File

@ -2545,6 +2545,7 @@ FUNC(LS_Line_SetBlocking)
ML_RAILING,
ML_BLOCKUSE,
ML_BLOCKSIGHT,
ML_BLOCKHITSCAN,
-1
};

View File

@ -3563,7 +3563,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
else tflags = TRACE_NoSky|TRACE_Impact;
if (!Trace (t1->x, t1->y, shootz, t1->Sector, vx, vy, vz, distance,
MF_SHOOTABLE, ML_BLOCKEVERYTHING, t1, trace,
MF_SHOOTABLE, ML_BLOCKEVERYTHING|ML_BLOCKHITSCAN, t1, trace,
tflags, hitGhosts ? CheckForGhost : CheckForSpectral))
{ // hit nothing
if (puffDefaults == NULL)

View File

@ -4712,6 +4712,10 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
mobj->SpawnPoint[2] = mthing->z;
mobj->SpawnAngle = mthing->angle;
mobj->SpawnFlags = mthing->flags;
if (mthing->gravity < 0) mobj->gravity = -mthing->gravity;
else if (mthing->gravity > 0) mobj->gravity = FixedMul(mobj->gravity, mthing->gravity);
else mobj->flags &= ~MF_NOGRAVITY;
P_FindFloorCeiling(mobj, FFCF_SAMESECTOR | FFCF_ONLY3DFLOORS | FFCF_3DRESTRICT);
if (!(mobj->flags2 & MF2_ARGSDEFINED))

View File

@ -1750,6 +1750,7 @@ void P_LoadThings (MapData * map)
memset (&mti[i], 0, sizeof(mti[i]));
mti[i].gravity = FRACUNIT;
mti[i].Conversation = 0;
mti[i].SkillFilter = MakeSkill(flags);
mti[i].ClassFilter = 0xffff; // Doom map format doesn't have class flags so spawn for all player classes
@ -1825,6 +1826,7 @@ void P_LoadThings2 (MapData * map)
mti[i].ClassFilter = (mti[i].flags & MTF_CLASS_MASK) >> MTF_CLASS_SHIFT;
mti[i].flags &= ~(MTF_SKILLMASK|MTF_CLASS_MASK);
mti[i].Conversation = 0;
mti[i].gravity = FRACUNIT;
}
delete[] mtp;
}

View File

@ -475,6 +475,7 @@ public:
FString arg0str, arg1str;
memset(th, 0, sizeof(*th));
th->gravity = FRACUNIT;
sc.MustGetToken('{');
while (!sc.CheckToken('}'))
{
@ -515,6 +516,11 @@ public:
th->special = CheckInt(key);
break;
case NAME_Gravity:
CHECK_N(Zd | Zdt)
th->gravity = CheckFixed(key);
break;
case NAME_Arg0:
case NAME_Arg1:
case NAME_Arg2:
@ -921,6 +927,10 @@ public:
Flag(ld->flags, ML_BLOCKSIGHT, key);
continue;
case NAME_blockhitscan:
Flag(ld->flags, ML_BLOCKHITSCAN, key);
continue;
// [Dusk] lock number
case NAME_Locknumber:
ld->locknumber = CheckInt(key);

View File

@ -184,6 +184,7 @@ static FFlagDef ActorFlags[]=
DEFINE_FLAG(MF5, DONTDRAIN, AActor, flags5),
DEFINE_FLAG(MF5, NODROPOFF, AActor, flags5),
DEFINE_FLAG(MF5, NOFORWARDFALL, AActor, flags5),
DEFINE_FLAG(MF5, COUNTSECRET, AActor, flags5),
DEFINE_FLAG(MF5, NODAMAGE, AActor, flags5),
DEFINE_FLAG(MF5, BLOODSPLATTER, AActor, flags5),