mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- removed all instances of CF_POWERBUDDHA
This commit is contained in:
parent
fe023b5ca4
commit
c6946cc672
4 changed files with 9 additions and 5 deletions
|
@ -211,7 +211,6 @@ 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;
|
||||||
|
|
||||||
|
|
|
@ -1360,7 +1360,9 @@ 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->FindInventory (PClass::FindActor(NAME_PowerBuddha),true) != nullptr) || (player->mo->flags7 & MF7_BUDDHA)) && !telefragDamage)) && (player->playerstate != PST_DEAD)))
|
if (!(flags & DMG_FORCED) && (((player->cheats & CF_BUDDHA2) || (((player->cheats & CF_BUDDHA) ||
|
||||||
|
(player->mo->FindInventory (PClass::FindActor(NAME_PowerBuddha),true) != nullptr) ||
|
||||||
|
(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 +1898,9 @@ 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|CF_POWERBUDDHA) || (player->mo->flags7 & MF7_BUDDHA)) && damage < TELEFRAG_DAMAGE) || (player->cheats & CF_BUDDHA2))
|
if ((((player->cheats & CF_BUDDHA) ||
|
||||||
|
(player->mo->flags7 & MF7_BUDDHA)) && damage < TELEFRAG_DAMAGE) || (player->cheats & CF_BUDDHA2) ||
|
||||||
|
(player->mo->FindInventory (PClass::FindActor(NAME_PowerBuddha),true) != nullptr))
|
||||||
{ // [SP] Save the player...
|
{ // [SP] Save the player...
|
||||||
player->health = target->health = 1;
|
player->health = target->health = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2978,7 +2978,7 @@ FUNC(LS_SetPlayerProperty)
|
||||||
switch (arg2)
|
switch (arg2)
|
||||||
{
|
{
|
||||||
case PROP_BUDDHA:
|
case PROP_BUDDHA:
|
||||||
mask = CF_POWERBUDDHA;
|
mask = CF_BUDDHA;
|
||||||
break;
|
break;
|
||||||
case PROP_FROZEN:
|
case PROP_FROZEN:
|
||||||
mask = CF_FROZEN;
|
mask = CF_FROZEN;
|
||||||
|
|
|
@ -2156,7 +2156,8 @@ 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 >= TELEFRAG_DAMAGE && (actor->player->cheats & (CF_GODMODE | CF_BUDDHA | CF_POWERBUDDHA )))
|
if (damage >= TELEFRAG_DAMAGE && ((actor->player->cheats & (CF_GODMODE | CF_BUDDHA) ||
|
||||||
|
(actor->FindInventory(PClass::FindActor(NAME_PowerBuddha), true) != nullptr))))
|
||||||
{
|
{
|
||||||
damage = 999;
|
damage = 999;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue