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
0110e018
Commit
0110e018
authored
3 years ago
by
LoneWolfHT
Committed by
Lars Müller
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug and globalize `players` table
parent
268a8844
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mods/player_api/api.lua
+5
-5
5 additions, 5 deletions
mods/player_api/api.lua
with
5 additions
and
5 deletions
mods/player_api/api.lua
+
5
−
5
View file @
0110e018
...
...
@@ -50,9 +50,12 @@ end
-- Player stats and animations
-- model, textures, animation
local
players
=
{}
player_api
.
players
=
{}
player_api
.
player_attached
=
{}
-- Local for speed.
local
players
=
player_api
.
players
local
function
get_player_data
(
player
)
return
assert
(
players
[
player
:
get_player_name
()])
end
...
...
@@ -211,11 +214,8 @@ function player_api.globalstep()
end
-- Mods can modify the globalstep by overriding player_api.globalstep
-- local for speed
local
player_api_globalstep
=
player_api
.
globalstep
minetest
.
register_globalstep
(
function
(
...
)
player_api
_
globalstep
(
players
,
...
)
player_api
.
globalstep
(
...
)
end
)
for
_
,
api_function
in
pairs
({
"get_animation"
,
"set_animation"
,
"set_model"
,
"set_textures"
})
do
...
...
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