mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
This commit is contained in:
commit
7ded20ca05
10 changed files with 45 additions and 38 deletions
|
@ -111,7 +111,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
||||||
wrapmidtex = <bool>; // Line's mid textures are wrapped.
|
wrapmidtex = <bool>; // Line's mid textures are wrapped.
|
||||||
midtex3d = <bool>; // Actors can walk on mid texture.
|
midtex3d = <bool>; // Actors can walk on mid texture.
|
||||||
midtex3dimpassible = <bool>;// Used in conjuction with midtex3d - causes the mid
|
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).
|
// pass through it).
|
||||||
checkswitchrange = <bool>; // Switches can only be activated when vertically reachable.
|
checkswitchrange = <bool>; // Switches can only be activated when vertically reachable.
|
||||||
blockprojectiles = <bool>; // Line blocks all projectiles
|
blockprojectiles = <bool>; // Line blocks all projectiles
|
||||||
|
|
|
@ -1564,27 +1564,31 @@ CCMD(am_zoom)
|
||||||
void AM_doFollowPlayer ()
|
void AM_doFollowPlayer ()
|
||||||
{
|
{
|
||||||
double sx, sy;
|
double sx, sy;
|
||||||
|
auto cam = players[consoleplayer].camera;
|
||||||
if (players[consoleplayer].camera != NULL &&
|
if (cam != nullptr)
|
||||||
(f_oldloc.x != players[consoleplayer].camera->X() ||
|
|
||||||
f_oldloc.y != players[consoleplayer].camera->Y()))
|
|
||||||
{
|
{
|
||||||
m_x = players[consoleplayer].camera->X() - m_w/2;
|
double delta = cam->player ? cam->player->viewz - cam->Z() : cam->GetCameraHeight();
|
||||||
m_y = players[consoleplayer].camera->Y() - m_h/2;
|
DVector3 ampos = cam->GetPortalTransition(delta);
|
||||||
m_x2 = m_x + m_w;
|
|
||||||
m_y2 = m_y + m_h;
|
|
||||||
|
|
||||||
// do the parallax parchment scrolling.
|
if (f_oldloc.x != ampos.X || f_oldloc.y != ampos.Y)
|
||||||
sx = (players[consoleplayer].camera->X() - f_oldloc.x);
|
|
||||||
sy = (f_oldloc.y - players[consoleplayer].camera->Y());
|
|
||||||
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
|
|
||||||
{
|
{
|
||||||
AM_rotate (&sx, &sy, players[consoleplayer].camera->Angles.Yaw - 90);
|
m_x = ampos.X - m_w / 2;
|
||||||
}
|
m_y = ampos.Y - m_h / 2;
|
||||||
AM_ScrollParchment (sx, sy);
|
m_x2 = m_x + m_w;
|
||||||
|
m_y2 = m_y + m_h;
|
||||||
|
|
||||||
f_oldloc.x = players[consoleplayer].camera->X();
|
// do the parallax parchment scrolling.
|
||||||
f_oldloc.y = players[consoleplayer].camera->Y();
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -211,6 +211,7 @@ typedef enum
|
||||||
CF_BUDDHA2 = 1 << 24, // [MC] Absolute buddha. No voodoo can kill it either.
|
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_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_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
|
CF_NOCLIP2 = 1 << 30, // [RH] More Quake-like noclip
|
||||||
} cheat_t;
|
} cheat_t;
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,8 @@ void GLPortal::ClearScreen()
|
||||||
gl_RenderState.mViewMatrix.loadIdentity();
|
gl_RenderState.mViewMatrix.loadIdentity();
|
||||||
gl_RenderState.mProjectionMatrix.ortho(0, SCREENWIDTH, SCREENHEIGHT, 0, -1.0f, 1.0f);
|
gl_RenderState.mProjectionMatrix.ortho(0, SCREENWIDTH, SCREENHEIGHT, 0, -1.0f, 1.0f);
|
||||||
gl_RenderState.ApplyMatrices();
|
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_MULTISAMPLE);
|
||||||
glDisable(GL_DEPTH_TEST);
|
glDisable(GL_DEPTH_TEST);
|
||||||
|
|
|
@ -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)
|
// but telefragging should still do enough damage to kill the player)
|
||||||
// Ignore players that are already dead.
|
// Ignore players that are already dead.
|
||||||
// [MC]Buddha2 absorbs telefrag damage, and anything else thrown their way.
|
// [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.
|
// If this is a voodoo doll we need to handle the real player as well.
|
||||||
player->mo->health = target->health = player->health = 1;
|
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;
|
target->health -= damage;
|
||||||
if (target->health <= 0)
|
if (target->health <= 0)
|
||||||
{ // Death
|
{ // 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...
|
{ // [SP] Save the player...
|
||||||
player->health = target->health = 1;
|
player->health = target->health = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2977,7 +2977,7 @@ FUNC(LS_SetPlayerProperty)
|
||||||
switch (arg2)
|
switch (arg2)
|
||||||
{
|
{
|
||||||
case PROP_BUDDHA:
|
case PROP_BUDDHA:
|
||||||
mask = CF_BUDDHA;
|
mask = CF_POWERBUDDHA;
|
||||||
break;
|
break;
|
||||||
case PROP_FROZEN:
|
case PROP_FROZEN:
|
||||||
mask = CF_FROZEN;
|
mask = CF_FROZEN;
|
||||||
|
|
|
@ -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)))
|
if ((flags & CPXF_CHECKSIGHT) && !(P_CheckSight(mo, ref, SF_IGNOREVISIBILITY | SF_IGNOREWATERBOUNDARY)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (mo->flags6 & MF6_KILLED)
|
||||||
|
{
|
||||||
|
if (!(flags & (CPXF_COUNTDEAD | CPXF_DEADONLY)))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (flags & CPXF_DEADONLY)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (ptrWillChange)
|
if (ptrWillChange)
|
||||||
{
|
{
|
||||||
current = ref->Distance2D(mo);
|
current = ref->Distance2D(mo);
|
||||||
|
@ -773,16 +783,6 @@ int P_Thing_CheckProximity(AActor *self, PClass *classname, double distance, int
|
||||||
else if (!dist)
|
else if (!dist)
|
||||||
dist = mo; // Just get the first one and call it quits if there's nothing selected.
|
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++;
|
counter++;
|
||||||
|
|
||||||
// Abort if the number of matching classes nearby is greater, we have obviously succeeded in our goal.
|
// Abort if the number of matching classes nearby is greater, we have obviously succeeded in our goal.
|
||||||
|
|
|
@ -2105,7 +2105,7 @@ void P_FallingDamage (AActor *actor)
|
||||||
}
|
}
|
||||||
if (vel >= 63)
|
if (vel >= 63)
|
||||||
{ // automatic death
|
{ // automatic death
|
||||||
damage = 1000000;
|
damage = TELEFRAG_DAMAGE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2126,7 +2126,7 @@ void P_FallingDamage (AActor *actor)
|
||||||
}
|
}
|
||||||
if (vel >= 84)
|
if (vel >= 84)
|
||||||
{ // automatic death
|
{ // automatic death
|
||||||
damage = 1000000;
|
damage = TELEFRAG_DAMAGE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2156,7 +2156,7 @@ void P_FallingDamage (AActor *actor)
|
||||||
{
|
{
|
||||||
S_Sound (actor, CHAN_AUTO, "*land", 1, ATTN_NORM);
|
S_Sound (actor, CHAN_AUTO, "*land", 1, ATTN_NORM);
|
||||||
P_NoiseAlert (actor, actor, true);
|
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;
|
damage = 999;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1114,6 +1114,7 @@ enum EPlayerCheats
|
||||||
CF_BUDDHA2 = 1 << 24, // [MC] Absolute buddha. No voodoo can kill it either.
|
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_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_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
|
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.
|
// These flags no longer exist, but keep the names for some stray mod that might have used them.
|
||||||
|
|
|
@ -93,7 +93,7 @@ class Powerup : Inventory
|
||||||
{
|
{
|
||||||
Destroy ();
|
Destroy ();
|
||||||
}
|
}
|
||||||
if (EffectTics > 0 && --EffectTics == 0)
|
if (EffectTics == 0 || (EffectTics > 0 && --EffectTics == 0))
|
||||||
{
|
{
|
||||||
Destroy ();
|
Destroy ();
|
||||||
}
|
}
|
||||||
|
@ -1458,7 +1458,7 @@ class PowerBuddha : Powerup
|
||||||
if (Owner== null || Owner.player == null)
|
if (Owner== null || Owner.player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Owner.player.cheats |= CF_BUDDHA;
|
Owner.player.cheats |= CF_POWERBUDDHA;
|
||||||
}
|
}
|
||||||
|
|
||||||
override void EndEffect ()
|
override void EndEffect ()
|
||||||
|
@ -1468,7 +1468,7 @@ class PowerBuddha : Powerup
|
||||||
if (Owner== null || Owner.player == null)
|
if (Owner== null || Owner.player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Owner.player.cheats &= ~CF_BUDDHA;
|
Owner.player.cheats &= ~CF_POWERBUDDHA;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue