Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
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
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
Otowa Kotori
Tales of MajEyal
Commits
7ac3a5a6
Commit
7ac3a5a6
authored
6 years ago
by
Chris Davidson
Browse files
Options
Downloads
Patches
Plain Diff
Disable self damage for player projectiles unless explicitly overridden with player_selffire
parent
47bb7854
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
game/engines/default/engine/interface/ActorProject.lua
+7
-1
7 additions, 1 deletion
game/engines/default/engine/interface/ActorProject.lua
with
7 additions
and
1 deletion
game/engines/default/engine/interface/ActorProject.lua
+
7
−
1
View file @
7ac3a5a6
...
...
@@ -411,7 +411,13 @@ function _M:projectDoAct(typ, tg, damtype, dam, particles, px, py, tmp)
if
not
game
.
level
.
map
:
checkAllEntities
(
px
,
py
,
"projected"
,
self
,
typ
,
px
,
py
,
damtype
,
dam
,
particles
)
then
-- Check self- and friendly-fire, and if the projection "misses"
local
act
=
game
.
level
.
map
(
px
,
py
,
engine
.
Map
.
ACTOR
)
if
act
and
act
==
self
and
not
((
type
(
typ
.
selffire
)
==
"number"
and
rng
.
percent
(
typ
.
selffire
))
or
(
type
(
typ
.
selffire
)
~=
"number"
and
typ
.
selffire
))
then
if
act
and
act
==
self
and
not
(
((
type
(
typ
.
selffire
)
==
"number"
and
rng
.
percent
(
typ
.
selffire
))
or
(
type
(
typ
.
selffire
)
~=
"number"
and
typ
.
selffire
))
and
(
act
==
game
.
player
and
typ
.
player_selffire
)
-- Disable friendlyfire for player projectiles unless explicitly overriden
)
then
elseif
act
and
self
.
reactionToward
and
(
self
:
reactionToward
(
act
)
>=
0
)
and
not
((
type
(
typ
.
friendlyfire
)
==
"number"
and
rng
.
percent
(
typ
.
friendlyfire
))
or
(
type
(
typ
.
friendlyfire
)
~=
"number"
and
typ
.
friendlyfire
))
then
-- Otherwise hit
else
...
...
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