Compare commits
2 Commits
775ac4c40c
...
8c472ed73d
Author | SHA1 | Date |
---|---|---|
leo60228 | 8c472ed73d | |
leo60228 | c4893a133f |
|
@ -4389,8 +4389,8 @@ void entityclass::fixfriction( int t, float xfix, float xrate, float yrate )
|
||||||
if (entities[t].vx > 6) entities[t].vx = 6.0f;
|
if (entities[t].vx > 6) entities[t].vx = 6.0f;
|
||||||
if (entities[t].vx < -6) entities[t].vx = -6.0f;
|
if (entities[t].vx < -6) entities[t].vx = -6.0f;
|
||||||
|
|
||||||
if (std::abs(entities[t].vx-xfix) <= xrate) entities[t].vx = xfix;
|
if (SDL_abs(entities[t].vx-xfix) <= xrate) entities[t].vx = xfix;
|
||||||
if (std::abs(entities[t].vy) < yrate) entities[t].vy = 0;
|
if (SDL_abs(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 )
|
||||||
|
@ -4410,8 +4410,9 @@ void entityclass::applyfriction( int t, float xrate, float yrate )
|
||||||
if (entities[t].vx > 6.00f) entities[t].vx = 6.0f;
|
if (entities[t].vx > 6.00f) entities[t].vx = 6.0f;
|
||||||
if (entities[t].vx < -6.00f) entities[t].vx = -6.0f;
|
if (entities[t].vx < -6.00f) entities[t].vx = -6.0f;
|
||||||
|
|
||||||
if (std::abs(entities[t].vx) < xrate) entities[t].vx = 0.0f;
|
// This should *not* be changed to use SDL_fabsf, which would cause noticable differences in physics.
|
||||||
if (std::abs(entities[t].vy) < yrate) entities[t].vy = 0.0f;
|
if (SDL_abs(entities[t].vx) < xrate) entities[t].vx = 0.0f;
|
||||||
|
if (SDL_abs(entities[t].vy) < yrate) entities[t].vy = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void entityclass::updateentitylogic( int t )
|
void entityclass::updateentitylogic( int t )
|
||||||
|
|
|
@ -1824,7 +1824,8 @@ void gameinput()
|
||||||
if (game.activetele && game.readytotele > 20 && !game.intimetrial)
|
if (game.activetele && game.readytotele > 20 && !game.intimetrial)
|
||||||
{
|
{
|
||||||
enter_already_processed = true;
|
enter_already_processed = true;
|
||||||
if(int(std::abs(obj.entities[ie].vx))<=1 && int(obj.entities[ie].vy)==0)
|
// This should *not* be changed to use SDL_fabsf, which would prevent activating an teleporter when `vx > 1.0 && vx < 2.0`.
|
||||||
|
if(int(SDL_abs(obj.entities[ie].vx))<=1 && int(obj.entities[ie].vy)==0)
|
||||||
{
|
{
|
||||||
//wait! space station 2 debug thingy
|
//wait! space station 2 debug thingy
|
||||||
if (game.teleportscript != "")
|
if (game.teleportscript != "")
|
||||||
|
@ -1890,7 +1891,8 @@ void gameinput()
|
||||||
else if (INBOUNDS_VEC(game.activeactivity, obj.blocks))
|
else if (INBOUNDS_VEC(game.activeactivity, obj.blocks))
|
||||||
{
|
{
|
||||||
enter_already_processed = true;
|
enter_already_processed = true;
|
||||||
if((int(std::abs(obj.entities[ie].vx))<=1) && (int(obj.entities[ie].vy) == 0) )
|
// This should *not* be changed to use SDL_fabsf, which would prevent activating an activity zone when `vx > 1.0 && vx < 2.0`.
|
||||||
|
if((int(SDL_abs(obj.entities[ie].vx))<=1) && (int(obj.entities[ie].vy) == 0) )
|
||||||
{
|
{
|
||||||
script.load(obj.blocks[game.activeactivity].script);
|
script.load(obj.blocks[game.activeactivity].script);
|
||||||
obj.removeblock(game.activeactivity);
|
obj.removeblock(game.activeactivity);
|
||||||
|
|
Loading…
Reference in New Issue