1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-06 09:50:23 +02:00

Fix "bouncy" blocks

Remove some code which handles jumping on bouncy blocks. The removed code only lead to problems with jumping insanly high on blocks which belong to group "bouncy". If I remove it all works well.
I found no problems occuring when removing this code.
Sorry for my bad description, i'm not a very good english speaker.
This commit is contained in:
Miner59
2015-07-05 14:52:55 +02:00
parent a93838707a
commit c2a9189965

View File

@ -319,25 +319,15 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d,
/*
Report collisions
*/
bool bouncy_jump = false;
// Dont report if flying
if(collision_info && !(g_settings->getBool("free_move") && fly_allowed)) {
for(size_t i=0; i<result.collisions.size(); i++) {
const CollisionInfo &info = result.collisions[i];
collision_info->push_back(info);
if(info.new_speed.Y - info.old_speed.Y > 0.1*BS &&
info.bouncy)
bouncy_jump = true;
}
}
if(bouncy_jump && control.jump){
m_speed.Y += movement_speed_jump*BS;
touching_ground = false;
MtEvent *e = new SimpleTriggerEvent("PlayerJump");
m_gamedef->event()->put(e);
}
if(!touching_ground_was && touching_ground){
MtEvent *e = new SimpleTriggerEvent("PlayerRegainGround");
m_gamedef->event()->put(e);