|
| 1 | +diff --git a/source/duke3d/src/actors.cpp b/source/duke3d/src/actors.cpp |
| 2 | +index 9a4405b2b..21f2570a4 100644 |
| 3 | +--- a/source/duke3d/src/actors.cpp |
| 4 | ++++ b/source/duke3d/src/actors.cpp |
| 5 | +@@ -507,25 +507,16 @@ int32_t A_MoveSpriteClipdist(int32_t spriteNum, vec3_t const * const change, uin |
| 6 | + |
| 7 | + int returnValue; |
| 8 | + int32_t diffZ; |
| 9 | +- spriteheightofs(spriteNum, &diffZ, 0); |
| 10 | +- int newZ = pSprite->z - diffZ; |
| 11 | ++ spriteheightofs(spriteNum, &diffZ, 1); |
| 12 | + |
| 13 | +- pSprite->z -= diffZ >> 1; |
| 14 | +- switch (pSprite->statnum) |
| 15 | ++ if (pSprite->statnum == STAT_PROJECTILE) |
| 16 | ++ returnValue = clipmovex(&pSprite->pos, &newSectnum, change->x << 13, change->y << 13, clipDist, diffZ >> 3, diffZ >> 3, clipType, 1); |
| 17 | ++ else |
| 18 | + { |
| 19 | +- default: |
| 20 | +- { |
| 21 | +- returnValue = clipmove(&pSprite->pos, &newSectnum, change->x << 13, change->y << 13, clipDist, ZOFFSET6, ZOFFSET6, clipType); |
| 22 | +- break; |
| 23 | +- } |
| 24 | +- |
| 25 | +- case STAT_PROJECTILE: |
| 26 | +- { |
| 27 | +- returnValue = clipmovex(&pSprite->pos, &newSectnum, change->x << 13, change->y << 13, clipDist, diffZ >> 1, diffZ >> 1, clipType, 1); |
| 28 | +- break; |
| 29 | +- } |
| 30 | ++ pSprite->z -= diffZ >> 1; |
| 31 | ++ returnValue = clipmove(&pSprite->pos, &newSectnum, change->x << 13, change->y << 13, clipDist, ZOFFSET6, ZOFFSET6, clipType); |
| 32 | ++ pSprite->z += diffZ >> 1; |
| 33 | + } |
| 34 | +- pSprite->z += diffZ >> 1; |
| 35 | + |
| 36 | + // Testing: For some reason the assert below this was tripping for clients |
| 37 | + EDUKE32_UNUSED int16_t dbg_ClipMoveSectnum = newSectnum; |
| 38 | +@@ -573,6 +564,7 @@ int32_t A_MoveSpriteClipdist(int32_t spriteNum, vec3_t const * const change, uin |
| 39 | + |
| 40 | + Bassert(newSectnum == pSprite->sectnum); |
| 41 | + |
| 42 | ++ int newZ = pSprite->z; |
| 43 | + int32_t ceilhit, florhit; |
| 44 | + int const doZUpdate = change->z ? A_CheckNeedZUpdate(spriteNum, change->z, &newZ, &ceilhit, &florhit) : 0; |
| 45 | + |
0 commit comments