minetest/minetest — pull request #598 by MirceaKitsune (2013-04-04 22:32:11+00:00)
Title: Per-player speed / jump / gravity overrides

Since I coded the new player physics, people frequently asked if something could be done to create low gravity areas and allow per-player weights. RealBadAngel also said he's like to do a jump boots powerup for one of his ideas, and I don't think running boots would be a bad idea either (or slow nodes like MineCraft's "soul sand").

So here's a patch which allows doing all that. It implements a new Lua function that can modify walking speed, jump height and gravity for individual players. To test it, use this function in a Lua script: player:set_physics_override(float_speed, float_jump, float_gravity). By default all values are 1... 0.5 means half of the normal amount while 2 means double the normal amount. They basically multiply the global physics settings in minetest.conf for individual players as optional overrides.

I found this the cleanest and safest implementation so I hope no major changes are needed there. Optimally, instead of functions those should be global player flags... but I'm not aware of such a thing for players yet. If anyone can improve the implementation or point out how to do it I'll modify the code.