mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03: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:
@@ -1680,8 +1680,8 @@ void mapclass::loadlevel(int rx, int ry)
|
||||
int tempscriptbox=0;
|
||||
for(size_t edi=0; edi<edentity.size(); edi++){
|
||||
//If entity is in this room, create it
|
||||
int tsx=(edentity[edi].x-(edentity[edi].x%40))/40;
|
||||
int tsy=(edentity[edi].y-(edentity[edi].y%30))/30;
|
||||
const int tsx = edentity[edi].x / 40;
|
||||
const int tsy = edentity[edi].y / 30;
|
||||
if (tsx != rx-100 || tsy != ry-100)
|
||||
{
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user