mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Clean up tsx/tsy initialization
Again, it used this severely overcomplicated expression for god knows what reason. I've replaced it with a simpler one. Also it's const just to indicate intent.
This commit is contained in:
parent
d591c77088
commit
fd2ee96c49
1 changed files with 2 additions and 2 deletions
|
@ -1680,8 +1680,8 @@ void mapclass::loadlevel(int rx, int ry)
|
||||||
int tempscriptbox=0;
|
int tempscriptbox=0;
|
||||||
for(size_t edi=0; edi<edentity.size(); edi++){
|
for(size_t edi=0; edi<edentity.size(); edi++){
|
||||||
//If entity is in this room, create it
|
//If entity is in this room, create it
|
||||||
int tsx=(edentity[edi].x-(edentity[edi].x%40))/40;
|
const int tsx = edentity[edi].x / 40;
|
||||||
int tsy=(edentity[edi].y-(edentity[edi].y%30))/30;
|
const int tsy = edentity[edi].y / 30;
|
||||||
if (tsx != rx-100 || tsy != ry-100)
|
if (tsx != rx-100 || tsy != ry-100)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue