mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 22:42:57 +00:00
- Added a 'resetinventory' MAPINFO option.
- Added MF6_NOFEAR flag. - Added A_MonsterRefire(probability, jumptarget). - Added A_JumpIfTargetInSight(state) action function. - Changed: Puffs set their angle to face the originator of the attack. - Strife's burning hands originally make the level view fullbright. changed in ZDoom to do partial brightening. SVN r1642 (trunk)
This commit is contained in:
parent
3ba96a470b
commit
476e0bce2a
11 changed files with 86 additions and 8 deletions
|
@ -1,4 +1,13 @@
|
||||||
June 5, 2009
|
June 6, 2009 (Changes by Graf Zahl)
|
||||||
|
- Added a 'resetinventory' MAPINFO option.
|
||||||
|
- Added MF6_NOFEAR flag.
|
||||||
|
- Added A_MonsterRefire(probability, jumptarget).
|
||||||
|
- Added A_JumpIfTargetInSight(state) action function.
|
||||||
|
- Changed: Puffs set their angle to face the originator of the attack.
|
||||||
|
- Strife's burning hands originally make the level view fullbright.
|
||||||
|
changed in ZDoom to do partial brightening.
|
||||||
|
|
||||||
|
June 5, 2009
|
||||||
- Added support for horizontal mouse wheels, and set invprev/invnext as
|
- Added support for horizontal mouse wheels, and set invprev/invnext as
|
||||||
default bindings for it. This is Vista only. DirectInput mouse (in_mouse 2)
|
default bindings for it. This is Vista only. DirectInput mouse (in_mouse 2)
|
||||||
does not support it, because the DirectInput mouse device does not expose
|
does not support it, because the DirectInput mouse device does not expose
|
||||||
|
|
|
@ -308,6 +308,7 @@ enum
|
||||||
MF6_THRUSPECIES = 0x00000002, // Actors passes through other of the same species.
|
MF6_THRUSPECIES = 0x00000002, // Actors passes through other of the same species.
|
||||||
MF6_MTHRUSPECIES = 0x00000004, // Missile passes through actors of its shooter's species.
|
MF6_MTHRUSPECIES = 0x00000004, // Missile passes through actors of its shooter's species.
|
||||||
MF6_FORCEPAIN = 0x00000008, // forces target into painstate (unless it has the NOPAIN flag)
|
MF6_FORCEPAIN = 0x00000008, // forces target into painstate (unless it has the NOPAIN flag)
|
||||||
|
MF6_NOFEAR = 0x00000010, // Not scared of frightening players
|
||||||
|
|
||||||
|
|
||||||
// --- mobj.renderflags ---
|
// --- mobj.renderflags ---
|
||||||
|
|
|
@ -549,6 +549,8 @@ static bool g_nomonsters;
|
||||||
void G_ChangeLevel(const char *levelname, int position, bool keepFacing, int nextSkill,
|
void G_ChangeLevel(const char *levelname, int position, bool keepFacing, int nextSkill,
|
||||||
bool nointermission, bool resetinv, bool nomonsters)
|
bool nointermission, bool resetinv, bool nomonsters)
|
||||||
{
|
{
|
||||||
|
level_info_t *nextinfo = NULL;
|
||||||
|
|
||||||
if (unloading)
|
if (unloading)
|
||||||
{
|
{
|
||||||
Printf (TEXTCOLOR_RED "Unloading scripts cannot exit the level again.\n");
|
Printf (TEXTCOLOR_RED "Unloading scripts cannot exit the level again.\n");
|
||||||
|
@ -559,7 +561,7 @@ void G_ChangeLevel(const char *levelname, int position, bool keepFacing, int nex
|
||||||
|
|
||||||
if (strncmp(levelname, "enDSeQ", 6))
|
if (strncmp(levelname, "enDSeQ", 6))
|
||||||
{
|
{
|
||||||
level_info_t *nextinfo = FindLevelInfo (nextlevel)->CheckLevelRedirect ();
|
nextinfo = FindLevelInfo (nextlevel)->CheckLevelRedirect ();
|
||||||
if (nextinfo)
|
if (nextinfo)
|
||||||
{
|
{
|
||||||
nextlevel = nextinfo->mapname;
|
nextlevel = nextinfo->mapname;
|
||||||
|
@ -573,12 +575,20 @@ void G_ChangeLevel(const char *levelname, int position, bool keepFacing, int nex
|
||||||
if (nointermission) level.flags |= LEVEL_NOINTERMISSION;
|
if (nointermission) level.flags |= LEVEL_NOINTERMISSION;
|
||||||
|
|
||||||
cluster_info_t *thiscluster = FindClusterInfo (level.cluster);
|
cluster_info_t *thiscluster = FindClusterInfo (level.cluster);
|
||||||
cluster_info_t *nextcluster = FindClusterInfo (FindLevelInfo (nextlevel)->cluster);
|
cluster_info_t *nextcluster = nextinfo? FindClusterInfo (nextinfo->cluster) : NULL;
|
||||||
|
|
||||||
startpos = position;
|
startpos = position;
|
||||||
startkeepfacing = keepFacing;
|
startkeepfacing = keepFacing;
|
||||||
gameaction = ga_completed;
|
gameaction = ga_completed;
|
||||||
resetinventory = resetinv;
|
resetinventory = resetinv;
|
||||||
|
|
||||||
|
if (nextinfo != NULL)
|
||||||
|
{
|
||||||
|
if (thiscluster != nextcluster || (thiscluster && !(thiscluster->flags & CLUSTER_HUB)))
|
||||||
|
{
|
||||||
|
resetinventory |= !!(nextinfo->flags2 & LEVEL2_RESETINVENTORY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bglobal.End(); //Added by MC:
|
bglobal.End(); //Added by MC:
|
||||||
|
|
||||||
|
|
|
@ -198,6 +198,7 @@ enum ELevelFlags
|
||||||
|
|
||||||
LEVEL2_SMOOTHLIGHTING = 0x01000000, // Level uses the smooth lighting feature.
|
LEVEL2_SMOOTHLIGHTING = 0x01000000, // Level uses the smooth lighting feature.
|
||||||
LEVEL2_POLYGRIND = 0x02000000, // Polyobjects grind corpses to gibs.
|
LEVEL2_POLYGRIND = 0x02000000, // Polyobjects grind corpses to gibs.
|
||||||
|
LEVEL2_RESETINVENTORY = 0x04000000, // Resets player inventory when starting this level (unless in a hub)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1316,6 +1316,7 @@ MapFlagHandlers[] =
|
||||||
{ "nocheckswitchrange", MITYPE_CLRFLAG2, LEVEL2_CHECKSWITCHRANGE, 0 },
|
{ "nocheckswitchrange", MITYPE_CLRFLAG2, LEVEL2_CHECKSWITCHRANGE, 0 },
|
||||||
{ "grinding_polyobj", MITYPE_SETFLAG2, LEVEL2_POLYGRIND, 0 },
|
{ "grinding_polyobj", MITYPE_SETFLAG2, LEVEL2_POLYGRIND, 0 },
|
||||||
{ "no_grinding_polyobj", MITYPE_CLRFLAG2, LEVEL2_POLYGRIND, 0 },
|
{ "no_grinding_polyobj", MITYPE_CLRFLAG2, LEVEL2_POLYGRIND, 0 },
|
||||||
|
{ "resetinventory", MITYPE_SETFLAG2, LEVEL2_RESETINVENTORY, 0 },
|
||||||
{ "unfreezesingleplayerconversations",MITYPE_SETFLAG2, LEVEL2_CONV_SINGLE_UNFREEZE, 0 },
|
{ "unfreezesingleplayerconversations",MITYPE_SETFLAG2, LEVEL2_CONV_SINGLE_UNFREEZE, 0 },
|
||||||
{ "nobotnodes", MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes
|
{ "nobotnodes", MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes
|
||||||
{ "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX},
|
{ "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX},
|
||||||
|
|
|
@ -674,6 +674,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ItBurnsItBurns)
|
||||||
self->player->ReadyWeapon = NULL;
|
self->player->ReadyWeapon = NULL;
|
||||||
self->player->PendingWeapon = WP_NOCHANGE;
|
self->player->PendingWeapon = WP_NOCHANGE;
|
||||||
self->player->playerstate = PST_LIVE;
|
self->player->playerstate = PST_LIVE;
|
||||||
|
self->player->extralight = 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -705,6 +706,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_HandLower)
|
||||||
{
|
{
|
||||||
P_SetPsprite (self->player, ps_weapon, NULL);
|
P_SetPsprite (self->player, ps_weapon, NULL);
|
||||||
}
|
}
|
||||||
|
if (self->player->extralight > 0) self->player->extralight--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -724,11 +724,14 @@ void P_NewChaseDir(AActor * actor)
|
||||||
deltax = actor->target->x - actor->x;
|
deltax = actor->target->x - actor->x;
|
||||||
deltay = actor->target->y - actor->y;
|
deltay = actor->target->y - actor->y;
|
||||||
|
|
||||||
if ((actor->target->player != NULL && (actor->target->player->cheats & CF_FRIGHTENING)) ||
|
if (!(actor->flags6 & MF6_NOFEAR))
|
||||||
(actor->flags4 & MF4_FRIGHTENED))
|
|
||||||
{
|
{
|
||||||
deltax = -deltax;
|
if ((actor->target->player != NULL && (actor->target->player->cheats & CF_FRIGHTENING)) ||
|
||||||
deltay = -deltay;
|
(actor->flags4 & MF4_FRIGHTENED))
|
||||||
|
{
|
||||||
|
deltax = -deltax;
|
||||||
|
deltay = -deltay;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -4272,6 +4272,7 @@ AActor *P_SpawnPuff (AActor *source, const PClass *pufftype, fixed_t x, fixed_t
|
||||||
|
|
||||||
puff = Spawn (pufftype, x, y, z, ALLOW_REPLACE);
|
puff = Spawn (pufftype, x, y, z, ALLOW_REPLACE);
|
||||||
if (puff == NULL) return NULL;
|
if (puff == NULL) return NULL;
|
||||||
|
if (source != NULL) puff->angle = R_PointToAngle2(x, y, source->x, source->y);
|
||||||
|
|
||||||
// If a puff has a crash state and an actor was not hit,
|
// If a puff has a crash state and an actor was not hit,
|
||||||
// it will enter the crash state. This is used by the StrifeSpark
|
// it will enter the crash state. This is used by the StrifeSpark
|
||||||
|
|
|
@ -80,6 +80,7 @@ static FRandom pr_crailgun ("CustomRailgun");
|
||||||
static FRandom pr_spawndebris ("SpawnDebris");
|
static FRandom pr_spawndebris ("SpawnDebris");
|
||||||
static FRandom pr_spawnitemex ("SpawnItemEx");
|
static FRandom pr_spawnitemex ("SpawnItemEx");
|
||||||
static FRandom pr_burst ("Burst");
|
static FRandom pr_burst ("Burst");
|
||||||
|
static FRandom pr_monsterrefire ("MonsterRefire");
|
||||||
|
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
@ -1772,6 +1773,24 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckSight)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
//
|
||||||
|
// A_JumpIfTargetInSight
|
||||||
|
// jumps if monster can see its target
|
||||||
|
//
|
||||||
|
//===========================================================================
|
||||||
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfTargetInSight)
|
||||||
|
{
|
||||||
|
ACTION_PARAM_START(1);
|
||||||
|
ACTION_PARAM_STATE(jump, 0);
|
||||||
|
|
||||||
|
ACTION_SET_RESULT(false); // Jumps should never set the result for inventory state chains!
|
||||||
|
if (self->target == NULL || !P_CheckSight(self, self->target,4)) return;
|
||||||
|
ACTION_JUMP(jump);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//
|
//
|
||||||
// Inventory drop
|
// Inventory drop
|
||||||
|
@ -2455,4 +2474,31 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveChildren)
|
||||||
P_RemoveThing(mo);
|
P_RemoveThing(mo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
//
|
||||||
|
// keep firing unless target got out of sight
|
||||||
|
//
|
||||||
|
//===========================================================================
|
||||||
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_MonsterRefire)
|
||||||
|
{
|
||||||
|
ACTION_PARAM_START(2);
|
||||||
|
ACTION_PARAM_INT(prob, 0);
|
||||||
|
ACTION_PARAM_STATE(jump, 1);
|
||||||
|
|
||||||
|
ACTION_SET_RESULT(false); // Jumps should never set the result for inventory state chains!
|
||||||
|
A_FaceTarget (self);
|
||||||
|
|
||||||
|
if (pr_monsterrefire() < prob)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!self->target
|
||||||
|
|| P_HitFriend (self)
|
||||||
|
|| self->target->health <= 0
|
||||||
|
|| !P_CheckSight (self, self->target, 0) )
|
||||||
|
{
|
||||||
|
ACTION_JUMP(jump);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -213,6 +213,7 @@ static FFlagDef ActorFlags[]=
|
||||||
DEFINE_FLAG(MF6, THRUSPECIES, AActor, flags6),
|
DEFINE_FLAG(MF6, THRUSPECIES, AActor, flags6),
|
||||||
DEFINE_FLAG(MF6, MTHRUSPECIES, AActor, flags6),
|
DEFINE_FLAG(MF6, MTHRUSPECIES, AActor, flags6),
|
||||||
DEFINE_FLAG(MF6, FORCEPAIN, AActor, flags6),
|
DEFINE_FLAG(MF6, FORCEPAIN, AActor, flags6),
|
||||||
|
DEFINE_FLAG(MF6, NOFEAR, AActor, flags6),
|
||||||
|
|
||||||
// Effect flags
|
// Effect flags
|
||||||
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
||||||
|
|
|
@ -236,6 +236,9 @@ ACTOR Actor native //: Thinker
|
||||||
action native A_RemoveForcefield();
|
action native A_RemoveForcefield();
|
||||||
action native A_DropWeaponPieces(class<Actor> p1, class<Actor> p2, class<Actor> p3);
|
action native A_DropWeaponPieces(class<Actor> p1, class<Actor> p2, class<Actor> p3);
|
||||||
action native A_PigPain ();
|
action native A_PigPain ();
|
||||||
|
|
||||||
|
action native A_JumpIfTargetInSight(state label);
|
||||||
|
action native A_MonsterRefire(int chance, state label);
|
||||||
|
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue