Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
tome
Tales of MajEyal
Commits
6028979d
There was a problem fetching the pipeline summary.
Commit
6028979d
authored
8 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
Fix random freeze/random stop at high run speed
parent
773e9837
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
game/modules/tome/class/Game.lua
+15
-11
15 additions, 11 deletions
game/modules/tome/class/Game.lua
game/modules/tome/class/Player.lua
+5
-3
5 additions, 3 deletions
game/modules/tome/class/Player.lua
with
20 additions
and
14 deletions
game/modules/tome/class/Game.lua
+
15
−
11
View file @
6028979d
...
...
@@ -1866,9 +1866,13 @@ do return end
for
_
,
node
in
ipairs
(
seen
)
do
node
.
actor
:
addParticles
(
engine
.
Particles
.
new
(
"notice_enemy"
,
1
))
end
elseif
not
self
.
player
:
autoExplore
()
then
self
.
log
(
"There is nowhere left to explore."
)
self
:
triggerHook
{
"Player:autoExplore:nowhere"
}
else
if
not
self
.
player
:
autoExplore
()
then
self
.
log
(
"There is nowhere left to explore."
)
self
:
triggerHook
{
"Player:autoExplore:nowhere"
}
else
while
self
.
player
:
enoughEnergy
()
and
self
.
player
:
runStep
()
do
end
end
end
end
end
...
...
@@ -1880,14 +1884,14 @@ do return end
end
end
,
RUN_LEFT
=
function
()
self
.
player
:
runInit
(
4
)
end
,
RUN_RIGHT
=
function
()
self
.
player
:
runInit
(
6
)
end
,
RUN_UP
=
function
()
self
.
player
:
runInit
(
8
)
end
,
RUN_DOWN
=
function
()
self
.
player
:
runInit
(
2
)
end
,
RUN_LEFT_UP
=
function
()
self
.
player
:
runInit
(
7
)
end
,
RUN_LEFT_DOWN
=
function
()
self
.
player
:
runInit
(
1
)
end
,
RUN_RIGHT_UP
=
function
()
self
.
player
:
runInit
(
9
)
end
,
RUN_RIGHT_DOWN
=
function
()
self
.
player
:
runInit
(
3
)
end
,
RUN_LEFT
=
function
()
self
.
player
:
runInit
(
4
)
while
self
.
player
:
enoughEnergy
()
and
self
.
player
:
runStep
()
do
end
end
,
RUN_RIGHT
=
function
()
self
.
player
:
runInit
(
6
)
while
self
.
player
:
enoughEnergy
()
and
self
.
player
:
runStep
()
do
end
end
,
RUN_UP
=
function
()
self
.
player
:
runInit
(
8
)
while
self
.
player
:
enoughEnergy
()
and
self
.
player
:
runStep
()
do
end
end
,
RUN_DOWN
=
function
()
self
.
player
:
runInit
(
2
)
while
self
.
player
:
enoughEnergy
()
and
self
.
player
:
runStep
()
do
end
end
,
RUN_LEFT_UP
=
function
()
self
.
player
:
runInit
(
7
)
while
self
.
player
:
enoughEnergy
()
and
self
.
player
:
runStep
()
do
end
end
,
RUN_LEFT_DOWN
=
function
()
self
.
player
:
runInit
(
1
)
while
self
.
player
:
enoughEnergy
()
and
self
.
player
:
runStep
()
do
end
end
,
RUN_RIGHT_UP
=
function
()
self
.
player
:
runInit
(
9
)
while
self
.
player
:
enoughEnergy
()
and
self
.
player
:
runStep
()
do
end
end
,
RUN_RIGHT_DOWN
=
function
()
self
.
player
:
runInit
(
3
)
while
self
.
player
:
enoughEnergy
()
and
self
.
player
:
runStep
()
do
end
end
,
ATTACK_OR_MOVE_LEFT
=
function
()
self
.
player
:
attackOrMoveDir
(
4
)
end
,
ATTACK_OR_MOVE_RIGHT
=
function
()
self
.
player
:
attackOrMoveDir
(
6
)
end
,
...
...
This diff is collapsed.
Click to expand it.
game/modules/tome/class/Player.lua
+
5
−
3
View file @
6028979d
...
...
@@ -385,10 +385,12 @@ function _M:act()
-- Resting ? Running ? Otherwise pause
if
self
.
player
and
self
:
enoughEnergy
()
then
if
self
:
restStep
()
then
while
self
:
enoughEnergy
()
d
o
self
:
restStep
()
end
while
self
:
enoughEnergy
()
an
d
self
:
restStep
()
do
end
elseif
self
:
runStep
()
then
while
self
:
enoughEnergy
()
do
self
:
runStep
()
end
else
while
self
:
enoughEnergy
()
and
self
:
runStep
()
do
end
end
if
self
:
enoughEnergy
()
then
game
.
paused
=
true
if
game
.
uiset
.
logdisplay
:
getNewestLine
()
~=
""
then
game
.
log
(
""
)
end
end
...
...
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