Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dmobs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Illuna-Minetest
dmobs
Commits
8917fb94
Commit
8917fb94
authored
Jan 30, 2019
by
argyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Crash Fix: Global set_animation is nil when trying to ride a dragon.
Change to mobs:set_animation fixes this.
parent
0e43362b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
api.lua
api.lua
+6
-6
No files found.
api.lua
View file @
8917fb94
...
...
@@ -127,13 +127,13 @@ function object_drive(entity, dtime, speed, shoots, arrow, moving_anim, stand_an
local
velo
=
entity
.
object
:
get_velocity
()
if
velo
.
x
==
0
and
velo
.
y
==
0
and
velo
.
z
==
0
then
if
stand_anim
and
stand_anim
~=
nil
and
mobs_redo
==
true
then
set_animation
(
entity
,
stand_anim
)
mobs
:
set_animation
(
entity
,
stand_anim
)
end
entity
.
object
:
set_pos
(
entity
.
object
:
get_pos
())
return
end
if
moving_anim
and
moving_anim
~=
nil
and
mobs_redo
==
true
then
set_animation
(
entity
,
moving_anim
)
mobs
:
set_animation
(
entity
,
moving_anim
)
end
--jumping not working
-- local jumps = jumps or false
...
...
@@ -192,13 +192,13 @@ function object_fly(entity, dtime, speed, shoots, arrow, moving_anim, stand_anim
--lib_mount animation
if
velo
.
x
==
0
and
velo
.
y
==
0
and
velo
.
z
==
0
then
if
stand_anim
and
stand_anim
~=
nil
and
mobs_redo
==
true
then
set_animation
(
entity
,
stand_anim
)
mobs
:
set_animation
(
entity
,
stand_anim
)
end
entity
.
object
:
set_pos
(
entity
.
object
:
get_pos
())
return
end
if
moving_anim
and
moving_anim
~=
nil
and
mobs_redo
==
true
then
set_animation
(
entity
,
moving_anim
)
mobs
:
set_animation
(
entity
,
moving_anim
)
end
end
...
...
@@ -287,13 +287,13 @@ function lib_mount.drive(entity, dtime, moving_anim, stand_anim, can_fly)
local
velo
=
entity
.
object
:
get_velocity
()
if
entity
.
v
==
0
and
velo
.
x
==
0
and
velo
.
y
==
0
and
velo
.
z
==
0
then
if
stand_anim
and
stand_anim
~=
nil
and
mobs_redo
==
true
then
set_animation
(
entity
,
stand_anim
)
mobs
:
set_animation
(
entity
,
stand_anim
)
end
entity
.
object
:
set_pos
(
entity
.
object
:
get_pos
())
return
end
if
moving_anim
and
moving_anim
~=
nil
and
mobs_redo
==
true
then
set_animation
(
entity
,
moving_anim
)
mobs
:
set_animation
(
entity
,
moving_anim
)
end
local
s
=
get_sign
(
entity
.
v
)
entity
.
v
=
entity
.
v
-
0
.
02
*
s
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment