Merge branch 'master' into scripting
Conflicts: src/actor.h src/g_doom/a_doomweaps.cpp src/p_local.h src/p_map.cpp src/sdl/i_main.cpp src/thingdef/thingdef_codeptr.cpp
This commit is contained in:
commit
4deeb8d8ae
50 changed files with 825 additions and 576 deletions
|
|
@ -652,14 +652,13 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags)
|
|||
|
||||
|
||||
FState *diestate = NULL;
|
||||
FName damagetype = (inflictor && inflictor->DeathType != NAME_None) ? inflictor->DeathType : DamageType;
|
||||
|
||||
if (damagetype != NAME_None)
|
||||
if (DamageType != NAME_None)
|
||||
{
|
||||
diestate = FindState (NAME_Death, damagetype, true);
|
||||
diestate = FindState (NAME_Death, DamageType, true);
|
||||
if (diestate == NULL)
|
||||
{
|
||||
if (damagetype == NAME_Ice)
|
||||
if (DamageType == NAME_Ice)
|
||||
{ // If an actor doesn't have an ice death, we can still give them a generic one.
|
||||
|
||||
if (!deh.NoAutofreeze && !(flags4 & MF4_NOICEDEATH) && (player || (flags3 & MF3_ISMONSTER)))
|
||||
|
|
@ -678,9 +677,9 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags)
|
|||
// Don't pass on a damage type this actor cannot handle.
|
||||
// (most importantly, prevent barrels from passing on ice damage.)
|
||||
// Massacre must be preserved though.
|
||||
if (damagetype != NAME_Massacre)
|
||||
if (DamageType != NAME_Massacre)
|
||||
{
|
||||
damagetype = NAME_None;
|
||||
DamageType = NAME_None;
|
||||
}
|
||||
|
||||
if ((health < gibhealth || flags4 & MF4_EXTREMEDEATH) && !(flags4 & MF4_NOEXTREMEDEATH))
|
||||
|
|
@ -1258,7 +1257,7 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
|||
|
||||
// If the damaging player has the power of drain, give the player 50% of the damage
|
||||
// done in health.
|
||||
if ( source && source->player && source->player->cheats & CF_DRAIN)
|
||||
if ( source && source->player && source->player->cheats & CF_DRAIN && !(target->flags5 & MF5_DONTDRAIN))
|
||||
{
|
||||
if (!target->player || target->player != source->player)
|
||||
{
|
||||
|
|
@ -1273,6 +1272,10 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
|||
if (target->health <= 0)
|
||||
{ // Death
|
||||
target->special1 = damage;
|
||||
|
||||
// use inflictor's death type if it got one.
|
||||
if (inflictor && inflictor->DeathType != NAME_None) mod = inflictor->DeathType;
|
||||
|
||||
// check for special fire damage or ice damage deaths
|
||||
if (mod == NAME_Fire)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue