From 170b633e91798cc263e6e52a0c13eac7b009ede6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 29 Oct 2007 22:15:46 +0000 Subject: [PATCH] - added two new things which can set a sector's color without the need of tags or scripts. ColorSetter (#9038) sets the sector's color and FadeSetter (#9039) sets the fog color. - added new flags MF5_ALWAYSFAST and MF5_NEVERFAST. These flags unconditionally enable or disable fast movement logic, regardless of skill settings. - added an abstraction layer for skill related settings. This is a preparation for implementing custom skill definitions but right now all it does is returning the original values but keeping the related information all in one place SVN r557 (trunk) --- docs/rh-log.txt | 11 +++++ src/actor.h | 3 ++ src/c_cmds.cpp | 4 +- src/doomstat.h | 3 -- src/g_doom/a_bossbrain.cpp | 2 +- src/g_game.cpp | 1 - src/g_level.cpp | 68 +++++++++++++++++++++------- src/g_level.h | 15 ++++++ src/g_shared/a_pickups.cpp | 32 ++----------- src/g_shared/a_setcolor.cpp | 42 +++++++++++++++++ src/g_shared/a_weapons.cpp | 16 +------ src/p_enemy.cpp | 11 ++--- src/p_interaction.cpp | 21 ++++----- src/p_lnspec.cpp | 6 +-- src/p_mobj.cpp | 33 ++++++-------- src/p_sectors.cpp | 13 ++++++ src/r_defs.h | 2 + src/thingdef/thingdef_properties.cpp | 2 + zdoom.vcproj | 4 ++ 19 files changed, 185 insertions(+), 104 deletions(-) create mode 100644 src/g_shared/a_setcolor.cpp diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 906778675b..6f1bce8070 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,14 @@ +October 29, 2007 (Changes by Graf Zahl) +- added two new things which can set a sector's color without the need of tags + or scripts. ColorSetter (#9038) sets the sector's color and FadeSetter (#9039) + sets the fog color. +- added new flags MF5_ALWAYSFAST and MF5_NEVERFAST. These flags unconditionally + enable or disable fast movement logic, regardless of skill settings. +- added an abstraction layer for skill related settings. This is a preparation + for implementing custom skill definitions but right now all it does is + returning the original values but keeping the related information all in one + place + October 28, 2007 (Changes by Graf Zahl) - Fixed: The pointer cleanup code must also check a sector's sky box pointers. diff --git a/src/actor.h b/src/actor.h index 7f96fba046..ce462c5ca3 100644 --- a/src/actor.h +++ b/src/actor.h @@ -291,6 +291,8 @@ enum MF5_NOBLOODDECALS = 0x00001000, // Actor bleeds but doesn't spawn blood decals MF5_USESPECIAL = 0x00002000, // Actor executes its special when being 'used'. MF5_NOPAIN = 0x00004000, // If set the pain state won't be entered + MF5_ALWAYSFAST = 0x00008000, // always uses 'fast' attacking logic + MF5_NEVERFAST = 0x00010000, // never uses 'fast' attacking logic // --- mobj.renderflags --- @@ -757,6 +759,7 @@ public: bool SetState (FState *newstate); bool SetStateNF (FState *newstate); virtual bool UpdateWaterLevel (fixed_t oldz, bool splash=true); + bool isFast(); FState *FindState (FName label) const; FState *FindState (FName label, FName sublabel, bool exact = false) const; diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp index 460519dffc..609e650406 100644 --- a/src/c_cmds.cpp +++ b/src/c_cmds.cpp @@ -79,7 +79,7 @@ CCMD (toggleconsole) bool CheckCheatmode () { - if (((gameskill == sk_nightmare) || netgame || deathmatch) && (!sv_cheats)) + if ((G_SkillProperty(SKILLP_DisableCheats) || netgame || deathmatch) && (!sv_cheats)) { Printf ("sv_cheats must be true to enable this command.\n"); return true; @@ -230,7 +230,7 @@ CCMD (chase) } else { - if (deathmatch && CheckCheatmode ()) + if (gamestate == GS_LEVEL && deathmatch && CheckCheatmode ()) return; Net_WriteByte (DEM_GENERICCHEAT); diff --git a/src/doomstat.h b/src/doomstat.h index 24d5021cf5..32fbe31d96 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -76,9 +76,6 @@ extern bool autostart; EXTERN_CVAR (Int, gameskill); extern int NextSkill; // [RH] Skill to use at next level load -// Nightmare mode flag, single player. -extern int respawnmonsters; - // Netgame? Only true if >1 player. extern bool netgame; diff --git a/src/g_doom/a_bossbrain.cpp b/src/g_doom/a_bossbrain.cpp index 40b9968f95..5461a0338e 100644 --- a/src/g_doom/a_bossbrain.cpp +++ b/src/g_doom/a_bossbrain.cpp @@ -339,7 +339,7 @@ ABossTarget *DBrainState::GetTarget () { Easy = !Easy; - if (gameskill <= sk_easy && !Easy) + if (G_SkillProperty(SKILLP_EasyBossBrain) && !Easy) return NULL; ABossTarget *target; diff --git a/src/g_game.cpp b/src/g_game.cpp index 37ea5408e9..cd14ff666a 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -106,7 +106,6 @@ CVAR (Bool, storesavepic, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) gameaction_t gameaction; gamestate_t gamestate = GS_STARTUP; -int respawnmonsters; int paused; bool sendpause; // send a pause event next tic diff --git a/src/g_level.cpp b/src/g_level.cpp index 749eeb6949..73293e8343 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -1549,23 +1549,8 @@ void G_InitNew (const char *mapname, bool bTitleLevel) } delete map; - if (dmflags & DF_MONSTERS_RESPAWN) - { - respawnmonsters = TICRATE; - } - else if (gameinfo.gametype & (GAME_Doom|GAME_Strife) && gameskill == sk_nightmare) - { - respawnmonsters = TICRATE; - } - else - { - respawnmonsters = 0; - } - // Monsters wait longer before respawning in Strife. - respawnmonsters *= gameinfo.gametype != GAME_Strife ? 12 : 16; - oldSpeed = GameSpeed; - wantFast = (dmflags & DF_FAST_MONSTERS) || (gameskill == sk_nightmare); + wantFast = !!G_SkillProperty(SKILLP_FastMonsters); GameSpeed = wantFast ? SPEED_Fast : SPEED_Normal; if (oldSpeed != GameSpeed) @@ -3028,3 +3013,54 @@ static void InitPlayerClasses () } } } + + +int G_SkillProperty(ESkillProperty prop) +{ + switch(prop) + { + case SKILLP_AmmoFactor: + if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) + { + if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) + return FRACUNIT; + else + return FRACUNIT*3/2; + } + return FRACUNIT; + + case SKILLP_DamageFactor: + if (gameskill == sk_baby) return FRACUNIT/2; + return FRACUNIT; + + case SKILLP_FastMonsters: + return (gameskill == sk_nightmare || (dmflags & DF_FAST_MONSTERS)); + + case SKILLP_Respawn: + if (dmflags & DF_MONSTERS_RESPAWN || + gameinfo.gametype & (GAME_DoomStrife) && gameskill == sk_nightmare) + { + return TICRATE * (gameinfo.gametype != GAME_Strife ? 12 : 16); + } + else + { + return 0; + } + + case SKILLP_Aggressiveness: + return FRACUNIT; + + case SKILLP_DisableCheats: + return gameskill == sk_nightmare; + + case SKILLP_AutoUseHealth: + return gameskill == sk_baby; + + case SKILLP_EasyBossBrain: + return gameskill == sk_baby; + + case SKILLP_SpawnFilter: + return gameskill <= sk_easy? MTF_EASY : gameskill == sk_medium? MTF_NORMAL : MTF_HARD; + } + return 0; +} diff --git a/src/g_level.h b/src/g_level.h index 11db77d1f2..9021418587 100644 --- a/src/g_level.h +++ b/src/g_level.h @@ -354,4 +354,19 @@ struct PNGHandle; void G_ReadSnapshots (PNGHandle *png); void G_WriteSnapshots (FILE *file); +enum ESkillProperty +{ + SKILLP_AmmoFactor, + SKILLP_DamageFactor, + SKILLP_FastMonsters, + SKILLP_Respawn, + SKILLP_Aggressiveness, + SKILLP_DisableCheats, + SKILLP_AutoUseHealth, + SKILLP_SpawnFilter, + SKILLP_EasyBossBrain, +}; +int G_SkillProperty(ESkillProperty prop); + + #endif //__G_LEVEL_H__ diff --git a/src/g_shared/a_pickups.cpp b/src/g_shared/a_pickups.cpp index c0ec0bb832..963150db6e 100644 --- a/src/g_shared/a_pickups.cpp +++ b/src/g_shared/a_pickups.cpp @@ -79,13 +79,7 @@ bool AAmmo::HandlePickup (AInventory *item) if (!(item->ItemFlags&IF_IGNORESKILL)) { // extra ammo in baby mode and nightmare mode - if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) - { - if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) - receiving += receiving; - else - receiving += receiving >> 1; - } + receiving = FixedMul(receiving, G_SkillProperty(SKILLP_AmmoFactor)); } int oldamount = Amount; Amount += receiving; @@ -138,13 +132,7 @@ AInventory *AAmmo::CreateCopy (AActor *other) // extra ammo in baby mode and nightmare mode if (!(ItemFlags&IF_IGNORESKILL)) { - if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) - { - if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) - amount <<= 1; - else - amount += amount >> 1; - } + amount = FixedMul(amount, G_SkillProperty(SKILLP_AmmoFactor)); } if (GetClass()->ParentClass != RUNTIME_CLASS(AAmmo)) @@ -1517,13 +1505,7 @@ AInventory *ABackpackItem::CreateCopy (AActor *other) // extra ammo in baby mode and nightmare mode if (!(ItemFlags&IF_IGNORESKILL)) { - if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) - { - if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) - amount <<= 1; - else - amount += amount >> 1; - } + amount = FixedMul(amount, G_SkillProperty(SKILLP_AmmoFactor)); } if (ammo == NULL) { // The player did not have the ammo. Add it. @@ -1578,13 +1560,7 @@ bool ABackpackItem::HandlePickup (AInventory *item) // extra ammo in baby mode and nightmare mode if (!(item->ItemFlags&IF_IGNORESKILL)) { - if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) - { - if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) - amount <<= 1; - else - amount += amount >> 1; - } + amount = FixedMul(amount, G_SkillProperty(SKILLP_AmmoFactor)); } probe->Amount += amount; if (probe->Amount > probe->MaxAmount) diff --git a/src/g_shared/a_setcolor.cpp b/src/g_shared/a_setcolor.cpp new file mode 100644 index 0000000000..bad0cbb8b9 --- /dev/null +++ b/src/g_shared/a_setcolor.cpp @@ -0,0 +1,42 @@ +#include "r_defs.h" +#include "actor.h" +#include "info.h" + +class AColorSetter : public AActor +{ + DECLARE_STATELESS_ACTOR(AColorSetter, AActor) + + void PostBeginPlay() + { + Super::PostBeginPlay(); + Sector->SetColor(args[0], args[1], args[2], args[3]); + Destroy(); + } + +}; + +IMPLEMENT_STATELESS_ACTOR(AColorSetter, Any, 9038, 0) + PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY) + PROP_Flags3 (MF3_DONTSPLASH) + PROP_RenderStyle (STYLE_None) +END_DEFAULTS + + +class AFadeSetter : public AActor +{ + DECLARE_STATELESS_ACTOR(AFadeSetter, AActor) + + void PostBeginPlay() + { + Super::PostBeginPlay(); + Sector->SetFade(args[0], args[1], args[2]); + Destroy(); + } + +}; + +IMPLEMENT_STATELESS_ACTOR(AFadeSetter, Any, 9039, 0) + PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY) + PROP_Flags3 (MF3_DONTSPLASH) + PROP_RenderStyle (STYLE_None) +END_DEFAULTS diff --git a/src/g_shared/a_weapons.cpp b/src/g_shared/a_weapons.cpp index b3deed82bd..6cdcab3fe7 100644 --- a/src/g_shared/a_weapons.cpp +++ b/src/g_shared/a_weapons.cpp @@ -257,13 +257,7 @@ AAmmo *AWeapon::AddAmmo (AActor *other, const PClass *ammotype, int amount) // extra ammo in baby mode and nightmare mode if (!(this->ItemFlags&IF_IGNORESKILL)) { - if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) - { - if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) - amount += amount; - else - amount += amount >> 1; - } + amount = FixedMul(amount, G_SkillProperty(SKILLP_AmmoFactor)); } ammo = static_cast(other->FindInventory (ammotype)); if (ammo == NULL) @@ -298,13 +292,7 @@ bool AWeapon::AddExistingAmmo (AAmmo *ammo, int amount) // extra ammo in baby mode and nightmare mode if (!(ItemFlags&IF_IGNORESKILL)) { - if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife)) - { - if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) - amount += amount; - else - amount += amount >> 1; - } + amount = FixedMul(amount, G_SkillProperty(SKILLP_AmmoFactor)); } ammo->Amount += amount; if (ammo->Amount > ammo->MaxAmount) diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index ed7765abd2..0079c6449a 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -331,7 +331,8 @@ bool AActor::SuggestMissileAttack (fixed_t dist) if (flags4 & MF4_MISSILEMORE) dist >>= 1; if (flags4 & MF4_MISSILEEVENMORE) dist >>= 3; - return pr_checkmissilerange() >= MIN (dist >> FRACBITS, MinMissileChance); + int mmc = FixedMul(MinMissileChance, G_SkillProperty(SKILLP_Aggressiveness)); + return pr_checkmissilerange() >= MIN (dist >> FRACBITS, mmc); } //============================================================================= @@ -1804,8 +1805,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi } } - if (nightmarefast && - (gameskill == sk_nightmare || (dmflags & DF_FAST_MONSTERS))) + if (nightmarefast && G_SkillProperty(SKILLP_FastMonsters)) { // Monsters move faster in nightmare mode actor->tics -= actor->tics / 2; if (actor->tics < 3) @@ -1897,7 +1897,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi if (actor->flags & MF_JUSTATTACKED) { actor->flags &= ~MF_JUSTATTACKED; - if ((gameskill != sk_nightmare) && !(dmflags & DF_FAST_MONSTERS)) + if (!actor->isFast()) { P_NewChaseDir (actor); } @@ -2009,8 +2009,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi // check for missile attack if (missilestate) { - if (gameskill < sk_nightmare - && actor->movecount && !(dmflags & DF_FAST_MONSTERS)) + if (!actor->isFast() && actor->movecount) { goto nomissile; } diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index be23cda3ea..edd430edee 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -687,7 +687,9 @@ void P_AutoUseHealth(player_t *player, int saveHealth) normalAmount = normalItem != NULL ? normalItem->Amount : 0; superAmount = superItem != NULL ? superItem->Amount : 0; - if ((gameskill == sk_baby) && (normalAmount*25 >= saveHealth)) + bool skilluse = !!G_SkillProperty(SKILLP_AutoUseHealth); + + if (skilluse && (normalAmount*25 >= saveHealth)) { // Use quartz flasks count = (saveHealth+24)/25; for(i = 0; i < count; i++) @@ -713,7 +715,7 @@ void P_AutoUseHealth(player_t *player, int saveHealth) } } } - else if ((gameskill == sk_baby) + else if (skilluse && (superAmount*100+normalAmount*25 >= saveHealth)) { // Use mystic urns and quartz flasks count = (saveHealth+24)/25; @@ -861,13 +863,10 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage return; } player = target->player; - if (player && gameskill == sk_baby) + if (player && damage > 1) { // Take half damage in trainer mode - if (damage > 1) - { - damage >>= 1; - } + damage = FixedMul(damage, G_SkillProperty(SKILLP_DamageFactor)); } // Special damage types if (inflictor) @@ -1041,7 +1040,7 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage } if (damage >= player->health - && ((gameskill == sk_baby) || deathmatch) + && (G_SkillProperty(SKILLP_AutoUseHealth) || deathmatch) && !player->morphTics) { // Try to use some inventory health P_AutoUseHealth (player, damage - player->health + 1); @@ -1324,10 +1323,10 @@ void P_PoisonDamage (player_t *player, AActor *source, int damage, { // target is invulnerable return; } - if (player && gameskill == sk_baby) + if (player) { // Take half damage in trainer mode - damage >>= 1; + damage = FixedMul(damage, G_SkillProperty(SKILLP_DamageFactor)); } if(damage < 1000 && ((player->cheats&CF_GODMODE) || (player->mo->flags2 & MF2_INVULNERABLE))) @@ -1335,7 +1334,7 @@ void P_PoisonDamage (player_t *player, AActor *source, int damage, return; } if (damage >= player->health - && ((gameskill == sk_baby) || deathmatch) + && (G_SkillProperty(SKILLP_AutoUseHealth) || deathmatch) && !player->morphTics) { // Try to use some inventory health P_AutoUseHealth (player, damage - player->health+1); diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index f2da090bec..66e778912c 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -2033,11 +2033,10 @@ FUNC(LS_Sector_SetColor) // Sector_SetColor (tag, r, g, b, desaturate) { int secnum = -1; - PalEntry color = PalEntry (arg1, arg2, arg3); while ((secnum = P_FindSectorFromTag (arg0, secnum)) >= 0) { - sectors[secnum].ColorMap = GetSpecialLights (color, sectors[secnum].ColorMap->Fade, arg4); + sectors[secnum].SetColor(arg1, arg2, arg3, arg4); } return true; @@ -2047,11 +2046,10 @@ FUNC(LS_Sector_SetFade) // Sector_SetFade (tag, r, g, b) { int secnum = -1; - PalEntry fade = PalEntry (arg1, arg2, arg3); while ((secnum = P_FindSectorFromTag (arg0, secnum)) >= 0) { - sectors[secnum].ColorMap = GetSpecialLights (sectors[secnum].ColorMap->Color, fade, sectors[secnum].ColorMap->Desaturate); + sectors[secnum].SetFade(arg1, arg2, arg3); } return true; } diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 19db535645..5282916d3e 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -467,7 +467,7 @@ int AActor::GetTics(FState * newstate) { int tics = newstate->GetTics(); - if (gameskill == sk_nightmare || (dmflags & DF_FAST_MONSTERS)) + if (isFast()) { if (flags5 & MF5_FASTER) { @@ -2943,13 +2943,14 @@ void AActor::Tick () } else { + int respawn_monsters = G_SkillProperty(SKILLP_Respawn); // check for nightmare respawn - if (!respawnmonsters || !(flags3 & MF3_ISMONSTER) || (flags2 & MF2_DORMANT)) + if (!respawn_monsters || !(flags3 & MF3_ISMONSTER) || (flags2 & MF2_DORMANT)) return; movecount++; - if (movecount < respawnmonsters) + if (movecount < respawn_monsters) return; if (level.time & 31) @@ -3132,7 +3133,7 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t FRandom &rng = bglobal.m_Thinking ? pr_botspawnmobj : pr_spawnmobj; - if (gameskill == sk_nightmare && actor->flags3 & MF3_ISMONSTER) + if (actor->isFast() && actor->flags3 & MF3_ISMONSTER) actor->reactiontime = 0; if (actor->flags3 & MF3_ISMONSTER) @@ -3152,7 +3153,7 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t actor->frame = st->GetFrame(); actor->renderflags = (actor->renderflags & ~RF_FULLBRIGHT) | st->GetFullbright(); actor->touching_sectorlist = NULL; // NULL head of sector list // phares 3/13/98 - if (gameskill == sk_nightmare || (dmflags & DF_FAST_MONSTERS)) + if (G_SkillProperty(SKILLP_FastMonsters)) actor->Speed = actor->GetClass()->Meta.GetMetaFixed(AMETA_FastSpeed, actor->Speed); // set subsector and/or block links @@ -3307,6 +3308,13 @@ void AActor::BeginPlay () { } +bool AActor::isFast() +{ + if (flags5&MF5_ALWAYSFAST) return true; + if (flags5&MF5_NEVERFAST) return false; + return !!G_SkillProperty(SKILLP_FastMonsters); +} + void AActor::Activate (AActor *activator) { if ((flags3 & MF3_ISMONSTER) && (health > 0 || (flags & MF_ICECORPSE))) @@ -3410,6 +3418,7 @@ void AActor::AdjustFloorClip () // Most of the player structure stays unchanged between levels. // EXTERN_CVAR (Bool, chasedemo) + extern bool demonew; void P_SpawnPlayer (mapthing2_t *mthing, bool tempplayer) @@ -3711,19 +3720,7 @@ void P_SpawnMapThing (mapthing2_t *mthing, int position) return; } - // check for apropriate skill level - if (gameskill == sk_baby) - { - mask = MTF_EASY; - } - else if (gameskill == sk_nightmare) - { - mask = MTF_HARD; - } - else - { - mask = 1 << (gameskill - 1); - } + mask = G_SkillProperty(SKILLP_SpawnFilter); if (!(mthing->flags & mask)) { return; diff --git a/src/p_sectors.cpp b/src/p_sectors.cpp index e9b057b448..7f8f98b132 100644 --- a/src/p_sectors.cpp +++ b/src/p_sectors.cpp @@ -681,3 +681,16 @@ fixed_t sector_t::FindLowestCeilingPoint (vertex_t **v) const *v = spot; return height; } + + +void sector_t::SetColor(int r, int g, int b, int desat) +{ + PalEntry color = PalEntry (r,g,b); + ColorMap = GetSpecialLights (color, ColorMap->Fade, desat); +} + +void sector_t::SetFade(int r, int g, int b) +{ + PalEntry fade = PalEntry (r,g,b); + ColorMap = GetSpecialLights (ColorMap->Color, fade, ColorMap->Desaturate); +} diff --git a/src/r_defs.h b/src/r_defs.h index 18751ce7a8..cbc376a2d1 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -272,6 +272,8 @@ struct sector_t fixed_t FindLowestCeilingPoint (vertex_t **v) const; fixed_t FindHighestFloorPoint (vertex_t **v) const; void AdjustFloorClip () const; + void SetColor(int r, int g, int b, int desat); + void SetFade(int r, int g, int b); // Member variables fixed_t CenterFloor () const { return floorplane.ZatPoint (soundorg[0], soundorg[1]); } diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index 4ef1dbf8f3..396e1cf375 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -218,6 +218,8 @@ static flagdef ActorFlags[]= DEFINE_FLAG(MF5, NOBLOODDECALS, AActor, flags5), DEFINE_FLAG(MF5, USESPECIAL, AActor, flags5), DEFINE_FLAG(MF5, NOPAIN, AActor, flags5), + DEFINE_FLAG(MF5, ALWAYSFAST, AActor, flags5), + DEFINE_FLAG(MF5, NEVERFAST, AActor, flags5), // Effect flags DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects), diff --git a/zdoom.vcproj b/zdoom.vcproj index 8c771c2ce1..a84d5d44be 100644 --- a/zdoom.vcproj +++ b/zdoom.vcproj @@ -5959,6 +5959,10 @@ /> + +