diff --git a/source/games/duke/src/ccmds.cpp b/source/games/duke/src/ccmds.cpp index c4f701eb4..5727cab79 100644 --- a/source/games/duke/src/ccmds.cpp +++ b/source/games/duke/src/ccmds.cpp @@ -90,7 +90,7 @@ static int ccmd_spawn(CCmdFuncPtr parm) auto spawned = spawn(ps[myconnectindex].GetActor(), picnum); if (set & 1) spawned->s->pal = (uint8_t)pal; - if (set & 2) spawned->s->cstat = (short)cstat; + if (set & 2) spawned->s->cstat = (uint16_t)cstat; if (set & 4) spawned->s->ang = ang; if (set & 8) { if (setsprite(spawned, x, y, z) < 0) diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index ecc93ad76..18990826e 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -2206,7 +2206,7 @@ int ParseState::parse(void) break; case concmd_cstat: insptr++; - g_sp->cstat = (short) *insptr; + g_sp->cstat = (uint16_t)*insptr; insptr++; break; case concmd_newpic: diff --git a/source/games/duke/src/spawn_d.cpp b/source/games/duke/src/spawn_d.cpp index e86cf1671..8b2b4df91 100644 --- a/source/games/duke/src/spawn_d.cpp +++ b/source/games/duke/src/spawn_d.cpp @@ -259,7 +259,7 @@ int spawn_d(int j, int pn) case FORCESPHERE: if(j == -1 ) { - sp->cstat = (short) 32768; + sp->cstat = 32768; changespritestat(i,2); } else @@ -583,7 +583,7 @@ int spawn_d(int j, int pn) changespritestat(i, STAT_MISC); break; } - sp->cstat = (short)32768; + sp->cstat = 32768; changespritestat(i,11); break; @@ -901,7 +901,7 @@ int spawn_d(int j, int pn) case ACTIVATORLOCKED: case ACTIVATOR: - sp->cstat = (short) 32768; + sp->cstat = 32768; if(sp->picnum == ACTIVATORLOCKED) sp->sector()->lotag |= 16384; changespritestat(i,8); @@ -1111,7 +1111,7 @@ int spawn_d(int j, int pn) sp->shade = -16; if(sp->xrepeat <= 8) { - sp->cstat = (short)32768; + sp->cstat = 32768; sp->xrepeat=sp->yrepeat=0; } else sp->cstat = 1+256; diff --git a/source/games/duke/src/spawn_r.cpp b/source/games/duke/src/spawn_r.cpp index 1c8dcbb1c..3a507eab2 100644 --- a/source/games/duke/src/spawn_r.cpp +++ b/source/games/duke/src/spawn_r.cpp @@ -322,7 +322,7 @@ int spawn_r(int j, int pn) case FORCESPHERE: if (j == -1) { - sp->cstat = (short)32768; + sp->cstat = 32768; changespritestat(i,2); } else @@ -604,7 +604,7 @@ int spawn_r(int j, int pn) changespritestat(i, STAT_MISC); break; } - sp->cstat = (short)32768; + sp->cstat = 32768; changespritestat(i,11); break; case SOUNDFX: @@ -1371,7 +1371,7 @@ int spawn_r(int j, int pn) sp->shade = -16; if(sp->xrepeat <= 8) { - sp->cstat = (short)32768; + sp->cstat = 32768; sp->xrepeat=sp->yrepeat=0; } else sp->cstat = 1+256;