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
d735f199
There was a problem fetching the pipeline summary.
Commit
d735f199
authored
8 years ago
by
DarkGod
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of git.net-core.org:tome/t-engine4
parents
56b96084
68afde64
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/Target.lua
+16
-9
16 additions, 9 deletions
game/engines/default/engine/Target.lua
with
16 additions
and
9 deletions
game/engines/default/engine/Target.lua
+
16
−
9
View file @
d735f199
...
...
@@ -529,7 +529,6 @@ _M.defaults.block_radius = function(typ, lx, ly, for_highlights)
if
not
trn_pass
then
blocked
=
true
end
-- blocked by terrain
end
end
if
not
blocked
and
typ
.
stop_block
then
-- check all entities
-- get #blocking entities and subtract for each entity that can be explicitly passed through
local
nb
=
map
:
checkAllEntitiesCount
(
lx
,
ly
,
"block_move"
)
...
...
@@ -539,19 +538,27 @@ _M.defaults.block_radius = function(typ, lx, ly, for_highlights)
nb
=
nb
-
1
end
end
if
nb
>
0
and
(
typ
.
friendlyblock
~=
nil
or
not
typ
.
actorblock
)
then
-- decrement for passable actors
if
nb
>
0
then
local
a
=
map
(
lx
,
ly
,
engine
.
Map
.
ACTOR
)
if
a
then
-- friendly block controls if specified
if
typ
.
friendlyblock
~=
nil
and
typ
.
source_actor
and
typ
.
source_actor
.
reactionToward
and
typ
.
source_actor
:
reactionToward
(
a
)
>=
0
then
if
not
typ
.
friendlyblock
then
nb
=
nb
-
1
end
elseif
not
typ
.
actorblock
then
if
a
then
-- decrement for passable actors
-- For targeting highlights, don't show as blocked if the player can't see the actor
if
for_highlights
and
typ
.
source_actor
and
typ
.
source_actor
.
canSee
and
not
typ
.
source_actor
:
canSee
(
a
)
then
nb
=
nb
-
1
else
if
typ
.
friendlyblock
==
nil
and
not
typ
.
actorblock
then
-- friendly block controls if specified
nb
=
nb
-
1
else
if
typ
.
friendlyblock
~=
nil
and
typ
.
source_actor
and
typ
.
source_actor
.
reactionToward
and
typ
.
source_actor
:
reactionToward
(
a
)
>=
0
then
if
not
typ
.
friendlyblock
then
nb
=
nb
-
1
end
elseif
not
typ
.
actorblock
then
nb
=
nb
-
1
end
end
end
end
end
if
nb
>
0
then
blocked
=
true
end
if
nb
>
0
then
blocked
=
true
end
end
-- treat unknown grids as non-blocking for player targeting highlights
if
blocked
and
not
(
for_highlights
and
not
(
map
.
remembers
(
lx
,
ly
)
or
map
.
seens
(
lx
,
ly
)))
then
return
true
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