From 316db0ee5e92ceae795f83c4742ef4c4503748ad Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 4 Apr 2018 20:48:15 +0000 Subject: [PATCH] Guards git-svn-id: https://svn.eduke32.com/eduke32@6804 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/actors.cpp | 2 ++ source/duke3d/src/player.cpp | 6 ++++++ source/duke3d/src/screens.cpp | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/source/duke3d/src/actors.cpp b/source/duke3d/src/actors.cpp index 36e3ba220..81b244ed9 100644 --- a/source/duke3d/src/actors.cpp +++ b/source/duke3d/src/actors.cpp @@ -8240,6 +8240,7 @@ void A_PlayAlertSound(int spriteNum) if ((VM_OnEventWithReturn(EVENT_RECOGSOUND, spriteNum, screenpeek, 0)) != 0) return; +#ifndef EDUKE32_STANDALONE switch (DYNAMICTILEMAP(PN(spriteNum))) { case LIZTROOPONTOILET__STATIC: @@ -8270,6 +8271,7 @@ void A_PlayAlertSound(int spriteNum) case BOSS4STAYPUT__STATIC: S_PlaySound((sprite[spriteNum].pal != 0) ? BOS4_RECOG : BOSS4_FIRSTSEE); break; case GREENSLIME__STATIC: A_PlaySound(SLIM_RECOG, spriteNum); break; } +#endif } } diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index 93316d16b..cb9a4a805 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -1071,6 +1071,7 @@ static int A_ShootCustom(int const spriteNum, int const projecTile, int shootAng } } +#ifndef EDUKE32_STANDALONE static int32_t A_ShootHardcoded(int spriteNum, int projecTile, int shootAng, vec3_t startPos, spritetype *pSprite, int const playerNum, DukePlayer_t * const pPlayer) { @@ -1537,6 +1538,7 @@ static int32_t A_ShootHardcoded(int spriteNum, int projecTile, int shootAng, vec return -1; } +#endif int A_ShootWithZvel(int const spriteNum, int const projecTile, int const forceZvel) { @@ -1607,9 +1609,13 @@ int A_ShootWithZvel(int const spriteNum, int const projecTile, int const forceZv #endif // POLYMER } +#ifdef EDUKE32_STANDALONE + return A_ShootCustom(spriteNum, projecTile, shootAng, &startPos); +#else return A_CheckSpriteTileFlags(projecTile, SFLAG_PROJECTILE) ? A_ShootCustom(spriteNum, projecTile, shootAng, &startPos) : A_ShootHardcoded(spriteNum, projecTile, shootAng, startPos, pSprite, playerNum, pPlayer); +#endif } diff --git a/source/duke3d/src/screens.cpp b/source/duke3d/src/screens.cpp index 3b6b7d277..7984eba5e 100644 --- a/source/duke3d/src/screens.cpp +++ b/source/duke3d/src/screens.cpp @@ -730,7 +730,7 @@ static void G_ShowCacheLocks(void) if (k >= ydim-12) break; - Bsprintf(tempbuf, "Locked- %d: Leng:%d, Lock:%d", i, cac[i].leng, *cac[i].lock); + Bsprintf(tempbuf, "Locked- %d: Leng:%zu, Lock:%d", i, cac[i].leng, *cac[i].lock); printext256(0L, k, COLOR_WHITE, -1, tempbuf, 1); k += 6; }