Merge branch 'master' into scripting

Conflicts:
	src/actor.h
	src/thingdef/thingdef_codeptr.cpp
This commit is contained in:
Christoph Oelckers 2013-08-18 12:18:59 +02:00
commit 3e4678765b
40 changed files with 346 additions and 163 deletions

View file

@ -113,6 +113,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
blockprojectiles = <bool>;// Line blocks all projectiles blockprojectiles = <bool>;// Line blocks all projectiles
blockuse = <bool>; // Line blocks all use actions blockuse = <bool>; // Line blocks all use actions
blocksight = <bool>; // Line blocks monster line of sight blocksight = <bool>; // Line blocks monster line of sight
blockhitscan = <bool>; // Line blocks hitscan attacks
locknumber = <int>; // Line special is locked locknumber = <int>; // Line special is locked
arg0str = <string>; // Alternate string-based version of arg0 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. // Parameter is the conversation ID, 0 meaning none.
countsecret = <bool>; // Picking up this actor counts as a secret. countsecret = <bool>; // Picking up this actor counts as a secret.
arg0str = <string>; // Alternate string-based version of arg0 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 * Note about arg0str

View file

@ -238,7 +238,7 @@ enum
MF4_RANDOMIZE = 0x00000010, // Missile has random initial tic count MF4_RANDOMIZE = 0x00000010, // Missile has random initial tic count
MF4_NOSKIN = 0x00000020, // Player cannot use skins MF4_NOSKIN = 0x00000020, // Player cannot use skins
MF4_FIXMAPTHINGPOS = 0x00000040, // Fix this actor's position when spawned as a map thing MF4_FIXMAPTHINGPOS = 0x00000040, // Fix this actor's position when spawned as a map thing
MF4_ACTLIKEBRIDGE = 0x00000080, // Pickups can "stand" on this actor MF4_ACTLIKEBRIDGE = 0x00000080, // Pickups can "stand" on this actor / cannot be moved by any sector action.
MF4_STRIFEDAMAGE = 0x00000100, // Strife projectiles only do up to 4x damage, not 8x MF4_STRIFEDAMAGE = 0x00000100, // Strife projectiles only do up to 4x damage, not 8x
MF4_CANUSEWALLS = 0x00000200, // Can activate 'use' specials MF4_CANUSEWALLS = 0x00000200, // Can activate 'use' specials
@ -270,7 +270,7 @@ enum
MF5_DONTDRAIN = 0x00000001, // cannot be drained health from. MF5_DONTDRAIN = 0x00000001, // cannot be drained health from.
MF5_INSTATECALL = 0x00000002, // This actor is being run through CallStateChain MF5_INSTATECALL = 0x00000002, // This actor is being run through CallStateChain
MF5_NODROPOFF = 0x00000004, // cannot drop off under any circumstances. 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_COUNTSECRET = 0x00000010, // From Doom 64: actor acts like a secret
MF5_AVOIDINGDROPOFF = 0x00000020, // Used to move monsters away from dropoffs 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 MF5_NODAMAGE = 0x00000040, // Actor can be shot and reacts to being shot but takes no damage
@ -286,7 +286,7 @@ enum
MF5_NEVERFAST = 0x00010000, // never uses 'fast' attacking logic MF5_NEVERFAST = 0x00010000, // never uses 'fast' attacking logic
MF5_ALWAYSRESPAWN = 0x00020000, // always respawns, regardless of skill setting MF5_ALWAYSRESPAWN = 0x00020000, // always respawns, regardless of skill setting
MF5_NEVERRESPAWN = 0x00040000, // never respawns, regardless of skill setting MF5_NEVERRESPAWN = 0x00040000, // never respawns, regardless of skill setting
MF5_DONTRIP = 0x00080000, // Ripping projectiles explode when hittin this actor MF5_DONTRIP = 0x00080000, // Ripping projectiles explode when hitting this actor
MF5_NOINFIGHTING = 0x00100000, // This actor doesn't switch target when it's hurt MF5_NOINFIGHTING = 0x00100000, // This actor doesn't switch target when it's hurt
MF5_NOINTERACTION = 0x00200000, // Thing is completely excluded from any gameplay related checks MF5_NOINTERACTION = 0x00200000, // Thing is completely excluded from any gameplay related checks
MF5_NOTIMEFREEZE = 0x00400000, // Actor is not affected by time freezer MF5_NOTIMEFREEZE = 0x00400000, // Actor is not affected by time freezer
@ -333,6 +333,14 @@ enum
MF6_DOHARMSPECIES = 0x08000000, // Do hurt one's own species with projectiles. MF6_DOHARMSPECIES = 0x08000000, // Do hurt one's own species with projectiles.
MF6_INTRYMOVE = 0x10000000, // Executing P_TryMove MF6_INTRYMOVE = 0x10000000, // Executing P_TryMove
MF6_NOTAUTOAIMED = 0x20000000, // Do not subject actor to player autoaim. MF6_NOTAUTOAIMED = 0x20000000, // Do not subject actor to player autoaim.
MF6_NOTONAUTOMAP = 0x40000000, // will not be shown on automap with the 'scanner' powerup.
MF6_RELATIVETOFLOOR = 0x80000000, // [RC] Make flying actors be affected by lifts.
// --- mobj.flags6 ---
MF7_NEVERTARGET = 0x00000001, // can not be targetted at all, even if monster friendliness is considered.
MF7_NOTELESTOMP = 0x00000002, // cannot telefrag under any circumstances (even when set by MAPINFO)
MF7_ALWAYSTELEFRAG = 0x00000004, // will unconditionally be telefragged when in the way. Overrides all other settings.
// --- mobj.renderflags --- // --- mobj.renderflags ---
@ -806,6 +814,7 @@ public:
DWORD flags4; // [RH] Even more flags! DWORD flags4; // [RH] Even more flags!
DWORD flags5; // OMG! We need another one. DWORD flags5; // OMG! We need another one.
DWORD flags6; // Shit! Where did all the flags go? DWORD flags6; // Shit! Where did all the flags go?
DWORD flags7; //
// [BB] If 0, everybody can see the actor, if > 0, only members of team (VisibleToTeam-1) can see it. // [BB] If 0, everybody can see the actor, if > 0, only members of team (VisibleToTeam-1) can see it.
DWORD VisibleToTeam; DWORD VisibleToTeam;

View file

@ -115,6 +115,7 @@ CVAR (Color, am_interlevelcolor, 0xff0000, CVAR_ARCHIVE);
CVAR (Color, am_secretsectorcolor, 0xff00ff, CVAR_ARCHIVE); CVAR (Color, am_secretsectorcolor, 0xff00ff, CVAR_ARCHIVE);
CVAR (Color, am_thingcolor_friend, 0xfcfcfc, CVAR_ARCHIVE); CVAR (Color, am_thingcolor_friend, 0xfcfcfc, CVAR_ARCHIVE);
CVAR (Color, am_thingcolor_monster, 0xfcfcfc, CVAR_ARCHIVE); CVAR (Color, am_thingcolor_monster, 0xfcfcfc, CVAR_ARCHIVE);
CVAR (Color, am_thingcolor_ncmonster, 0xfcfcfc, CVAR_ARCHIVE);
CVAR (Color, am_thingcolor_item, 0xfcfcfc, CVAR_ARCHIVE); CVAR (Color, am_thingcolor_item, 0xfcfcfc, CVAR_ARCHIVE);
CVAR (Color, am_thingcolor_citem, 0xfcfcfc, CVAR_ARCHIVE); CVAR (Color, am_thingcolor_citem, 0xfcfcfc, CVAR_ARCHIVE);
@ -134,6 +135,7 @@ CVAR (Color, am_ovsecretsectorcolor,0x00ffff, CVAR_ARCHIVE);
CVAR (Color, am_ovthingcolor, 0xe88800, CVAR_ARCHIVE); CVAR (Color, am_ovthingcolor, 0xe88800, CVAR_ARCHIVE);
CVAR (Color, am_ovthingcolor_friend, 0xe88800, CVAR_ARCHIVE); CVAR (Color, am_ovthingcolor_friend, 0xe88800, CVAR_ARCHIVE);
CVAR (Color, am_ovthingcolor_monster, 0xe88800, CVAR_ARCHIVE); CVAR (Color, am_ovthingcolor_monster, 0xe88800, CVAR_ARCHIVE);
CVAR (Color, am_ovthingcolor_ncmonster, 0xe88800, CVAR_ARCHIVE);
CVAR (Color, am_ovthingcolor_item, 0xe88800, CVAR_ARCHIVE); CVAR (Color, am_ovthingcolor_item, 0xe88800, CVAR_ARCHIVE);
CVAR (Color, am_ovthingcolor_citem, 0xe88800, CVAR_ARCHIVE); CVAR (Color, am_ovthingcolor_citem, 0xe88800, CVAR_ARCHIVE);
@ -190,6 +192,7 @@ static const char *ColorNames[] = {
"ThingColor_Item", "ThingColor_Item",
"ThingColor_CountItem", "ThingColor_CountItem",
"ThingColor_Monster", "ThingColor_Monster",
"ThingColor_NocountMonster",
"ThingColor_Friend", "ThingColor_Friend",
"SpecialWallColor", "SpecialWallColor",
"SecretWallColor", "SecretWallColor",
@ -219,6 +222,7 @@ struct AMColorset
ThingColor_Item, ThingColor_Item,
ThingColor_CountItem, ThingColor_CountItem,
ThingColor_Monster, ThingColor_Monster,
ThingColor_NocountMonster,
ThingColor_Friend, ThingColor_Friend,
SpecialWallColor, SpecialWallColor,
SecretWallColor, SecretWallColor,
@ -318,6 +322,7 @@ static FColorCVar *cv_standard[] = {
&am_thingcolor_item, &am_thingcolor_item,
&am_thingcolor_citem, &am_thingcolor_citem,
&am_thingcolor_monster, &am_thingcolor_monster,
&am_thingcolor_ncmonster,
&am_thingcolor_friend, &am_thingcolor_friend,
&am_specialwallcolor, &am_specialwallcolor,
&am_secretwallcolor, &am_secretwallcolor,
@ -342,6 +347,7 @@ static FColorCVar *cv_overlay[] = {
&am_ovthingcolor_item, &am_ovthingcolor_item,
&am_ovthingcolor_citem, &am_ovthingcolor_citem,
&am_ovthingcolor_monster, &am_ovthingcolor_monster,
&am_ovthingcolor_ncmonster,
&am_ovthingcolor_friend, &am_ovthingcolor_friend,
&am_ovspecialwallcolor, &am_ovspecialwallcolor,
&am_ovsecretwallcolor, &am_ovsecretwallcolor,
@ -368,6 +374,7 @@ static unsigned char DoomColors[]= {
0x74,0xfc,0x6c, // thingcolor_item 0x74,0xfc,0x6c, // thingcolor_item
0x74,0xfc,0x6c, // thingcolor_citem 0x74,0xfc,0x6c, // thingcolor_citem
0x74,0xfc,0x6c, // thingcolor_monster 0x74,0xfc,0x6c, // thingcolor_monster
0x74,0xfc,0x6c, // thingcolor_ncmonster
0x74,0xfc,0x6c, // thingcolor_friend 0x74,0xfc,0x6c, // thingcolor_friend
NOT_USED, // specialwallcolor NOT_USED, // specialwallcolor
NOT_USED, // secretwallcolor NOT_USED, // secretwallcolor
@ -393,6 +400,7 @@ static unsigned char StrifeColors[]= {
219, 171, 0, // thingcolor_item 219, 171, 0, // thingcolor_item
219, 171, 0, // thingcolor_citem 219, 171, 0, // thingcolor_citem
0xfc,0x00,0x00, // thingcolor_monster 0xfc,0x00,0x00, // thingcolor_monster
0xfc,0x00,0x00, // thingcolor_ncmonster
0xfc,0x00,0x00, // thingcolor_friend 0xfc,0x00,0x00, // thingcolor_friend
NOT_USED, // specialwallcolor NOT_USED, // specialwallcolor
NOT_USED, // secretwallcolor NOT_USED, // secretwallcolor
@ -418,6 +426,7 @@ static unsigned char RavenColors[]= {
236, 236, 236, // thingcolor_item 236, 236, 236, // thingcolor_item
236, 236, 236, // thingcolor_citem 236, 236, 236, // thingcolor_citem
236, 236, 236, // thingcolor_monster 236, 236, 236, // thingcolor_monster
236, 236, 236, // thingcolor_ncmonster
236, 236, 236, // thingcolor_friend 236, 236, 236, // thingcolor_friend
NOT_USED, // specialwallcolor NOT_USED, // specialwallcolor
NOT_USED, // secretwallcolor NOT_USED, // secretwallcolor
@ -2615,6 +2624,8 @@ void AM_drawThings ()
{ {
t = sectors[i].thinglist; t = sectors[i].thinglist;
while (t) while (t)
{
if (am_cheat > 0 || !(t->flags6 & MF6_NOTONAUTOMAP))
{ {
p.x = t->x >> FRACTOMAPBITS; p.x = t->x >> FRACTOMAPBITS;
p.y = t->y >> FRACTOMAPBITS; p.y = t->y >> FRACTOMAPBITS;
@ -2667,7 +2678,8 @@ void AM_drawThings ()
// use separate colors for special thing types // use separate colors for special thing types
if (t->flags3&MF3_ISMONSTER && !(t->flags&MF_CORPSE)) if (t->flags3&MF3_ISMONSTER && !(t->flags&MF_CORPSE))
{ {
if (t->flags & MF_FRIENDLY || !(t->flags & MF_COUNTKILL)) color = AMColors[AMColors.ThingColor_Friend]; if (t->flags & MF_FRIENDLY) color = AMColors[AMColors.ThingColor_Friend];
else if (!(t->flags & MF_COUNTKILL)) color = AMColors[AMColors.ThingColor_NocountMonster];
else color = AMColors[AMColors.ThingColor_Monster]; else color = AMColors[AMColors.ThingColor_Monster];
} }
else if (t->flags&MF_SPECIAL) else if (t->flags&MF_SPECIAL)
@ -2723,7 +2735,7 @@ void AM_drawThings ()
AM_drawLineCharacter (box, 4, t->radius >> FRACTOMAPBITS, angle - t->angle, color, p.x, p.y); AM_drawLineCharacter (box, 4, t->radius >> FRACTOMAPBITS, angle - t->angle, color, p.x, p.y);
} }
} }
}
t = t->snext; t = t->snext;
} }
} }

View file

@ -855,7 +855,7 @@ void D_Display ()
FTexture *tex; FTexture *tex;
int x; int x;
tex = TexMan[gameinfo.PauseSign]; tex = TexMan(gameinfo.PauseSign);
x = (SCREENWIDTH - tex->GetScaledWidth() * CleanXfac)/2 + x = (SCREENWIDTH - tex->GetScaledWidth() * CleanXfac)/2 +
tex->GetScaledLeftOffset() * CleanXfac; tex->GetScaledLeftOffset() * CleanXfac;
screen->DrawTexture (tex, x, 4, DTA_CleanNoMove, true, TAG_DONE); screen->DrawTexture (tex, x, 4, DTA_CleanNoMove, true, TAG_DONE);
@ -1300,7 +1300,7 @@ void D_DoAdvanceDemo (void)
gamestate = GS_DEMOSCREEN; gamestate = GS_DEMOSCREEN;
pagename = gameinfo.titlePage; pagename = gameinfo.titlePage;
pagetic = (int)(gameinfo.titleTime * TICRATE); pagetic = (int)(gameinfo.titleTime * TICRATE);
S_StartMusic (gameinfo.titleMusic); S_ChangeMusic (gameinfo.titleMusic, gameinfo.titleOrder, false);
demosequence = 3; demosequence = 3;
pagecount = 0; pagecount = 0;
C_HideConsole (); C_HideConsole ();

View file

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

View file

@ -589,7 +589,7 @@ void APowerInvisibility::DoEffect ()
Super::DoEffect(); Super::DoEffect();
// Due to potential interference with other PowerInvisibility items // Due to potential interference with other PowerInvisibility items
// the effect has to be refreshed each tic. // the effect has to be refreshed each tic.
fixed_t ts = Strength * (special1 + 1); if (ts > FRACUNIT) ts = FRACUNIT; fixed_t ts = (Strength/100) * (special1 + 1); if (ts > FRACUNIT) ts = FRACUNIT;
Owner->alpha = clamp<fixed_t>((OPAQUE - ts), 0, OPAQUE); Owner->alpha = clamp<fixed_t>((OPAQUE - ts), 0, OPAQUE);
switch (Mode) switch (Mode)
{ {
@ -669,7 +669,7 @@ int APowerInvisibility::AlterWeaponSprite (visstyle_t *vis)
else if (changed == 1) else if (changed == 1)
{ {
// something else set the weapon sprite back to opaque but this item is still active. // something else set the weapon sprite back to opaque but this item is still active.
fixed_t ts = Strength * (special1 + 1); if (ts > FRACUNIT) ts = FRACUNIT; fixed_t ts = (Strength/100) * (special1 + 1); if (ts > FRACUNIT) ts = FRACUNIT;
vis->alpha = clamp<fixed_t>((OPAQUE - ts), 0, OPAQUE); vis->alpha = clamp<fixed_t>((OPAQUE - ts), 0, OPAQUE);
switch (Mode) switch (Mode)
{ {
@ -696,7 +696,7 @@ int APowerInvisibility::AlterWeaponSprite (visstyle_t *vis)
// Handling of Strife-like cumulative invisibility powerups, the weapon itself shouldn't become invisible // Handling of Strife-like cumulative invisibility powerups, the weapon itself shouldn't become invisible
if ((vis->alpha < TRANSLUC25 && special1 > 0) || (vis->alpha == 0)) if ((vis->alpha < TRANSLUC25 && special1 > 0) || (vis->alpha == 0))
{ {
vis->alpha = clamp<fixed_t>((OPAQUE - Strength), 0, OPAQUE); vis->alpha = clamp<fixed_t>((OPAQUE - (Strength/100)), 0, OPAQUE);
vis->colormap = SpecialColormaps[INVERSECOLORMAP].Colormap; vis->colormap = SpecialColormaps[INVERSECOLORMAP].Colormap;
} }
return -1; // This item is valid so another one shouldn't reset the translucency return -1; // This item is valid so another one shouldn't reset the translucency
@ -1697,7 +1697,7 @@ void APowerRegeneration::DoEffect()
{ {
if (Owner != NULL && Owner->health > 0 && (level.time & 31) == 0) if (Owner != NULL && Owner->health > 0 && (level.time & 31) == 0)
{ {
if (P_GiveBody(Owner, 5)) if (P_GiveBody(Owner, Strength/FRACUNIT))
{ {
S_Sound(Owner, CHAN_ITEM, "*regenerate", 1, ATTN_NORM ); S_Sound(Owner, CHAN_ITEM, "*regenerate", 1, ATTN_NORM );
} }

View file

@ -125,6 +125,8 @@ enum
IF_RESTRICTABSOLUTELY = 1<<19, // RestrictedTo and ForbiddenTo do not allow pickup in any form by other classes IF_RESTRICTABSOLUTELY = 1<<19, // RestrictedTo and ForbiddenTo do not allow pickup in any form by other classes
IF_NEVERRESPAWN = 1<<20, // Never, ever respawns IF_NEVERRESPAWN = 1<<20, // Never, ever respawns
IF_NOSCREENFLASH = 1<<21, // No pickup flash on the player's screen IF_NOSCREENFLASH = 1<<21, // No pickup flash on the player's screen
IF_TOSSED = 1<<22, // Was spawned by P_DropItem (i.e. as a monster drop)
}; };

View file

@ -184,6 +184,20 @@ const char* GameInfoBorders[] =
gameinfo.key.color = NAME_Null; \ gameinfo.key.color = NAME_Null; \
} }
#define GAMEINFOKEY_MUSIC(key, order, variable) \
else if(nextKey.CompareNoCase(variable) == 0) \
{ \
sc.MustGetToken(TK_StringConst); \
gameinfo.order = 0; \
char *colon = strchr (sc.String, ':'); \
if (colon) \
{ \
gameinfo.order = atoi(colon+1); \
*colon = 0; \
} \
gameinfo.key = sc.String; \
}
void FMapInfoParser::ParseGameInfo() void FMapInfoParser::ParseGameInfo()
{ {
@ -286,12 +300,12 @@ void FMapInfoParser::ParseGameInfo()
GAMEINFOKEY_STRINGARRAY(creditPages, "CreditPage", 8, true) GAMEINFOKEY_STRINGARRAY(creditPages, "CreditPage", 8, true)
GAMEINFOKEY_STRINGARRAY(PlayerClasses, "addplayerclasses", 0, false) GAMEINFOKEY_STRINGARRAY(PlayerClasses, "addplayerclasses", 0, false)
GAMEINFOKEY_STRINGARRAY(PlayerClasses, "playerclasses", 0, true) GAMEINFOKEY_STRINGARRAY(PlayerClasses, "playerclasses", 0, true)
GAMEINFOKEY_STRING(titleMusic, "titleMusic") GAMEINFOKEY_MUSIC(titleMusic, titleOrder, "titleMusic")
GAMEINFOKEY_FLOAT(titleTime, "titleTime") GAMEINFOKEY_FLOAT(titleTime, "titleTime")
GAMEINFOKEY_FLOAT(advisoryTime, "advisoryTime") GAMEINFOKEY_FLOAT(advisoryTime, "advisoryTime")
GAMEINFOKEY_FLOAT(pageTime, "pageTime") GAMEINFOKEY_FLOAT(pageTime, "pageTime")
GAMEINFOKEY_STRING(chatSound, "chatSound") GAMEINFOKEY_STRING(chatSound, "chatSound")
GAMEINFOKEY_STRING(finaleMusic, "finaleMusic") GAMEINFOKEY_MUSIC(finaleMusic, finaleOrder, "finaleMusic")
GAMEINFOKEY_CSTRING(finaleFlat, "finaleFlat", 8) GAMEINFOKEY_CSTRING(finaleFlat, "finaleFlat", 8)
GAMEINFOKEY_STRINGARRAY(finalePages, "finalePage", 8, true) GAMEINFOKEY_STRINGARRAY(finalePages, "finalePage", 8, true)
GAMEINFOKEY_STRINGARRAY(infoPages, "addinfoPage", 8, false) GAMEINFOKEY_STRINGARRAY(infoPages, "addinfoPage", 8, false)
@ -309,7 +323,7 @@ void FMapInfoParser::ParseGameInfo()
GAMEINFOKEY_COLOR(defaultbloodparticlecolor, "defaultbloodparticlecolor") GAMEINFOKEY_COLOR(defaultbloodparticlecolor, "defaultbloodparticlecolor")
GAMEINFOKEY_STRING(backpacktype, "backpacktype") GAMEINFOKEY_STRING(backpacktype, "backpacktype")
GAMEINFOKEY_STRING(statusbar, "statusbar") GAMEINFOKEY_STRING(statusbar, "statusbar")
GAMEINFOKEY_STRING(intermissionMusic, "intermissionMusic") GAMEINFOKEY_MUSIC(intermissionMusic, intermissionOrder, "intermissionMusic")
GAMEINFOKEY_STRING(CursorPic, "CursorPic") GAMEINFOKEY_STRING(CursorPic, "CursorPic")
GAMEINFOKEY_BOOL(noloopfinalemusic, "noloopfinalemusic") GAMEINFOKEY_BOOL(noloopfinalemusic, "noloopfinalemusic")
GAMEINFOKEY_BOOL(drawreadthis, "drawreadthis") GAMEINFOKEY_BOOL(drawreadthis, "drawreadthis")

View file

@ -91,11 +91,13 @@ struct gameinfo_t
TArray<FName> PlayerClasses; TArray<FName> PlayerClasses;
FString titleMusic; FString titleMusic;
int titleOrder;
float titleTime; float titleTime;
float advisoryTime; float advisoryTime;
float pageTime; float pageTime;
FString chatSound; FString chatSound;
FString finaleMusic; FString finaleMusic;
int finaleOrder;
char finaleFlat[9]; char finaleFlat[9];
char borderFlat[9]; char borderFlat[9];
char SkyFlatName[9]; char SkyFlatName[9];
@ -114,6 +116,7 @@ struct gameinfo_t
FString backpacktype; FString backpacktype;
FString statusbar; FString statusbar;
FString intermissionMusic; FString intermissionMusic;
int intermissionOrder;
FString CursorPic; FString CursorPic;
DWORD dimcolor; DWORD dimcolor;
float dimamount; float dimamount;

View file

@ -42,11 +42,6 @@
extern FStringTable GStrings; extern FStringTable GStrings;
// QuitGame messages
#define NUM_QUITDOOMMESSAGES 14
#define NUM_QUITSTRIFEMESSAGES 8
#define NUM_QUITCHEXMESSAGES 7
extern const char *endmsg[]; extern const char *endmsg[];

View file

@ -80,7 +80,7 @@ void DIntermissionScreen::Init(FIntermissionAction *desc, bool first)
if (desc->mMusic.IsEmpty()) if (desc->mMusic.IsEmpty())
{ {
// only start the default music if this is the first action in an intermission // only start the default music if this is the first action in an intermission
if (first) S_ChangeMusic (gameinfo.finaleMusic, 0, desc->mMusicLooping); if (first) S_ChangeMusic (gameinfo.finaleMusic, gameinfo.finaleOrder, desc->mMusicLooping);
} }
else else
{ {

View file

@ -311,6 +311,7 @@ void cht_DoCheat (player_t *player, int cheat)
player->mo->flags4 = player->mo->GetDefault()->flags4; player->mo->flags4 = player->mo->GetDefault()->flags4;
player->mo->flags5 = player->mo->GetDefault()->flags5; player->mo->flags5 = player->mo->GetDefault()->flags5;
player->mo->flags6 = player->mo->GetDefault()->flags6; player->mo->flags6 = player->mo->GetDefault()->flags6;
player->mo->flags7 = player->mo->GetDefault()->flags7;
player->mo->renderflags &= ~RF_INVISIBLE; player->mo->renderflags &= ~RF_INVISIBLE;
player->mo->height = player->mo->GetDefault()->height; player->mo->height = player->mo->GetDefault()->height;
player->mo->radius = player->mo->GetDefault()->radius; player->mo->radius = player->mo->GetDefault()->radius;

View file

@ -207,7 +207,7 @@ bool DMenu::MouseEventBack(int type, int x, int y)
{ {
if (m_show_backbutton >= 0) if (m_show_backbutton >= 0)
{ {
FTexture *tex = TexMan[gameinfo.mBackButton]; FTexture *tex = TexMan(gameinfo.mBackButton);
if (tex != NULL) if (tex != NULL)
{ {
if (m_show_backbutton&1) x -= screen->GetWidth() - tex->GetScaledWidth() * CleanXfac; if (m_show_backbutton&1) x -= screen->GetWidth() - tex->GetScaledWidth() * CleanXfac;
@ -263,7 +263,7 @@ void DMenu::Drawer ()
{ {
if (this == DMenu::CurrentMenu && BackbuttonAlpha > 0 && m_show_backbutton >= 0 && m_use_mouse) if (this == DMenu::CurrentMenu && BackbuttonAlpha > 0 && m_show_backbutton >= 0 && m_use_mouse)
{ {
FTexture *tex = TexMan[gameinfo.mBackButton]; FTexture *tex = TexMan(gameinfo.mBackButton);
int w = tex->GetScaledWidth() * CleanXfac; int w = tex->GetScaledWidth() * CleanXfac;
int h = tex->GetScaledHeight() * CleanYfac; int h = tex->GetScaledHeight() * CleanYfac;
int x = (!(m_show_backbutton&1))? 0:screen->GetWidth() - w; int x = (!(m_show_backbutton&1))? 0:screen->GetWidth() - w;
@ -909,6 +909,11 @@ CCMD (openmenu)
M_SetMenu(argv[1], -1); M_SetMenu(argv[1], -1);
} }
CCMD (closemenu)
{
M_ClearMenus();
}
// //
// Toggle messages on/off // Toggle messages on/off
// //

View file

@ -763,7 +763,7 @@ public:
: FOptionMenuItem(label, menu) : FOptionMenuItem(label, menu)
{ {
FBaseCVar *cv = FindCVar(menu, NULL); FBaseCVar *cv = FindCVar(menu, NULL);
if (cv->GetRealType() == CVAR_Color) if (cv != NULL && cv->GetRealType() == CVAR_Color)
{ {
mCVar = (FColorCVar*)cv; mCVar = (FColorCVar*)cv;
} }

View file

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

View file

@ -60,7 +60,7 @@
FDynamicColormap *F3DFloor::GetColormap() FDynamicColormap *F3DFloor::GetColormap()
{ {
// If there's no fog in either model or target sector this is easy and fast. // If there's no fog in either model or target sector this is easy and fast.
if ((target->ColorMap->Fade == 0 && model->ColorMap->Fade == 0) || (flags & FF_FADEWALLS)) if ((target->ColorMap->Fade == 0 && model->ColorMap->Fade == 0) || (flags & (FF_FADEWALLS|FF_FOG)))
{ {
return model->ColorMap; return model->ColorMap;
} }

View file

@ -46,6 +46,7 @@
#include "p_acs.h" #include "p_acs.h"
#include "p_saveg.h" #include "p_saveg.h"
#include "p_lnspec.h" #include "p_lnspec.h"
#include "p_enemy.h"
#include "m_random.h" #include "m_random.h"
#include "doomstat.h" #include "doomstat.h"
#include "c_console.h" #include "c_console.h"
@ -4232,6 +4233,8 @@ enum EACSFunctions
ACSF_PlayActorSound, ACSF_PlayActorSound,
ACSF_SpawnDecal, ACSF_SpawnDecal,
ACSF_CheckFont, ACSF_CheckFont,
ACSF_DropItem,
ACSF_CheckFlag,
// ZDaemon // ZDaemon
ACSF_GetTeamScore = 19620, // (int team) ACSF_GetTeamScore = 19620, // (int team)
@ -5230,6 +5233,49 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
// bool CheckFont(str fontname) // bool CheckFont(str fontname)
return V_GetFont(FBehavior::StaticLookupString(args[0])) != NULL; return V_GetFont(FBehavior::StaticLookupString(args[0])) != NULL;
case ACSF_DropItem:
{
const char *type = FBehavior::StaticLookupString(args[1]);
int amount = argCount >= 3? args[2] : -1;
int chance = argCount >= 4? args[3] : 256;
const PClass *cls = PClass::FindClass(type);
int cnt = 0;
if (cls != NULL)
{
if (args[0] == 0)
{
if (activator != NULL)
{
P_DropItem(activator, cls, amount, chance);
cnt++;
}
}
else
{
FActorIterator it(args[0]);
AActor *actor;
while ((actor = it.Next()) != NULL)
{
P_DropItem(actor, cls, amount, chance);
cnt++;
}
}
return cnt;
}
break;
}
case ACSF_CheckFlag:
{
AActor *actor = SingleActorFromTID(args[0], activator);
if (actor != NULL)
{
return !!CheckActorFlag(actor, FBehavior::StaticLookupString(args[1]));
}
break;
}
default: default:
break; break;
} }

View file

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

View file

@ -1425,6 +1425,9 @@ AActor *LookForEnemiesInBlock (AActor *lookee, int index, void *extparam)
if (!(link->flags3 & MF3_ISMONSTER)) if (!(link->flags3 & MF3_ISMONSTER))
continue; // don't target it if it isn't a monster (could be a barrel) continue; // don't target it if it isn't a monster (could be a barrel)
if (link->flags7 & MF7_NEVERTARGET)
continue;
other = NULL; other = NULL;
if (link->flags & MF_FRIENDLY) if (link->flags & MF_FRIENDLY)
{ {
@ -2656,6 +2659,7 @@ static bool P_CheckForResurrection(AActor *self, bool usevilestates)
corpsehit->flags4 = info->flags4; corpsehit->flags4 = info->flags4;
corpsehit->flags5 = info->flags5; corpsehit->flags5 = info->flags5;
corpsehit->flags6 = info->flags6; corpsehit->flags6 = info->flags6;
corpsehit->flags7 = info->flags7;
corpsehit->health = info->health; corpsehit->health = info->health;
corpsehit->target = NULL; corpsehit->target = NULL;
corpsehit->lastenemy = NULL; corpsehit->lastenemy = NULL;
@ -3131,6 +3135,7 @@ AInventory *P_DropItem (AActor *source, PClassActor *type, int dropamount, int c
{ {
AInventory *inv = static_cast<AInventory *>(mo); AInventory *inv = static_cast<AInventory *>(mo);
ModifyDropAmount(inv, dropamount); ModifyDropAmount(inv, dropamount);
inv->ItemFlags |= IF_TOSSED;
if (inv->SpecialDropAction (source)) if (inv->SpecialDropAction (source))
{ {
// The special action indicates that the item should not spawn // The special action indicates that the item should not spawn

View file

@ -1138,7 +1138,9 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
&& (pr_damagemobj()&1) && (pr_damagemobj()&1)
// [RH] But only if not too fast and not flying // [RH] But only if not too fast and not flying
&& thrust < 10*FRACUNIT && thrust < 10*FRACUNIT
&& !(target->flags & MF_NOGRAVITY)) && !(target->flags & MF_NOGRAVITY)
&& (inflictor == NULL || !(inflictor->flags5 & MF5_NOFORWARDFALL))
)
{ {
ang += ANG180; ang += ANG180;
thrust *= 4; thrust *= 4;
@ -1501,6 +1503,9 @@ bool AActor::OkayToSwitchTarget (AActor *other)
if (other == this) if (other == this)
return false; // [RH] Don't hate self (can happen when shooting barrels) return false; // [RH] Don't hate self (can happen when shooting barrels)
if (other->flags7 & MF7_NEVERTARGET)
return false; // never EVER target me!
if (!(other->flags & MF_SHOOTABLE)) if (!(other->flags & MF_SHOOTABLE))
return false; // Don't attack things that can't be hurt return false; // Don't attack things that can't be hurt

View file

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

View file

@ -334,8 +334,7 @@ bool P_TeleportMove (AActor *thing, fixed_t x, fixed_t y, fixed_t z, bool telefr
spechit.Clear (); spechit.Clear ();
bool StompAlwaysFrags = (thing->flags2 & MF2_TELESTOMP) || bool StompAlwaysFrags = ((thing->flags2 & MF2_TELESTOMP) || (level.flags & LEVEL_MONSTERSTELEFRAG) || telefrag) && !(thing->flags7 & MF7_NOTELESTOMP);
(level.flags & LEVEL_MONSTERSTELEFRAG) || telefrag;
FBoundingBox box(x, y, thing->radius); FBoundingBox box(x, y, thing->radius);
FBlockLinesIterator it(box); FBlockLinesIterator it(box);
@ -383,7 +382,8 @@ bool P_TeleportMove (AActor *thing, fixed_t x, fixed_t y, fixed_t z, bool telefr
// monsters don't stomp things except on boss level // monsters don't stomp things except on boss level
// [RH] Some Heretic/Hexen monsters can telestomp // [RH] Some Heretic/Hexen monsters can telestomp
if (StompAlwaysFrags && !(th->flags6 & MF6_NOTELEFRAG)) // ... and some items can never be telefragged while others will be telefragged by everything that teleports upon them.
if ((StompAlwaysFrags && !(th->flags6 & MF6_NOTELEFRAG)) || (th->flags7 & MF7_ALWAYSTELEFRAG))
{ {
P_DamageMobj (th, thing, thing, TELEFRAG_DAMAGE, NAME_Telefrag, DMG_THRUSTLESS); P_DamageMobj (th, thing, thing, TELEFRAG_DAMAGE, NAME_Telefrag, DMG_THRUSTLESS);
continue; continue;
@ -3563,7 +3563,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
else tflags = TRACE_NoSky|TRACE_Impact; else tflags = TRACE_NoSky|TRACE_Impact;
if (!Trace (t1->x, t1->y, shootz, t1->Sector, vx, vy, vz, distance, 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)) tflags, hitGhosts ? CheckForGhost : CheckForSpectral))
{ // hit nothing { // hit nothing
if (puffDefaults == NULL) if (puffDefaults == NULL)
@ -5050,6 +5050,15 @@ void PIT_FloorDrop (AActor *thing, FChangePosition *cpos)
P_CheckFakeFloorTriggers (thing, oldz); P_CheckFakeFloorTriggers (thing, oldz);
} }
} }
else if ((thing->z != oldfloorz && !(thing->flags & MF_NOLIFTDROP)))
{
fixed_t oldz = thing->z;
if ((thing->flags & MF_NOGRAVITY) && (thing->flags6 & MF6_RELATIVETOFLOOR))
{
thing->z = thing->z - oldfloorz + thing->floorz;
P_CheckFakeFloorTriggers (thing, oldz);
}
}
} }
//============================================================================= //=============================================================================
@ -5061,6 +5070,7 @@ void PIT_FloorDrop (AActor *thing, FChangePosition *cpos)
void PIT_FloorRaise (AActor *thing, FChangePosition *cpos) void PIT_FloorRaise (AActor *thing, FChangePosition *cpos)
{ {
fixed_t oldfloorz = thing->floorz; fixed_t oldfloorz = thing->floorz;
fixed_t oldz = thing->z;
P_AdjustFloorCeil (thing, cpos); P_AdjustFloorCeil (thing, cpos);
@ -5075,8 +5085,17 @@ void PIT_FloorRaise (AActor *thing, FChangePosition *cpos)
return; // do not move bridge things return; // do not move bridge things
} }
intersectors.Clear (); intersectors.Clear ();
fixed_t oldz = thing->z;
thing->z = thing->floorz; thing->z = thing->floorz;
}
else
{
if((thing->flags & MF_NOGRAVITY) && (thing->flags6 & MF6_RELATIVETOFLOOR))
{
intersectors.Clear ();
thing->z = thing->z - oldfloorz + thing->floorz;
}
else return;
}
switch (P_PushUp (thing, cpos)) switch (P_PushUp (thing, cpos))
{ {
default: default:
@ -5092,7 +5111,6 @@ void PIT_FloorRaise (AActor *thing, FChangePosition *cpos)
break; break;
} }
} }
}
//============================================================================= //=============================================================================
// //

View file

@ -285,8 +285,12 @@ void AActor::Serialize (FArchive &arc)
<< flags3 << flags3
<< flags4 << flags4
<< flags5 << flags5
<< flags6 << flags6;
<< special1 if (SaveVersion >= 4504)
{
arc << flags7;
}
arc << special1
<< special2 << special2
<< health << health
<< movedir << movedir
@ -921,7 +925,7 @@ void AActor::CopyFriendliness (AActor *other, bool changeTarget, bool resetHealt
flags4 = (flags4 & ~(MF4_NOHATEPLAYERS | MF4_BOSSSPAWNED)) | (other->flags4 & (MF4_NOHATEPLAYERS | MF4_BOSSSPAWNED)); flags4 = (flags4 & ~(MF4_NOHATEPLAYERS | MF4_BOSSSPAWNED)) | (other->flags4 & (MF4_NOHATEPLAYERS | MF4_BOSSSPAWNED));
FriendPlayer = other->FriendPlayer; FriendPlayer = other->FriendPlayer;
DesignatedTeam = other->DesignatedTeam; DesignatedTeam = other->DesignatedTeam;
if (changeTarget && other->target != NULL && !(other->target->flags3 & MF3_NOTARGET)) if (changeTarget && other->target != NULL && !(other->target->flags3 & MF3_NOTARGET) && !(other->target->flags7 & MF7_NEVERTARGET))
{ {
// LastHeard must be set as well so that A_Look can react to the new target if called // LastHeard must be set as well so that A_Look can react to the new target if called
LastHeard = target = other->target; LastHeard = target = other->target;
@ -4822,6 +4826,10 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
mobj->SpawnPoint[2] = mthing->z; mobj->SpawnPoint[2] = mthing->z;
mobj->SpawnAngle = mthing->angle; mobj->SpawnAngle = mthing->angle;
mobj->SpawnFlags = mthing->flags; 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); P_FindFloorCeiling(mobj, FFCF_SAMESECTOR | FFCF_ONLY3DFLOORS | FFCF_3DRESTRICT);
if (!(mobj->flags2 & MF2_ARGSDEFINED)) if (!(mobj->flags2 & MF2_ARGSDEFINED))
@ -6227,6 +6235,9 @@ void PrintMiscActorInfo(AActor *query)
Printf("\n\tflags6: %x", query->flags6); Printf("\n\tflags6: %x", query->flags6);
for (flagi = 0; flagi <= 31; flagi++) for (flagi = 0; flagi <= 31; flagi++)
if (query->flags6 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags6)); if (query->flags6 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags6));
Printf("\n\tflags7: %x", query->flags7);
for (flagi = 0; flagi <= 31; flagi++)
if (query->flags7 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags7));
Printf("\nBounce flags: %x\nBounce factors: f:%f, w:%f", Printf("\nBounce flags: %x\nBounce factors: f:%f, w:%f",
query->BounceFlags, FIXED2FLOAT(query->bouncefactor), query->BounceFlags, FIXED2FLOAT(query->bouncefactor),
FIXED2FLOAT(query->wallbouncefactor)); FIXED2FLOAT(query->wallbouncefactor));

View file

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

View file

@ -452,6 +452,7 @@ bool P_Thing_Raise(AActor *thing)
thing->flags4 = info->flags4; thing->flags4 = info->flags4;
thing->flags5 = info->flags5; thing->flags5 = info->flags5;
thing->flags6 = info->flags6; thing->flags6 = info->flags6;
thing->flags7 = info->flags7;
thing->health = info->health; thing->health = info->health;
thing->target = NULL; thing->target = NULL;
thing->lastenemy = NULL; thing->lastenemy = NULL;

View file

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

View file

@ -828,7 +828,7 @@ void R_RenderFakeWallRange (drawseg_t *ds, int x1, int x2)
{ {
if (sclipTop <= backsector->e->XFloor.lightlist[j].plane.Zat0()) if (sclipTop <= backsector->e->XFloor.lightlist[j].plane.Zat0())
{ {
lightlist_t *lit = &backsector->e->XFloor.lightlist[i]; lightlist_t *lit = &backsector->e->XFloor.lightlist[j];
basecolormap = lit->extra_colormap; basecolormap = lit->extra_colormap;
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *lit->p_lightlevel, lit->lightsource == NULL) + r_actualextralight); wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *lit->p_lightlevel, lit->lightsource == NULL) + r_actualextralight);
break; break;

View file

@ -31,6 +31,7 @@ bool CheckDeprecatedFlags(const AActor *actor, PClassActor *info, int index);
const char *GetFlagName(unsigned int flagnum, int flagoffset); const char *GetFlagName(unsigned int flagnum, int flagoffset);
void ModActorFlag(AActor *actor, FFlagDef *fd, bool set); void ModActorFlag(AActor *actor, FFlagDef *fd, bool set);
INTBOOL CheckActorFlag(const AActor *actor, FFlagDef *fd); INTBOOL CheckActorFlag(const AActor *actor, FFlagDef *fd);
INTBOOL CheckActorFlag(const AActor *owner, const char *flagname, bool printerror = true);
#define FLAG_NAME(flagnum, flagvar) GetFlagName(flagnum, myoffsetof(AActor, flagvar)) #define FLAG_NAME(flagnum, flagvar) GetFlagName(flagnum, myoffsetof(AActor, flagvar))

View file

@ -4016,31 +4016,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckFlag)
return numret; return numret;
} }
long dot = flagname.IndexOf('.'); if (CheckActorFlag(owner, flagname))
FFlagDef *fd;
PClassActor *cls = owner->GetClass();
if (dot >= 0)
{
FString part1(flagname.Left(dot));
fd = FindFlag(cls, part1, flagname.Mid(dot+1));
}
else
{
fd = FindFlag(cls, flagname, NULL);
}
if (fd != NULL)
{
if (CheckActorFlag(owner, fd))
{ {
ACTION_JUMP(jumpto); ACTION_JUMP(jumpto);
} }
}
else
{
Printf("Unknown flag '%s' in '%s'\n", flagname.GetChars(), cls->TypeName.GetChars());
}
return numret; return numret;
} }
@ -5225,3 +5204,19 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetDamageType)
self->DamageType = damagetype; self->DamageType = damagetype;
return 0; return 0;
} }
//==========================================================================
//
// A_DropItem
//
//==========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_DropItem)
{
ACTION_PARAM_START(3);
ACTION_PARAM_CLASS(spawntype, 0);
ACTION_PARAM_INT(amount, 1);
ACTION_PARAM_INT(chance, 2);
P_DropItem(self, spawntype, amount, chance);
}

View file

@ -184,6 +184,7 @@ static FFlagDef ActorFlags[]=
DEFINE_FLAG(MF5, DONTDRAIN, AActor, flags5), DEFINE_FLAG(MF5, DONTDRAIN, AActor, flags5),
DEFINE_FLAG(MF5, NODROPOFF, AActor, flags5), DEFINE_FLAG(MF5, NODROPOFF, AActor, flags5),
DEFINE_FLAG(MF5, NOFORWARDFALL, AActor, flags5),
DEFINE_FLAG(MF5, COUNTSECRET, AActor, flags5), DEFINE_FLAG(MF5, COUNTSECRET, AActor, flags5),
DEFINE_FLAG(MF5, NODAMAGE, AActor, flags5), DEFINE_FLAG(MF5, NODAMAGE, AActor, flags5),
DEFINE_FLAG(MF5, BLOODSPLATTER, AActor, flags5), DEFINE_FLAG(MF5, BLOODSPLATTER, AActor, flags5),
@ -233,6 +234,12 @@ static FFlagDef ActorFlags[]=
DEFINE_FLAG(MF6, DOHARMSPECIES, AActor, flags6), DEFINE_FLAG(MF6, DOHARMSPECIES, AActor, flags6),
DEFINE_FLAG(MF6, POISONALWAYS, AActor, flags6), DEFINE_FLAG(MF6, POISONALWAYS, AActor, flags6),
DEFINE_FLAG(MF6, NOTAUTOAIMED, AActor, flags6), DEFINE_FLAG(MF6, NOTAUTOAIMED, AActor, flags6),
DEFINE_FLAG(MF6, NOTONAUTOMAP, AActor, flags6),
DEFINE_FLAG(MF6, RELATIVETOFLOOR, AActor, flags6),
DEFINE_FLAG(MF7, NEVERTARGET, AActor, flags7),
DEFINE_FLAG(MF7, NOTELESTOMP, AActor, flags7),
DEFINE_FLAG(MF7, ALWAYSTELEFRAG, AActor, flags7),
// Effect flags // Effect flags
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects), DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
@ -302,6 +309,7 @@ static FFlagDef InventoryFlags[] =
DEFINE_FLAG(IF, RESTRICTABSOLUTELY, AInventory, ItemFlags), DEFINE_FLAG(IF, RESTRICTABSOLUTELY, AInventory, ItemFlags),
DEFINE_FLAG(IF, NEVERRESPAWN, AInventory, ItemFlags), DEFINE_FLAG(IF, NEVERRESPAWN, AInventory, ItemFlags),
DEFINE_FLAG(IF, NOSCREENFLASH, AInventory, ItemFlags), DEFINE_FLAG(IF, NOSCREENFLASH, AInventory, ItemFlags),
DEFINE_FLAG(IF, TOSSED, AInventory, ItemFlags),
DEFINE_DEPRECATED_FLAG(PICKUPFLASH), DEFINE_DEPRECATED_FLAG(PICKUPFLASH),
DEFINE_DEPRECATED_FLAG(INTERHUBSTRIP),}; DEFINE_DEPRECATED_FLAG(INTERHUBSTRIP),};

View file

@ -194,6 +194,33 @@ INTBOOL CheckActorFlag(const AActor *owner, FFlagDef *fd)
#endif #endif
} }
INTBOOL CheckActorFlag(const AActor *owner, const char *flagname, bool printerror)
{
const char *dot = strchr (flagname, '.');
FFlagDef *fd;
const PClass *cls = owner->GetClass();
if (dot != NULL)
{
FString part1(flagname, dot-flagname);
fd = FindFlag (cls, part1, dot+1);
}
else
{
fd = FindFlag (cls, flagname, NULL);
}
if (fd != NULL)
{
return CheckActorFlag(owner, fd);
}
else
{
if (printerror) Printf("Unknown flag '%s' in '%s'\n", flagname, cls->TypeName.GetChars());
return false;
}
}
//=========================================================================== //===========================================================================
// //
// HandleDeprecatedFlags // HandleDeprecatedFlags
@ -1323,7 +1350,8 @@ DEFINE_PROPERTY(clearflags, 0, Actor)
defaults->flags3 = defaults->flags3 =
defaults->flags4 = defaults->flags4 =
defaults->flags5 = defaults->flags5 =
defaults->flags6 = 0; defaults->flags6 =
defaults->flags7 = 0;
defaults->flags2 &= MF2_ARGSDEFINED; // this flag must not be cleared defaults->flags2 &= MF2_ARGSDEFINED; // this flag must not be cleared
} }
@ -2157,9 +2185,8 @@ DEFINE_CLASS_PROPERTY_PREFIX(powerup, strength, F, Inventory)
I_Error("\"powerup.strength\" requires an actor of type \"Powerup\"\n"); I_Error("\"powerup.strength\" requires an actor of type \"Powerup\"\n");
return; return;
} }
// Puts a percent value in the 0.0..1.0 range
PROP_FIXED_PARM(f, 0); PROP_FIXED_PARM(f, 0);
*pStrength = f / 100; *pStrength = f;
} }
//========================================================================== //==========================================================================

View file

@ -76,7 +76,7 @@ const char *GetVersionString();
// Use 4500 as the base git save version, since it's higher than the // Use 4500 as the base git save version, since it's higher than the
// SVN revision ever got. // SVN revision ever got.
#define SAVEVER 4503 #define SAVEVER 4504
#define SAVEVERSTRINGIFY2(x) #x #define SAVEVERSTRINGIFY2(x) #x
#define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x) #define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x)

View file

@ -1947,7 +1947,7 @@ void WI_Ticker(void)
if (level.info->InterMusic.IsNotEmpty()) if (level.info->InterMusic.IsNotEmpty())
S_ChangeMusic(level.info->InterMusic, level.info->intermusicorder); S_ChangeMusic(level.info->InterMusic, level.info->intermusicorder);
else else
S_ChangeMusic (gameinfo.intermissionMusic.GetChars()); S_ChangeMusic (gameinfo.intermissionMusic.GetChars(), gameinfo.intermissionOrder);
} }

View file

@ -300,6 +300,7 @@ ACTOR Actor native //: Thinker
action native A_Quake(int intensity, int duration, int damrad, int tremrad, sound sfx = "world/quake"); action native A_Quake(int intensity, int duration, int damrad, int tremrad, sound sfx = "world/quake");
action native A_SetTics(int tics); action native A_SetTics(int tics);
action native A_SetDamageType(name damagetype); action native A_SetDamageType(name damagetype);
action native A_DropItem(class<Actor> item, int dropamount = -1, int chance = 256);
action native A_CheckSightOrRange(float distance, state label); action native A_CheckSightOrRange(float distance, state label);
action native A_CheckRange(float distance, state label); action native A_CheckRange(float distance, state label);

View file

@ -300,6 +300,7 @@ ACTOR PowerDrain : Powerup native
ACTOR PowerRegeneration : Powerup native ACTOR PowerRegeneration : Powerup native
{ {
Powerup.Duration -120 Powerup.Duration -120
Powerup.Strength 5
} }
ACTOR PowerHighJump : Powerup native {} ACTOR PowerHighJump : Powerup native {}

View file

@ -20,6 +20,7 @@ ACTOR AlienSpectre1 : SpectralMonster 129
PainSound "alienspectre/pain" PainSound "alienspectre/pain"
DeathSound "alienspectre/death" DeathSound "alienspectre/death"
ActiveSound "alienspectre/active" ActiveSound "alienspectre/active"
Obituary "$OB_ALIENSPECTRE"
+NOGRAVITY +NOGRAVITY
+FLOAT +FLOAT
+SHADOW +SHADOW

View file

@ -736,7 +736,7 @@ OB_MACIL = "%o should have never rebelled against Macil.";
OB_REBEL = "%o was gunned down by a Rebel."; OB_REBEL = "%o was gunned down by a Rebel.";
OB_BEGGAR = "%o was beaten to death by the poor."; OB_BEGGAR = "%o was beaten to death by the poor.";
OB_PEASANT = "%o should have never picked a fight with a civilian."; OB_PEASANT = "%o should have never picked a fight with a civilian.";
OB_ALIENSPECTE = "%o was struck down by the Spectre."; OB_ALIENSPECTRE = "%o was struck down by the Spectre.";
OB_ENTITY = "%o felt the wrath of The One God."; OB_ENTITY = "%o felt the wrath of The One God.";
OB_LOREMASTER = "%o couldn't escape from the Lore Master's grasp."; OB_LOREMASTER = "%o couldn't escape from the Lore Master's grasp.";
OB_PROGRAMMER = "%o was deleted by the Programmer."; OB_PROGRAMMER = "%o was deleted by the Programmer.";

View file

@ -779,7 +779,7 @@ OB_MACIL = "%o n'aurait jamais du se rebelle contre Macil.";
OB_REBEL = "%o a ete abbatu par un Rebel."; OB_REBEL = "%o a ete abbatu par un Rebel.";
OB_BEGGAR = "%o a ete battu a mort par un pauvre."; OB_BEGGAR = "%o a ete battu a mort par un pauvre.";
OB_PEASANT = "%o n'aurait jamais du chercher la bagarre a un civil."; OB_PEASANT = "%o n'aurait jamais du chercher la bagarre a un civil.";
OB_ALIENSPECTE = "%o a ete terrasse par le Spectre."; OB_ALIENSPECTRE = "%o a ete terrasse par le Spectre.";
OB_ENTITY = "%o a senti le courroux du dieu unique."; OB_ENTITY = "%o a senti le courroux du dieu unique.";
OB_LOREMASTER = "%o n'a pu echapper a l'emprise du Maitre des Traditions."; OB_LOREMASTER = "%o n'a pu echapper a l'emprise du Maitre des Traditions.";
OB_PROGRAMMER = "%o a ete efface par le Programmer."; OB_PROGRAMMER = "%o a ete efface par le Programmer.";

View file

@ -712,7 +712,7 @@ OB_MACIL = "%o should have never rebelled against Macil.";
OB_REBEL = "%o was gunned down by a Rebel."; OB_REBEL = "%o was gunned down by a Rebel.";
OB_BEGGAR = "%o was beaten to death by the poor."; OB_BEGGAR = "%o was beaten to death by the poor.";
OB_PEASANT = "%o should have never picked a fight with a civilian."; OB_PEASANT = "%o should have never picked a fight with a civilian.";
OB_ALIENSPECTE = "%o was struck down by the Spectre."; OB_ALIENSPECTRE = "%o was struck down by the Spectre.";
OB_ENTITY = "%o felt the wrath of The One God."; OB_ENTITY = "%o felt the wrath of The One God.";
OB_LOREMASTER = "%o couldn't escape from the Lore Master's grasp."; OB_LOREMASTER = "%o couldn't escape from the Lore Master's grasp.";
OB_PROGRAMMER = "%o was deleted by the Programmer."; OB_PROGRAMMER = "%o was deleted by the Programmer.";

View file

@ -1019,6 +1019,7 @@ OptionMenu MapColorMenu
ColorPicker "Secret walls", "am_secretwallcolor" ColorPicker "Secret walls", "am_secretwallcolor"
ColorPicker "Actors", "am_thingcolor" ColorPicker "Actors", "am_thingcolor"
ColorPicker "Monsters", "am_thingcolor_monster" ColorPicker "Monsters", "am_thingcolor_monster"
ColorPicker "non-counting Monsters", "am_thingcolor_ncmonster"
ColorPicker "Friends", "am_thingcolor_friend" ColorPicker "Friends", "am_thingcolor_friend"
ColorPicker "Items", "am_thingcolor_item" ColorPicker "Items", "am_thingcolor_item"
ColorPicker "Count Items", "am_thingcolor_citem" ColorPicker "Count Items", "am_thingcolor_citem"
@ -1041,6 +1042,7 @@ OptionMenu MapColorMenu
ColorPicker "Secret walls", "am_ovsecretwallcolor" ColorPicker "Secret walls", "am_ovsecretwallcolor"
ColorPicker "Actors", "am_ovthingcolor" ColorPicker "Actors", "am_ovthingcolor"
ColorPicker "Monsters", "am_ovthingcolor_monster" ColorPicker "Monsters", "am_ovthingcolor_monster"
ColorPicker "non-counting Monsters", "am_ovthingcolor_ncmonster"
ColorPicker "Friends", "am_ovthingcolor_friend" ColorPicker "Friends", "am_ovthingcolor_friend"
ColorPicker "Items", "am_ovthingcolor_item" ColorPicker "Items", "am_ovthingcolor_item"
ColorPicker "Count Items", "am_ovthingcolor_citem" ColorPicker "Count Items", "am_ovthingcolor_citem"