Add Voodoo Zombie Compatflag
This commit is contained in:
parent
ca0db39027
commit
1589afb46e
7 changed files with 51 additions and 7 deletions
|
|
@ -1335,13 +1335,24 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da
|
|||
}
|
||||
}
|
||||
|
||||
bool compat_voodoo_zombie = target->Level->i_compatflags2 & COMPATF2_VOODOO_ZOMBIES;
|
||||
|
||||
player->health -= damage; // mirror mobj health here for Dave
|
||||
// [RH] Make voodoo dolls and real players record the same health
|
||||
target->health = player->mo->health -= damage;
|
||||
if(compat_voodoo_zombie)
|
||||
{ // [RL0] To allow voodoo zombies, don't set the voodoo doll to the player mobj's health and don't change the player mobj's health on damage
|
||||
target->health -= damage;
|
||||
}
|
||||
else
|
||||
{ // [RH] Make voodoo dolls and real players record the same health
|
||||
target->health = player->mo->health -= damage;
|
||||
}
|
||||
if (player->health < 50 && !deathmatch && !(flags & DMG_FORCED))
|
||||
{
|
||||
P_AutoUseStrifeHealth (player);
|
||||
player->mo->health = player->health;
|
||||
if(!compat_voodoo_zombie)
|
||||
{ // [RL0] To match vanilla behavior, don't set the player mo's health to 0 if voodoo zombies compat is enabled
|
||||
player->mo->health = player->health;
|
||||
}
|
||||
}
|
||||
if (player->health <= 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue