From 2d2e789ce02e923a56df3000a4398a76663b02ee Mon Sep 17 00:00:00 2001 From: Flugente Date: Sun, 1 Oct 2017 12:02:38 +0000 Subject: [PATCH] Fix: display riot shields only if soldier is seen (relevant on non-player controlled soldiers) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8487 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- TileEngine/Explosion Control.cpp | 3 ++- TileEngine/renderworld.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/TileEngine/Explosion Control.cpp b/TileEngine/Explosion Control.cpp index 0ac60f36..4548017b 100644 --- a/TileEngine/Explosion Control.cpp +++ b/TileEngine/Explosion Control.cpp @@ -4353,7 +4353,8 @@ void HandleExplosionWarningAnimations( ) pSoldier->ubDirection == SOUTH || pSoldier->ubDirection == SOUTHWEST || pSoldier->ubDirection == NORTHEAST) - && pSoldier->IsRiotShieldEquipped( ) ) + && pSoldier->bVisible != -1 + && pSoldier->IsRiotShieldEquipped( ) ) { ShowRiotShield( pSoldier ); } diff --git a/TileEngine/renderworld.cpp b/TileEngine/renderworld.cpp index dd1ce8b0..3c2cb23d 100644 --- a/TileEngine/renderworld.cpp +++ b/TileEngine/renderworld.cpp @@ -1899,6 +1899,7 @@ void RenderTiles(UINT32 uiFlags, INT32 iStartPointX_M, INT32 iStartPointY_M, INT // Flugente: riot shields if ( pSoldier && + pSoldier->bVisible != -1 && (pSoldier->ubDirection == NORTH || pSoldier->ubDirection == NORTHWEST || pSoldier->ubDirection == WEST)