Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
minetest_game
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
minetest_game
Commits
11c04e98
Commit
11c04e98
authored
10 years ago
by
BlockMen
Browse files
Options
Downloads
Patches
Plain Diff
Localize player_attached
parent
ef1f66a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mods/default/player.lua
+2
-1
2 additions, 1 deletion
mods/default/player.lua
with
2 additions
and
1 deletion
mods/default/player.lua
+
2
−
1
View file @
11c04e98
...
...
@@ -162,6 +162,7 @@ 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
)
...
...
@@ -169,7 +170,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
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment