Browse Source

number tweakings etc

opengl-renderer-broken
Martin Dørum 4 years ago
parent
commit
18265a30e2
2 changed files with 4 additions and 4 deletions
  1. 1
    1
      core.mod/src/entities/EntPlayer.cc
  2. 3
    3
      core.mod/src/entities/EntPlayer.h

+ 1
- 1
core.mod/src/entities/EntPlayer.cc View File

@@ -46,7 +46,7 @@ void EntPlayer::update(const Swan::Context &ctx, float dt) {

// Jump
if (body_.on_ground_ && jump_pressed && jump_timer_.periodic(0.5)) {
body_.vel_.y = -JUMP_FORCE;
body_.vel_.y = -JUMP_VEL;
}

// Fall down faster than we went up

+ 3
- 3
core.mod/src/entities/EntPlayer.h View File

@@ -20,10 +20,10 @@ public:
Swan::SRF *writeSRF(const Swan::Context &ctx) override;

private:
static constexpr float FORCE = 3000;
static constexpr float JUMP_FORCE = 11;
static constexpr float DOWN_FORCE = 1500;
static constexpr float MASS = 80;
static constexpr float FORCE = 34 * MASS;
static constexpr float JUMP_VEL = 11;
static constexpr float DOWN_FORCE = 20 * MASS;
static constexpr Swan::Vec2 SIZE = Swan::Vec2(0.6, 1.9);

enum class State {

Loading…
Cancel
Save