mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Retype testwallsy's tx and ty to be ints, not floats
I have no idea why they were floats in the first place. They are coordinates, and coordinates are integer positions in this game. They get converted to float only to be explicitly `static_cast`ed back to ints in `testwallsy`.
This commit is contained in:
@@ -4473,7 +4473,7 @@ bool entityclass::testwallsx( int t, int tx, int ty, const bool skipdirblocks )
|
||||
return true;
|
||||
}
|
||||
|
||||
bool entityclass::testwallsy( int t, float tx, float ty )
|
||||
bool entityclass::testwallsy( int t, int tx, int ty )
|
||||
{
|
||||
if (!INBOUNDS_VEC(t, entities))
|
||||
{
|
||||
@@ -4482,8 +4482,8 @@ bool entityclass::testwallsy( int t, float tx, float ty )
|
||||
}
|
||||
|
||||
SDL_Rect temprect;
|
||||
temprect.x = static_cast<int>(tx) + entities[t].cx;
|
||||
temprect.y = static_cast<int>(ty) + entities[t].cy;
|
||||
temprect.x = tx + entities[t].cx;
|
||||
temprect.y = ty + entities[t].cy;
|
||||
temprect.w = entities[t].w;
|
||||
temprect.h = entities[t].h;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user