From d2affc7c0ca57a14aaffd71ac6d8547dfe1258ac Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 10 Feb 2017 16:19:33 +0200 Subject: [PATCH 1/3] Fixed crash on attempt to get string value of null https://mantis.zdoom.org/view.php?id=231 --- src/scripting/zscript/zcc_compile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index 4972e1344b..b4a97c3cf9 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -69,7 +69,7 @@ static FString GetStringConst(FxExpression *ex, FCompileContext &ctx) { ex = new FxStringCast(ex); ex = ex->Resolve(ctx); - return static_cast(ex)->GetValue().GetString(); + return ex ? static_cast(ex)->GetValue().GetString() : FString(); } int ZCCCompiler::IntConstFromNode(ZCC_TreeNode *node, PStruct *cls) From c01107181a285625a2addc92dfcc0585d2ac1a72 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 12 Feb 2017 11:26:25 +0200 Subject: [PATCH 2/3] Reset sound position only when there is no listener https://mantis.zdoom.org/view.php?id=206 https://mantis.zdoom.org/view.php?id=248 --- src/s_sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s_sound.cpp b/src/s_sound.cpp index bae1fbaf6f..f01d3288ca 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -692,6 +692,7 @@ static void CalcPosVel(int type, const AActor *actor, const sector_t *sector, else { listenpos.Zero(); + pos->Zero(); pgroup = 0; } @@ -711,7 +712,6 @@ static void CalcPosVel(int type, const AActor *actor, const sector_t *sector, { case SOURCE_None: default: - pos->Zero(); break; case SOURCE_Actor: From 9482c3e6398709272d7139c33e43f7f28211c4fc Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sat, 11 Feb 2017 23:29:09 +0100 Subject: [PATCH 3/3] Fixed voxel clipping bug --- src/r_things.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_things.cpp b/src/r_things.cpp index 3d0ce269ec..b4ee5edbb8 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -2071,7 +2071,7 @@ void R_DrawSprite (vissprite_t *spr) // [RH] rewrote this to be based on which part of the sector is really visible double scale = InvZtoScale * spr->idepth; - double hzb = DBL_MIN, hzt = DBL_MAX; + double hzb = -DBL_MAX, hzt = DBL_MAX; if (spr->bIsVoxel && spr->floorclip != 0) {