mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Remove unused function entityclass::fixfriction()
This function was marked as unused by cppcheck.
This commit is contained in:
parent
a656f4c4d8
commit
ad34e95128
2 changed files with 0 additions and 23 deletions
|
@ -4372,27 +4372,6 @@ bool entityclass::testwallsy( int t, float tx, float ty )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void entityclass::fixfriction( int t, float xfix, float xrate, float yrate )
|
|
||||||
{
|
|
||||||
if (!INBOUNDS_VEC(t, entities))
|
|
||||||
{
|
|
||||||
puts("fixfriction() out-of-bounds!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (entities[t].vx > xfix) entities[t].vx -= xrate;
|
|
||||||
if (entities[t].vx < xfix) entities[t].vx += xrate;
|
|
||||||
if (entities[t].vy > 0) entities[t].vy -= yrate;
|
|
||||||
if (entities[t].vy < 0) entities[t].vy += yrate;
|
|
||||||
if (entities[t].vy > 10) entities[t].vy = 10;
|
|
||||||
if (entities[t].vy < -10) entities[t].vy = -10;
|
|
||||||
if (entities[t].vx > 6) entities[t].vx = 6.0f;
|
|
||||||
if (entities[t].vx < -6) entities[t].vx = -6.0f;
|
|
||||||
|
|
||||||
if (SDL_fabsf(entities[t].vx-xfix) <= xrate) entities[t].vx = xfix;
|
|
||||||
if (SDL_fabsf(entities[t].vy) < yrate) entities[t].vy = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void entityclass::applyfriction( int t, float xrate, float yrate )
|
void entityclass::applyfriction( int t, float xrate, float yrate )
|
||||||
{
|
{
|
||||||
if (!INBOUNDS_VEC(t, entities))
|
if (!INBOUNDS_VEC(t, entities))
|
||||||
|
|
|
@ -157,8 +157,6 @@ public:
|
||||||
|
|
||||||
bool testwallsy(int t, float tx, float ty);
|
bool testwallsy(int t, float tx, float ty);
|
||||||
|
|
||||||
void fixfriction(int t, float xfix, float xrate, float yrate);
|
|
||||||
|
|
||||||
void applyfriction(int t, float xrate, float yrate);
|
void applyfriction(int t, float xrate, float yrate);
|
||||||
|
|
||||||
void updateentitylogic(int t);
|
void updateentitylogic(int t);
|
||||||
|
|
Loading…
Reference in a new issue