Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Localize player_attached
- Loading branch information
Showing
with
2 additions
and
1 deletion.
-
+2
−1
mods/default/player.lua
|
@@ -162,14 +162,15 @@ end) |
|
|
|
|
|
-- Localize for better performance. |
|
|
local player_set_animation = default.player_set_animation |
|
|
local player_attached = default.player_attached |
|
|
|
|
|
-- Check each player and apply animations |
|
|
minetest.register_globalstep(function(dtime) |
|
|
for _, player in pairs(minetest.get_connected_players()) do |
|
|
local name = player:get_player_name() |
|
|
local model_name = player_model[name] |
|
|
local model = model_name and models[model_name] |
|
|
if model and not default.player_attached[name] then |
|
|
if model and not player_attached[name] then |
|
|
local controls = player:get_player_control() |
|
|
local walking = false |
|
|
local animation_speed_mod = model.animation_speed or 30 |
|
|
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.