diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index cf0064e21..e30206351 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -5082,7 +5082,10 @@ static void drawvox(int32_t dasprx, int32_t daspry, int32_t dasprz, int32_t dasp rx -= lx; l1 = distrecip[(ny-yoff)>>14]; - l2 = distrecip[(ny+yoff)>>14]; + // FIXME! AMCTC RC2/beta shotgun voxel + // (e.g. training map right after M16 shooting): + l2 = clamp((ny+yoff)>>14, 0, 65535); + l2 = distrecip[l2]; for (; voxptr