mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 09:54:10 +03:00
Remove global 'temp' variable from titlerender.cpp
Just a miscellaneous code cleanup. There's no glitches that take advantage of the previous situation, namely that 'temp' was a global variable in Logic.cpp and editor.cpp. Even if there were, it seems like it would easily lead to some undefined behavior. So it's good to clean this up.
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
#include "Script.h"
|
||||
#include "Network.h"
|
||||
|
||||
extern int temp;
|
||||
extern scriptclass script;
|
||||
|
||||
void titlelogic()
|
||||
@@ -678,7 +677,7 @@ void gamelogic()
|
||||
if (map.final_colorframe == 1)
|
||||
{
|
||||
map.final_colorframedelay = 40;
|
||||
temp = 1+int(fRandom() * 6);
|
||||
int temp = 1+int(fRandom() * 6);
|
||||
if (temp == map.final_mapcol) temp = (temp + 1) % 6;
|
||||
if (temp == 0) temp = 6;
|
||||
map.changefinalcol(temp);
|
||||
@@ -686,7 +685,7 @@ void gamelogic()
|
||||
else if (map.final_colorframe == 2)
|
||||
{
|
||||
map.final_colorframedelay = 15;
|
||||
temp = 1+int(fRandom() * 6);
|
||||
int temp = 1+int(fRandom() * 6);
|
||||
if (temp == map.final_mapcol) temp = (temp + 1) % 6;
|
||||
if (temp == 0) temp = 6;
|
||||
map.changefinalcol(temp);
|
||||
|
||||
Reference in New Issue
Block a user