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
38dc7746
There was a problem fetching the pipeline summary.
Commit
38dc7746
authored
8 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
43faff1e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
game/engines/default/engine/interface/ActorAI.lua
+1
-1
1 addition, 1 deletion
game/engines/default/engine/interface/ActorAI.lua
with
1 addition
and
1 deletion
game/engines/default/engine/interface/ActorAI.lua
+
1
−
1
View file @
38dc7746
...
...
@@ -190,7 +190,7 @@ function _M:aiSeeTargetPos(target)
if
LSeen
.
GCache_x
then
-- update guess with new random position. Could use util.findFreeGrid here at cost of speed
tx
=
math.floor
(
LSeen
.
GCache_x
+
(
tx
-
LSeen
.
GCache_x
)
/
2
)
ty
=
math.floor
(
LSeen
.
GCache_y
+
(
ty
-
LSeen
.
GCache_y
)
/
2
)
if
not
target
:
canMove
(
tx
,
ty
,
true
)
or
(
tx
==
self
.
x
and
ty
==
self
.
y
)
then
-- find a reasonable spot if target can't be at that position
if
(
target
.
canMove
and
not
target
:
canMove
(
tx
,
ty
,
true
)
)
or
(
tx
==
self
.
x
and
ty
==
self
.
y
)
then
-- find a reasonable spot if target can't be at that position
local
nx
,
ny
=
util
.
findFreeGrid
(
tx
,
ty
,
math.max
(
1
,
spread
),
false
)
if
nx
then
tx
,
ty
=
nx
,
ny
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