Fix ed.currentghosts updating way too fast

Just like all the other fixes, the variable that controls the amount of
ghosts to show was being updated every render frame instead of every
logic frame.
This commit is contained in:
Misa authored and Ethan Lee committed 2020-06-19 09:05:48 -04:00
1 parent 92ff6ac8fc
commit d1b1ed830b
1 file changed
+10 -6
+10 -6
View File
@@ -2900,12 +2900,6 @@ void editorrender()
BlitSurfaceColoured(graphics.sprites[ed.ghosts[i].frame],NULL, graphics.ghostbuffer, &drawRect, graphics.ct);
}
}
if (ed.currentghosts + 1 < (int)ed.ghosts.size()) {
ed.currentghosts++;
if (ed.zmod) ed.currentghosts++;
} else {
ed.currentghosts = (int)ed.ghosts.size() - 1;
}
SDL_BlitSurface(graphics.ghostbuffer, NULL, graphics.backBuffer, &graphics.bg_rect);
}
@@ -3625,6 +3619,16 @@ void editorlogic()
ed.notedelay--;
}
if (game.ghostsenabled)
{
if (ed.currentghosts + 1 < (int)ed.ghosts.size()) {
ed.currentghosts++;
if (ed.zmod) ed.currentghosts++;
} else {
ed.currentghosts = (int)ed.ghosts.size() - 1;
}
}
if (!ed.settingsmod)
{
switch(ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir)