Improve movement

This commit is contained in:
Miloslav Číž 2018-09-07 19:52:04 +02:00
parent 49dc149952
commit cee662ed6b

View file

@ -689,6 +689,7 @@ public:
mCamera.collisionRadius = UNITS_PER_SQUARE / 4; mCamera.collisionRadius = UNITS_PER_SQUARE / 4;
mCamera.collisionHeightBelow = UNITS_PER_SQUARE; mCamera.collisionHeightBelow = UNITS_PER_SQUARE;
mCamera.collisionHeightAbove = UNITS_PER_SQUARE / 3; mCamera.collisionHeightAbove = UNITS_PER_SQUARE / 3;
mCamera.collisionStepHeight = UNITS_PER_SQUARE / 2;
} }
}; };
@ -846,7 +847,7 @@ int main()
{ {
draw(); draw();
const int16_t step = max(UNITS_PER_SQUARE / 7,1); int16_t step = max(1,UNITS_PER_SQUARE / (p.bBtn() ? 7 : 15));
const int16_t step2 = max(UNITS_PER_SQUARE / 40,1); const int16_t step2 = max(UNITS_PER_SQUARE / 40,1);
Vector2D d = angleToDirection(player.mCamera.direction); Vector2D d = angleToDirection(player.mCamera.direction);