last_pitch(0),
last_yaw(0),
last_keyPressed(0),
+ camera_impact(0.f),
last_animation(NO_ANIM),
hotbar_image(""),
hotbar_selected_image(""),
v3f accel_f = v3f(0,0,0);
collisionMoveResult result = collisionMoveSimple(env, m_gamedef,
- pos_max_d, m_collisionbox, player_stepheight, dtime,
- position, m_speed, accel_f);
+ pos_max_d, m_collisionbox, player_stepheight, dtime,
+ &position, &m_speed, accel_f);
/*
If the player's feet touch the topside of any node, this is
}
}
- if(!touching_ground_was && touching_ground){
+ if(!result.standing_on_object && !touching_ground_was && touching_ground) {
MtEvent *e = new SimpleTriggerEvent("PlayerRegainGround");
m_gamedef->event()->put(e);
}
}
- if(continuous_forward)
+ if (continuous_forward)
speedH += move_direction;
- if(control.up)
- {
- if(continuous_forward)
- superspeed = true;
- else
+ if (control.up) {
+ if (continuous_forward) {
+ if (fast_move)
+ superspeed = true;
+ } else {
speedH += move_direction;
+ }
}
if(control.down)
{