This commit is contained in:
Rachael Alexanderson 2017-05-15 03:27:58 -04:00
commit 7ded20ca05
10 changed files with 45 additions and 38 deletions

View File

@ -111,7 +111,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
wrapmidtex = <bool>; // Line's mid textures are wrapped.
midtex3d = <bool>; // Actors can walk on mid texture.
midtex3dimpassible = <bool>;// Used in conjuction with midtex3d - causes the mid
// texture to behave like an impassible line (projectiles
// texture to behave like an impassable line (projectiles
// pass through it).
checkswitchrange = <bool>; // Switches can only be activated when vertically reachable.
blockprojectiles = <bool>; // Line blocks all projectiles

View File

@ -1564,27 +1564,31 @@ CCMD(am_zoom)
void AM_doFollowPlayer ()
{
double sx, sy;
if (players[consoleplayer].camera != NULL &&
(f_oldloc.x != players[consoleplayer].camera->X() ||
f_oldloc.y != players[consoleplayer].camera->Y()))
auto cam = players[consoleplayer].camera;
if (cam != nullptr)
{
m_x = players[consoleplayer].camera->X() - m_w/2;
m_y = players[consoleplayer].camera->Y() - m_h/2;
m_x2 = m_x + m_w;
m_y2 = m_y + m_h;
double delta = cam->player ? cam->player->viewz - cam->Z() : cam->GetCameraHeight();
DVector3 ampos = cam->GetPortalTransition(delta);
// do the parallax parchment scrolling.
sx = (players[consoleplayer].camera->X() - f_oldloc.x);
sy = (f_oldloc.y - players[consoleplayer].camera->Y());
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
if (f_oldloc.x != ampos.X || f_oldloc.y != ampos.Y)
{
AM_rotate (&sx, &sy, players[consoleplayer].camera->Angles.Yaw - 90);
}
AM_ScrollParchment (sx, sy);
m_x = ampos.X - m_w / 2;
m_y = ampos.Y - m_h / 2;
m_x2 = m_x + m_w;
m_y2 = m_y + m_h;
f_oldloc.x = players[consoleplayer].camera->X();
f_oldloc.y = players[consoleplayer].camera->Y();
// do the parallax parchment scrolling.
sx = (ampos.X - f_oldloc.x);
sy = (f_oldloc.y - ampos.Y);
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
{
AM_rotate(&sx, &sy, cam->Angles.Yaw - 90);
}
AM_ScrollParchment(sx, sy);
f_oldloc.x = ampos.X;
f_oldloc.y = ampos.Y;
}
}
}

View File

@ -211,6 +211,7 @@ typedef enum
CF_BUDDHA2 = 1 << 24, // [MC] Absolute buddha. No voodoo can kill it either.
CF_GODMODE2 = 1 << 25, // [MC] Absolute godmode. No voodoo can kill it either.
CF_BUDDHA = 1 << 27, // [SP] Buddha mode - take damage, but don't die
CF_POWERBUDDHA = 1 << 28, // [MC] Powerup version of Buddha to prevent interference with actual cheat.
CF_NOCLIP2 = 1 << 30, // [RH] More Quake-like noclip
} cheat_t;

View File

@ -119,7 +119,8 @@ void GLPortal::ClearScreen()
gl_RenderState.mViewMatrix.loadIdentity();
gl_RenderState.mProjectionMatrix.ortho(0, SCREENWIDTH, SCREENHEIGHT, 0, -1.0f, 1.0f);
gl_RenderState.ApplyMatrices();
glVertexAttrib4f(VATTR_COLOR, 0, 0, 0, 1); // color should be black.
gl_RenderState.SetColor(0, 0, 0);
gl_RenderState.Apply();
glDisable(GL_MULTISAMPLE);
glDisable(GL_DEPTH_TEST);

View File

@ -1360,7 +1360,7 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da
// but telefragging should still do enough damage to kill the player)
// Ignore players that are already dead.
// [MC]Buddha2 absorbs telefrag damage, and anything else thrown their way.
if (!(flags & DMG_FORCED) && (((player->cheats & CF_BUDDHA2) || (((player->cheats & CF_BUDDHA) || (player->mo->flags7 & MF7_BUDDHA)) && !telefragDamage)) && (player->playerstate != PST_DEAD)))
if (!(flags & DMG_FORCED) && (((player->cheats & CF_BUDDHA2) || (((player->cheats & CF_BUDDHA|CF_POWERBUDDHA) || (player->mo->flags7 & MF7_BUDDHA)) && !telefragDamage)) && (player->playerstate != PST_DEAD)))
{
// If this is a voodoo doll we need to handle the real player as well.
player->mo->health = target->health = player->health = 1;
@ -1896,7 +1896,7 @@ void P_PoisonDamage (player_t *player, AActor *source, int damage, bool playPain
target->health -= damage;
if (target->health <= 0)
{ // Death
if ((((player->cheats & CF_BUDDHA) || (player->mo->flags7 & MF7_BUDDHA)) && damage < TELEFRAG_DAMAGE) || (player->cheats & CF_BUDDHA2))
if ((((player->cheats & CF_BUDDHA|CF_POWERBUDDHA) || (player->mo->flags7 & MF7_BUDDHA)) && damage < TELEFRAG_DAMAGE) || (player->cheats & CF_BUDDHA2))
{ // [SP] Save the player...
player->health = target->health = 1;
}

View File

@ -2977,7 +2977,7 @@ FUNC(LS_SetPlayerProperty)
switch (arg2)
{
case PROP_BUDDHA:
mask = CF_BUDDHA;
mask = CF_POWERBUDDHA;
break;
case PROP_FROZEN:
mask = CF_FROZEN;

View File

@ -756,6 +756,16 @@ int P_Thing_CheckProximity(AActor *self, PClass *classname, double distance, int
if ((flags & CPXF_CHECKSIGHT) && !(P_CheckSight(mo, ref, SF_IGNOREVISIBILITY | SF_IGNOREWATERBOUNDARY)))
continue;
if (mo->flags6 & MF6_KILLED)
{
if (!(flags & (CPXF_COUNTDEAD | CPXF_DEADONLY)))
continue;
}
else
{
if (flags & CPXF_DEADONLY)
continue;
}
if (ptrWillChange)
{
current = ref->Distance2D(mo);
@ -773,16 +783,6 @@ int P_Thing_CheckProximity(AActor *self, PClass *classname, double distance, int
else if (!dist)
dist = mo; // Just get the first one and call it quits if there's nothing selected.
}
if (mo->flags6 & MF6_KILLED)
{
if (!(flags & (CPXF_COUNTDEAD | CPXF_DEADONLY)))
continue;
}
else
{
if (flags & CPXF_DEADONLY)
continue;
}
counter++;
// Abort if the number of matching classes nearby is greater, we have obviously succeeded in our goal.

View File

@ -2105,7 +2105,7 @@ void P_FallingDamage (AActor *actor)
}
if (vel >= 63)
{ // automatic death
damage = 1000000;
damage = TELEFRAG_DAMAGE;
}
else
{
@ -2126,7 +2126,7 @@ void P_FallingDamage (AActor *actor)
}
if (vel >= 84)
{ // automatic death
damage = 1000000;
damage = TELEFRAG_DAMAGE;
}
else
{
@ -2156,7 +2156,7 @@ void P_FallingDamage (AActor *actor)
{
S_Sound (actor, CHAN_AUTO, "*land", 1, ATTN_NORM);
P_NoiseAlert (actor, actor, true);
if (damage == 1000000 && (actor->player->cheats & (CF_GODMODE | CF_BUDDHA)))
if (damage >= TELEFRAG_DAMAGE && (actor->player->cheats & (CF_GODMODE | CF_BUDDHA | CF_POWERBUDDHA )))
{
damage = 999;
}

View File

@ -1114,6 +1114,7 @@ enum EPlayerCheats
CF_BUDDHA2 = 1 << 24, // [MC] Absolute buddha. No voodoo can kill it either.
CF_GODMODE2 = 1 << 25, // [MC] Absolute godmode. No voodoo can kill it either.
CF_BUDDHA = 1 << 27, // [SP] Buddha mode - take damage, but don't die
CF_POWERBUDDHA = 1 << 28, // [MC] Powerup version of Buddha to prevent interference with actual cheat.
CF_NOCLIP2 = 1 << 30, // [RH] More Quake-like noclip
// These flags no longer exist, but keep the names for some stray mod that might have used them.

View File

@ -93,7 +93,7 @@ class Powerup : Inventory
{
Destroy ();
}
if (EffectTics > 0 && --EffectTics == 0)
if (EffectTics == 0 || (EffectTics > 0 && --EffectTics == 0))
{
Destroy ();
}
@ -1458,7 +1458,7 @@ class PowerBuddha : Powerup
if (Owner== null || Owner.player == null)
return;
Owner.player.cheats |= CF_BUDDHA;
Owner.player.cheats |= CF_POWERBUDDHA;
}
override void EndEffect ()
@ -1468,7 +1468,7 @@ class PowerBuddha : Powerup
if (Owner== null || Owner.player == null)
return;
Owner.player.cheats &= ~CF_BUDDHA;
Owner.player.cheats &= ~CF_POWERBUDDHA;
}
}