mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01: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:
parent
12820473db
commit
ec520838df
2 changed files with 4 additions and 4 deletions
|
@ -4473,7 +4473,7 @@ bool entityclass::testwallsx( int t, int tx, int ty, const bool skipdirblocks )
|
||||||
return true;
|
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))
|
if (!INBOUNDS_VEC(t, entities))
|
||||||
{
|
{
|
||||||
|
@ -4482,8 +4482,8 @@ bool entityclass::testwallsy( int t, float tx, float ty )
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Rect temprect;
|
SDL_Rect temprect;
|
||||||
temprect.x = static_cast<int>(tx) + entities[t].cx;
|
temprect.x = tx + entities[t].cx;
|
||||||
temprect.y = static_cast<int>(ty) + entities[t].cy;
|
temprect.y = ty + entities[t].cy;
|
||||||
temprect.w = entities[t].w;
|
temprect.w = entities[t].w;
|
||||||
temprect.h = entities[t].h;
|
temprect.h = entities[t].h;
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,7 @@ public:
|
||||||
|
|
||||||
bool testwallsx(int t, int tx, int ty, bool skipdirblocks);
|
bool testwallsx(int t, int tx, int ty, bool skipdirblocks);
|
||||||
|
|
||||||
bool testwallsy(int t, float tx, float ty);
|
bool testwallsy(int t, int tx, int ty);
|
||||||
|
|
||||||
void applyfriction(int t, float xrate, float yrate);
|
void applyfriction(int t, float xrate, float yrate);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue