diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index c827cad5f..17c11c648 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -66,6 +66,11 @@ void G_DoInterpolations(int32_t smoothratio) //Stick at beginning of draws { int32_t i=g_numInterpolations-1, j = 0, odelta, ndelta = 0; + if (g_interpolationLock++) + { + return; + } + for (; i>=0; i--) { bakipos[i] = *curipos[i]; @@ -79,6 +84,12 @@ void G_DoInterpolations(int32_t smoothratio) //Stick at beginning of draws inline void G_RestoreInterpolations(void) //Stick at end of drawscreen { int32_t i=g_numInterpolations-1; + + if (--g_interpolationLock) + { + return; + } + for (; i>=0; i--) *curipos[i] = bakipos[i]; } diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 0fa9080d2..0391cf1b1 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -699,6 +699,7 @@ extern int32_t everyothertime; extern int32_t mymaxlag, otherminlag, bufferjitter; extern int32_t g_numInterpolations, startofdynamicinterpolations; +extern int32_t g_interpolationLock; extern int32_t oldipos[MAXINTERPOLATIONS]; extern int32_t bakipos[MAXINTERPOLATIONS]; extern int32_t *curipos[MAXINTERPOLATIONS]; diff --git a/polymer/eduke32/source/global.c b/polymer/eduke32/source/global.c index 372d25614..a928b0712 100644 --- a/polymer/eduke32/source/global.c +++ b/polymer/eduke32/source/global.c @@ -172,6 +172,7 @@ int32_t mymaxlag, otherminlag, bufferjitter = 1; int16_t g_numClouds,clouds[128],cloudx[128],cloudy[128]; int32_t cloudtotalclock = 0,totalmemory = 0; int32_t g_numInterpolations = 0, startofdynamicinterpolations = 0; +int32_t g_interpolationLock = 0; int32_t oldipos[MAXINTERPOLATIONS]; int32_t bakipos[MAXINTERPOLATIONS]; int32_t *curipos[MAXINTERPOLATIONS];