That was actually another thought of mine reading the code about swimming. While I don't think it should be a Jesus mod of walking on water, I think some kind of "boost" while in water would be acceptable. For example, in my worlds I'm frequently attacked by sharks. One should be able to go from a leisurely swim to SHTF mode to get to shore.texmex wrote:Good spotting, turducken. This relates to the the walkable check, correct. It was mainly implemented with water in mind, so that you can't sprint run in or on the water surface which you can do with the other sprint mods available. I suppose I could check for walkable or air nodes instead of just walkables.
I agree, stamina should be independent of dtime, with its own timer. I'll se if I can get around to it.decrease the stamina by dtime in global step, but is dtime variable, as that would throw a wrench into reducing hunger in predictable ways
I'm obviously not sure how that would be checked as I'm new to the minetest mod api. I assume the other mods check the ground you're on, and somehow you "jump" up a node so that you're not "on" water anymore. Perhaps checking two nodes down? Perhaps a "was in water now in air" check?
Another thought I had, somewhat related, is jumping using up stamina and hunger. I know that hbhunger already takes into account placing and removing nodes, but as far as I can tell from the code it doesn't account for walking or other movement (I suppose this is best brought up in that forum.) Perhaps hbsprint should set a "stamina" or "hunger" factor as a multiplier in monoids. Regular walking, jumping uses normal hunger, while hurried running and jumping uses up more. A slow-down effect while eating my also help.
Again, how these interrelate with hbhunger I'm not sure, but they obviously need to interact (possibly though that monoids api.)