From 26144340b804521c1d069aece5aa30f95eddf1ce Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 19 Feb 2017 23:20:09 +0100 Subject: [PATCH 1/2] - fixed: Hexen's poison cloud needs to call P_DamageMobj, even with a damage value of 0. Added a new flag to handle this case because normally this is not desirable. --- src/actor.h | 1 + src/p_map.cpp | 5 +++-- src/scripting/thingdef_data.cpp | 1 + wadsrc/static/zscript/hexen/flechette.txt | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/actor.h b/src/actor.h index a973c101a..d3c430759 100644 --- a/src/actor.h +++ b/src/actor.h @@ -387,6 +387,7 @@ enum ActorFlag7 MF7_SPRITEANGLE = 0x02000000, // [MC] Utilize the SpriteAngle property and lock the rotation to the degrees specified. MF7_SMASHABLE = 0x04000000, // dies if hitting the floor. MF7_NOSHIELDREFLECT = 0x08000000, // will not be reflected by shields. + MF7_FORCEZERORADIUSDMG = 0x10000000, // passes zero radius damage on to P_DamageMobj, this is necessary in some cases where DoSpecialDamage gets overrideen. }; // --- mobj.renderflags --- diff --git a/src/p_map.cpp b/src/p_map.cpp index da84855fd..789a07076 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -5674,8 +5674,9 @@ int P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bom } points *= thing->GetClass()->RDFactor; + double check = int(points) * bombdamage; // points and bombdamage should be the same sign (the double cast of 'points' is needed to prevent overflows and incorrect values slipping through.) - if ((((double)int(points) * bombdamage) > 0) && P_CheckSight(thing, bombspot, SF_IGNOREVISIBILITY | SF_IGNOREWATERBOUNDARY)) + if ((check > 0 || (check == 0 && bombspot->flags7 & MF7_FORCEZERORADIUSDMG)) && P_CheckSight(thing, bombspot, SF_IGNOREVISIBILITY | SF_IGNOREWATERBOUNDARY)) { // OK to damage; target is in direct path double vz; double thrust; @@ -5752,7 +5753,7 @@ int P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bom double factor = splashfactor * thing->GetClass()->RDFactor; damage = int(damage * factor); - if (damage > 0) + if (damage > 0 || (bombspot->flags7 & MF7_FORCEZERORADIUSDMG)) { //[MC] Don't count actors saved by buddha if already at 1 health. int prehealth = thing->health; diff --git a/src/scripting/thingdef_data.cpp b/src/scripting/thingdef_data.cpp index 378c6c927..41d8644ea 100644 --- a/src/scripting/thingdef_data.cpp +++ b/src/scripting/thingdef_data.cpp @@ -316,6 +316,7 @@ static FFlagDef ActorFlagDefs[]= DEFINE_FLAG(MF7, SPRITEANGLE, AActor, flags7), DEFINE_FLAG(MF7, SMASHABLE, AActor, flags7), DEFINE_FLAG(MF7, NOSHIELDREFLECT, AActor, flags7), + DEFINE_FLAG(MF7, FORCEZERORADIUSDMG, AActor, flags7), // Effect flags DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects), diff --git a/wadsrc/static/zscript/hexen/flechette.txt b/wadsrc/static/zscript/hexen/flechette.txt index 3440312c9..1708b843b 100644 --- a/wadsrc/static/zscript/hexen/flechette.txt +++ b/wadsrc/static/zscript/hexen/flechette.txt @@ -437,7 +437,7 @@ class PoisonCloud : Actor Mass 0x7fffffff; +NOBLOCKMAP +NOGRAVITY +DROPOFF +NODAMAGETHRUST - +DONTSPLASH +FOILINVUL +CANBLAST +BLOODLESSIMPACT +BLOCKEDBYSOLIDACTORS + +DONTSPLASH +FOILINVUL +CANBLAST +BLOODLESSIMPACT +BLOCKEDBYSOLIDACTORS +FORCEZERORADIUSDMG RenderStyle "Translucent"; Alpha 0.6; DeathSound "PoisonShroomDeath"; From b134ea5b4f0062aa4ea81a3d233a1f0b06bb8919 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 15 Feb 2017 10:10:54 -0500 Subject: [PATCH 2/2] - fixed: Change compiled exe version strings to match git repo numbers. This is viewable in Windows by right-clicking on the executable and selecting "Properties". --- src/version.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index ca7de97fe..5ee5472f2 100644 --- a/src/version.h +++ b/src/version.h @@ -31,6 +31,8 @@ ** */ +#include "gitinfo.h" + #ifndef __VERSION_H__ #define __VERSION_H__ @@ -41,12 +43,16 @@ const char *GetVersionString(); /** Lots of different version numbers **/ +#ifdef GIT_DESCRIPTION +#define VERSIONSTR GIT_DESCRIPTION +#else #define VERSIONSTR "2.3pre" +#endif // The version as seen in the Windows resource #define RC_FILEVERSION 2,3,9999,0 #define RC_PRODUCTVERSION 2,3,9999,0 -#define RC_PRODUCTVERSION2 "2.3pre" +#define RC_PRODUCTVERSION2 VERSIONSTR // Version identifier for network games. // Bump it every time you do a release unless you're certain you