1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-28 12:46:02 +02:00

Add boats

This commit is contained in:
BlockMen
2014-05-03 12:09:17 +02:00
parent 60ccb522d4
commit 18d0bdd2bb
7 changed files with 11314 additions and 1 deletions

View File

@ -84,6 +84,7 @@ local player_model = {}
local player_textures = {}
local player_anim = {}
local player_sneak = {}
default.player_attached = {}
function default.player_get_animation(player)
local name = player:get_player_name()
@ -140,6 +141,7 @@ end
-- Update appearance when the player joins
minetest.register_on_joinplayer(function(player)
default.player_attached[player:get_player_name()] = false
default.player_set_model(player, "character.x")
player:set_local_animation({x=0, y=79}, {x=168, y=187}, {x=189, y=198}, {x=200, y=219}, 30)
@ -171,7 +173,7 @@ minetest.register_globalstep(function(dtime)
local name = player:get_player_name()
local model_name = player_model[name]
local model = model_name and models[model_name]
if model then
if model and not default.player_attached[name] then
local controls = player:get_player_control()
local walking = false
local animation_speed_mod = model.animation_speed or 30