mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-11-12 14:09:43 +01:00
Remove script.dontrunnextframe kludge
Now that the game loop order is fixed, this kludge (on top of kludge) is no longer needed, and can be safely removed.
This commit is contained in:
parent
c82c2afbbd
commit
585ae47d78
4 changed files with 2 additions and 20 deletions
|
@ -2075,6 +2075,4 @@ void mapclass::twoframedelayfix(void)
|
|||
game.state = 0;
|
||||
game.statedelay = 0;
|
||||
script.load(game.newscript);
|
||||
script.run();
|
||||
script.dontrunnextframe = true;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ scriptclass::scriptclass(void)
|
|||
position = 0;
|
||||
scriptdelay = 0;
|
||||
running = false;
|
||||
dontrunnextframe = false;
|
||||
|
||||
b = 0;
|
||||
g = 0;
|
||||
|
@ -3492,10 +3491,6 @@ void scriptclass::teleport(void)
|
|||
game.state = 0;
|
||||
load(game.teleportscript);
|
||||
game.teleportscript = "";
|
||||
|
||||
// FIXME: Remove this once game loop order is fixed in 2.4!
|
||||
run();
|
||||
dontrunnextframe = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
int looppoint, loopcount;
|
||||
|
||||
int scriptdelay;
|
||||
bool running, dontrunnextframe;
|
||||
bool running;
|
||||
|
||||
//Textbox stuff
|
||||
int textx;
|
||||
|
|
|
@ -93,18 +93,6 @@ static void runscript(void)
|
|||
|
||||
static void gamemodefunc1(void)
|
||||
{
|
||||
// WARNING: If updating this code, don't forget to update Map.cpp mapclass::twoframedelayfix()
|
||||
|
||||
// Ugh, I hate this kludge variable but it's the only way to do it
|
||||
if (script.dontrunnextframe)
|
||||
{
|
||||
script.dontrunnextframe = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
runscript();
|
||||
}
|
||||
|
||||
//Update old lerp positions of entities - has to be done BEFORE gameinput!
|
||||
for (size_t i = 0; i < obj.entities.size(); i++)
|
||||
{
|
||||
|
@ -158,6 +146,7 @@ static const inline struct ImplFunc* get_gamestate_funcs(
|
|||
}
|
||||
|
||||
FUNC_LIST_BEGIN(GAMEMODE)
|
||||
{Func_fixed, runscript},
|
||||
{Func_fixed, gamemodefunc1},
|
||||
{Func_fixed, gameinput},
|
||||
{Func_fixed, gamerenderfixed},
|
||||
|
|
Loading…
Reference in a new issue