mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
Fixed: IsFakePain received the modified damage instead of the raw, preventing ALLOWPAIN from working as intended.
This commit is contained in:
parent
c499c563a0
commit
7acf43741a
1 changed files with 3 additions and 3 deletions
|
@ -801,7 +801,7 @@ static inline bool isFakePain(AActor *target, AActor *inflictor, int damage)
|
|||
}
|
||||
|
||||
// [MC] Completely ripped out of DamageMobj to make it less messy.
|
||||
static void ReactToDamage(AActor *target, AActor *inflictor, AActor *source, int damage, FName mod, int flags)
|
||||
static void ReactToDamage(AActor *target, AActor *inflictor, AActor *source, int damage, FName mod, int flags, int originaldamage)
|
||||
{
|
||||
bool justhit = false;
|
||||
int painchance = 0;
|
||||
|
@ -827,7 +827,7 @@ static void ReactToDamage(AActor *target, AActor *inflictor, AActor *source, int
|
|||
// Are we attempting to cause pain?
|
||||
if (!noPain)
|
||||
{
|
||||
fakedPain = (isFakePain(target, inflictor, damage));
|
||||
fakedPain = (isFakePain(target, inflictor, originaldamage));
|
||||
forcedPain = (MustForcePain(target, inflictor));
|
||||
}
|
||||
|
||||
|
@ -1456,7 +1456,7 @@ static int DoDamageMobj(AActor *target, AActor *inflictor, AActor *source, int d
|
|||
bool needevent = true;
|
||||
int realdamage = DamageMobj(target, inflictor, source, damage, mod, flags, angle, needevent);
|
||||
if (realdamage >= 0) //Keep this check separated. Mods relying upon negative numbers may break otherwise.
|
||||
ReactToDamage(target, inflictor, source, realdamage, mod, flags);
|
||||
ReactToDamage(target, inflictor, source, realdamage, mod, flags, damage);
|
||||
|
||||
if (realdamage > 0 && needevent)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue