mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-21 03:21:28 +00:00
- changed Buddha powerup from a flag to an inventory check
This commit is contained in:
parent
b1a8ef54f6
commit
fe023b5ca4
3 changed files with 5 additions and 3 deletions
|
@ -207,6 +207,7 @@ xx(QuestItem28)
|
|||
xx(QuestItem29)
|
||||
xx(PowerDoubleFiringSpeed)
|
||||
xx(PowerInfiniteAmmo)
|
||||
xx(PowerBuddha)
|
||||
|
||||
xx(AcolyteBlue)
|
||||
xx(SpectralLightningV1)
|
||||
|
|
|
@ -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->cheats & CF_POWERBUDDHA) || (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.
|
||||
player->mo->health = target->health = player->health = 1;
|
||||
|
|
|
@ -2873,7 +2873,7 @@ FUNC(LS_SetPlayerProperty)
|
|||
// Add or remove a power
|
||||
if (arg2 >= PROP_INVULNERABILITY && arg2 <= PROP_SPEED)
|
||||
{
|
||||
static ENamedName powers[13] =
|
||||
static ENamedName powers[14] =
|
||||
{
|
||||
NAME_PowerInvulnerable,
|
||||
NAME_PowerStrength,
|
||||
|
@ -2887,7 +2887,8 @@ FUNC(LS_SetPlayerProperty)
|
|||
NAME_None,
|
||||
NAME_PowerSpeed,
|
||||
NAME_PowerInfiniteAmmo,
|
||||
NAME_PowerDoubleFiringSpeed
|
||||
NAME_PowerDoubleFiringSpeed,
|
||||
NAME_PowerBuddha
|
||||
};
|
||||
int power = arg2 - PROP_INVULNERABILITY;
|
||||
|
||||
|
|
Loading…
Reference in a new issue