From 39a35273969d518048d1e03b4af44b3b2d83ae62 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 15 Nov 2018 10:59:37 +0200 Subject: [PATCH 1/5] - fixed compilation of targets with optimization --- src/scripting/backend/codegen.cpp | 2 -- src/scripting/types.h | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/scripting/backend/codegen.cpp b/src/scripting/backend/codegen.cpp index 79b48953a..8576bcae1 100644 --- a/src/scripting/backend/codegen.cpp +++ b/src/scripting/backend/codegen.cpp @@ -48,8 +48,6 @@ #include "w_wad.h" #include "doomstat.h" -inline PClass *PObjectPointer::PointedClass() const { return static_cast(PointedType)->Descriptor; } - extern FRandom pr_exrandom; FMemArena FxAlloc(65536); int utf8_decode(const char *src, int *size); diff --git a/src/scripting/types.h b/src/scripting/types.h index 52f1fc464..7d2f2341c 100644 --- a/src/scripting/types.h +++ b/src/scripting/types.h @@ -575,6 +575,10 @@ public: }; +inline PClass *PObjectPointer::PointedClass() const +{ + return static_cast(PointedType)->Descriptor; +} // Returns a type from the TypeTable. Will create one if it isn't present. PMap *NewMap(PType *keytype, PType *valuetype); From 07838f4c2a762a83fc1049eae1455ea6d7c33296 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 9 Nov 2018 15:19:40 +0600 Subject: [PATCH 2/5] BOUNCEONUNRIPPABLES flag; makes actors bounce on actors with DONTRIP flag --- src/actor.h | 1 + src/p_map.cpp | 3 ++- src/scripting/thingdef_data.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/actor.h b/src/actor.h index 248847e5b..ab4909bb0 100644 --- a/src/actor.h +++ b/src/actor.h @@ -487,6 +487,7 @@ enum ActorBounceFlag BOUNCE_AutoOffFloorOnly = 1<<13, // like BOUNCE_AutoOff, but only on floors BOUNCE_UseBounceState = 1<<14, // Use Bounce[.*] states BOUNCE_NotOnShootables = 1<<15, // do not bounce off shootable actors if we are a projectile. Explode instead. + BOUNCE_BounceOnUnrips = 1<<16, // projectile bounces on actors with DONTRIP BOUNCE_TypeMask = BOUNCE_Walls | BOUNCE_Floors | BOUNCE_Ceilings | BOUNCE_Actors | BOUNCE_AutoOff | BOUNCE_HereticType | BOUNCE_MBF, diff --git a/src/p_map.cpp b/src/p_map.cpp index cea1a33d6..e0b16ca2e 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -3642,7 +3642,8 @@ bool P_BounceActor(AActor *mo, AActor *BlockingMobj, bool ontop) || ((BlockingMobj->player == NULL) && (!(BlockingMobj->flags3 & MF3_ISMONSTER))))) { // Rippers should not bounce off shootable actors, since they rip through them. - if ((mo->flags & MF_MISSILE) && (mo->flags2 & MF2_RIP) && BlockingMobj->flags & MF_SHOOTABLE) + if ((mo->flags & MF_MISSILE) && (mo->flags2 & MF2_RIP) && BlockingMobj->flags & MF_SHOOTABLE + && !(mo->BounceFlags & BOUNCE_BounceOnUnrips && BlockingMobj->flags5 & MF5_DONTRIP)) return true; if (BlockingMobj->flags & MF_SHOOTABLE && mo->BounceFlags & BOUNCE_NotOnShootables) diff --git a/src/scripting/thingdef_data.cpp b/src/scripting/thingdef_data.cpp index a10d05710..60200e765 100644 --- a/src/scripting/thingdef_data.cpp +++ b/src/scripting/thingdef_data.cpp @@ -359,6 +359,7 @@ static FFlagDef ActorFlagDefs[]= DEFINE_FLAG2(BOUNCE_AutoOffFloorOnly, BOUNCEAUTOOFFFLOORONLY, AActor, BounceFlags), DEFINE_FLAG2(BOUNCE_UseBounceState, USEBOUNCESTATE, AActor, BounceFlags), DEFINE_FLAG2(BOUNCE_NotOnShootables, DONTBOUNCEONSHOOTABLES, AActor, BounceFlags), + DEFINE_FLAG2(BOUNCE_BounceOnUnrips, BOUNCEONUNRIPPABLES, AActor, BounceFlags), }; // These won't be accessible through bitfield variables From 47138b748ae15b9d7b9b7d2df7f3bf06795aef96 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 15 Nov 2018 16:53:19 +0100 Subject: [PATCH 3/5] Make BounceFlags 32 bit wide. --- src/actor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actor.h b/src/actor.h index ab4909bb0..bd6b51a4d 100644 --- a/src/actor.h +++ b/src/actor.h @@ -551,7 +551,7 @@ typedef TFlags ActorFlags6; typedef TFlags ActorFlags7; typedef TFlags ActorFlags8; typedef TFlags ActorRenderFlags; -typedef TFlags ActorBounceFlags; +typedef TFlags ActorBounceFlags; typedef TFlags ActorRenderFeatureFlags; DEFINE_TFLAGS_OPERATORS (ActorFlags) DEFINE_TFLAGS_OPERATORS (ActorFlags2) From 99f1d6b82e7d437cd79dedbaf9ec39a29e8607c7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 15 Nov 2018 18:49:37 +0100 Subject: [PATCH 4/5] - fixed: A_DropFire accidentally cleared the XF_HURTSOURCE flag by setting only XF_NOSPLASH. --- wadsrc/static/zscript/strife/strifefunctions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/strife/strifefunctions.txt b/wadsrc/static/zscript/strife/strifefunctions.txt index 5e0312a95..7e83a6512 100644 --- a/wadsrc/static/zscript/strife/strifefunctions.txt +++ b/wadsrc/static/zscript/strife/strifefunctions.txt @@ -137,7 +137,7 @@ extend class Actor { drop.Vel.Z = -1.; } - A_Explode(64, 64, XF_NOSPLASH, damagetype: 'Fire'); + A_Explode(64, 64, XF_NOSPLASH|XF_HURTSOURCE, damagetype: 'Fire'); } //========================================================================== From feef0d4b621d8fc6d2defb54a4e85e01a49e37fd Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 15 Nov 2018 19:35:07 +0100 Subject: [PATCH 5/5] - corrected A_DropFire for real, using the SVE source as reference. --- wadsrc/static/zscript/strife/strifefunctions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/strife/strifefunctions.txt b/wadsrc/static/zscript/strife/strifefunctions.txt index 7e83a6512..df4a3e73f 100644 --- a/wadsrc/static/zscript/strife/strifefunctions.txt +++ b/wadsrc/static/zscript/strife/strifefunctions.txt @@ -137,7 +137,7 @@ extend class Actor { drop.Vel.Z = -1.; } - A_Explode(64, 64, XF_NOSPLASH|XF_HURTSOURCE, damagetype: 'Fire'); + A_Explode(64, 64, XF_NOSPLASH|XF_HURTSOURCE|XF_NOTMISSILE, damagetype: 'Fire'); } //==========================================================================