mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-11-24 22:34:21 +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:
1 parent
d3cdd33605
commit
04d14000ec
4 files changed
+17
-24
No files matched your search
@@ -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