Commentaires
This commit is contained in:
parent
fc0dcc2ebd
commit
57e6c5192f
@ -25,7 +25,7 @@ void Player::Move(bool front, bool back, bool left, bool right, bool jump, bool
|
|||||||
static int dashtimeout = 0;
|
static int dashtimeout = 0;
|
||||||
static float gametime = 0;
|
static float gametime = 0;
|
||||||
|
|
||||||
if (gametime <= 360.f) gametime += elapsedTime*m_topspeed/2; else gametime = 0;
|
if (gametime <= 360.f) gametime += elapsedTime * m_topspeed / 2; else gametime = 0;
|
||||||
|
|
||||||
if (dashtimeout > 0) {
|
if (dashtimeout > 0) {
|
||||||
dash = false;
|
dash = false;
|
||||||
@ -75,7 +75,8 @@ void Player::Move(bool front, bool back, bool left, bool right, bool jump, bool
|
|||||||
if (dash) accWS = m_topspeed; // Pour avoir un boost de vitesse vers l'avant si le dash est appuyé seul.
|
if (dash) accWS = m_topspeed; // Pour avoir un boost de vitesse vers l'avant si le dash est appuyé seul.
|
||||||
}
|
}
|
||||||
|
|
||||||
m_position.y += accjmp + (sin(gametime) - 0.5f) * ((abs(accWS) + abs(accAD)) / 2.f) / (10.f * m_topspeed);;
|
// Ajoute l'accélération de saut et le view bobbing.
|
||||||
|
m_position.y += accjmp + (sin(gametime) - 0.5f) * ((abs(accWS) + abs(accAD)) / 2.f) / (10.f * m_topspeed);
|
||||||
|
|
||||||
if (front) {
|
if (front) {
|
||||||
if (dbljump == 0)
|
if (dbljump == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user