From 2e17467a8f0c03d21c290f79c85786df9c60e9aa Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 12 Mar 2020 01:05:37 +0000 Subject: [PATCH] Fix return type of A_CheckHitSprite() Since the returned value is a distance, it should be int32_t. git-svn-id: https://svn.eduke32.com/eduke32@8730 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/actors.cpp | 4 ++-- source/duke3d/src/sector.cpp | 2 +- source/duke3d/src/sector.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/duke3d/src/actors.cpp b/source/duke3d/src/actors.cpp index b55c7fff4..30f72fc95 100644 --- a/source/duke3d/src/actors.cpp +++ b/source/duke3d/src/actors.cpp @@ -2066,7 +2066,7 @@ ACTOR_STATIC void G_MoveStandables(void) updatesectorneighbor(pSprite->x, pSprite->y, &curSectNum, 1024, 2048); changespritesect(spriteNum, curSectNum); - int hitDist = A_CheckHitSprite(spriteNum, &hitSprite); + int32_t hitDist = A_CheckHitSprite(spriteNum, &hitSprite); actor[spriteNum].lastv.x = hitDist; pSprite->ang = oldAng; @@ -2133,7 +2133,7 @@ ACTOR_STATIC void G_MoveStandables(void) setsprite(spriteNum, &pSprite->pos); - int hitDist = A_CheckHitSprite(spriteNum, NULL); + int32_t const hitDist = A_CheckHitSprite(spriteNum, NULL); pSprite->pos.vec2 = { T4(spriteNum), T5(spriteNum) }; pSprite->z += (3<<8); diff --git a/source/duke3d/src/sector.cpp b/source/duke3d/src/sector.cpp index 65222f888..449df7e1a 100644 --- a/source/duke3d/src/sector.cpp +++ b/source/duke3d/src/sector.cpp @@ -3064,7 +3064,7 @@ CHECKINV1: } } -int A_CheckHitSprite(int spriteNum, int16_t *hitSprite) +int32_t A_CheckHitSprite(int spriteNum, int16_t *hitSprite) { hitdata_t hitData; int32_t zOffset = 0; diff --git a/source/duke3d/src/sector.h b/source/duke3d/src/sector.h index 147b3b035..e35c5a8d2 100644 --- a/source/duke3d/src/sector.h +++ b/source/duke3d/src/sector.h @@ -110,7 +110,7 @@ typedef struct { void G_ActivateBySector(int sect,int spriteNum); int S_FindMusicSFX(int sectNum, int *sndptr); int A_CallSound(int sectNum,int spriteNum); -int A_CheckHitSprite(int spriteNum,int16_t *hitSprite); +int32_t A_CheckHitSprite(int spriteNum,int16_t *hitSprite); void A_DamageObject_Duke3D(int spriteNum, int dmgSrc); void A_DamageObject_Generic(int spriteNum, int dmgSrc); void A_DamageObject(int spriteNum,int dmgSrc);