woups
This commit is contained in:
parent
6d07285f43
commit
f799e689d2
@ -84,7 +84,7 @@ Vector3f Player::GetInput(bool front, bool back, bool left, bool right, bool jum
|
|||||||
return delta;
|
return delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player::Sound Player::ApplyPhysics(Vector3f input, World* world, float elapsedTime, std::unordered_map<uint64_t, Booster*> booster_table) {
|
Player::Sound Player::ApplyPhysics(Vector3f input, World* world, float elapsedTime) {
|
||||||
Player::Sound snd = Player::Sound::NOSOUND;
|
Player::Sound snd = Player::Sound::NOSOUND;
|
||||||
static float timing = 0.f;
|
static float timing = 0.f;
|
||||||
/* Gestion de collisions */
|
/* Gestion de collisions */
|
||||||
@ -184,7 +184,7 @@ Player::Sound Player::ApplyPhysics(Vector3f input, World* world, float elapsedTi
|
|||||||
else isStep = false;
|
else isStep = false;
|
||||||
m_POV = m_position.y;
|
m_POV = m_position.y;
|
||||||
m_POV += m_airborne ? 0 : (sin(bobbingtime) - 0.5f) * (abs(m_velocity.x) + abs(m_velocity.z)) * .2f;
|
m_POV += m_airborne ? 0 : (sin(bobbingtime) - 0.5f) * (abs(m_velocity.x) + abs(m_velocity.z)) * .2f;
|
||||||
TakeBooster(booster_table, elapsedTime);
|
// TakeBooster(booster_table, elapsedTime);
|
||||||
RemoveBooster(elapsedTime);
|
RemoveBooster(elapsedTime);
|
||||||
return snd;
|
return snd;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ public:
|
|||||||
void TurnLeftRight(float value, float sensitivity);
|
void TurnLeftRight(float value, float sensitivity);
|
||||||
void TurnTopBottom(float value, float sensitivity);
|
void TurnTopBottom(float value, float sensitivity);
|
||||||
Vector3f GetInput(bool front, bool back, bool left, bool right, bool jump, bool dash, float elapsedTime);
|
Vector3f GetInput(bool front, bool back, bool left, bool right, bool jump, bool dash, float elapsedTime);
|
||||||
Sound ApplyPhysics(Vector3f input, World* world, float elapsedTime, std::unordered_map<uint64_t, Booster*> booster_table);
|
Sound ApplyPhysics(Vector3f input, World* world, float elapsedTime);
|
||||||
uint64_t TakeBooster(std::unordered_map<uint64_t, Booster*> booster_table, float elapsedTime);
|
uint64_t TakeBooster(std::unordered_map<uint64_t, Booster*> booster_table, float elapsedTime);
|
||||||
void GetBooster(BOOST_TYPE boosttype, float elapsedTime);
|
void GetBooster(BOOST_TYPE boosttype, float elapsedTime);
|
||||||
void RemoveBooster(float elapsedtime);
|
void RemoveBooster(float elapsedtime);
|
||||||
|
@ -170,7 +170,9 @@ Timestamp Connection::Run(World* world, std::unordered_map<uint64_t, Booster*> b
|
|||||||
in.keys.left,
|
in.keys.left,
|
||||||
in.keys.right,
|
in.keys.right,
|
||||||
in.keys.jump, false, el),
|
in.keys.jump, false, el),
|
||||||
world, el, boosters);
|
world, el);
|
||||||
|
|
||||||
|
player->TakeBooster(boosters, el);
|
||||||
|
|
||||||
if (player->GetPosition().y < -20.) {
|
if (player->GetPosition().y < -20.) {
|
||||||
player->InflictDamage(9000.);
|
player->InflictDamage(9000.);
|
||||||
|
Loading…
Reference in New Issue
Block a user