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
0be621f4
Commit
0be621f4
authored
14 years ago
by
dg
Browse files
Options
Downloads
Patches
Plain Diff
fix
git-svn-id:
http://svn.net-core.org/repos/t-engine4@1875
51575b47-30f0-44d4-a5cc-537603b46e54
parent
0ef63ef2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
game/engines/default/engine/Level.lua
+2
-2
2 additions, 2 deletions
game/engines/default/engine/Level.lua
game/engines/default/engine/Projectile.lua
+6
-6
6 additions, 6 deletions
game/engines/default/engine/Projectile.lua
with
8 additions
and
8 deletions
game/engines/default/engine/Level.lua
+
2
−
2
View file @
0be621f4
...
...
@@ -54,8 +54,8 @@ function _M:addEntity(e, after)
end
--- Removes an entity from the level
function
_M
:
removeEntity
(
e
,
no_warning
)
if
not
no_warning
and
not
self
.
entities
[
e
.
uid
]
then
error
(
"Entity "
..
e
.
uid
..
"("
..
e
.
name
..
") not present on the level"
)
end
function
_M
:
removeEntity
(
e
)
if
not
self
.
entities
[
e
.
uid
]
then
error
(
"Entity "
..
e
.
uid
..
"("
..
e
.
name
..
") not present on the level"
)
end
self
.
entities
[
e
.
uid
]
=
nil
for
i
=
1
,
#
self
.
e_array
do
if
self
.
e_array
[
i
]
==
e
then
...
...
This diff is collapsed.
Click to expand it.
game/engines/default/engine/Projectile.lua
+
6
−
6
View file @
0be621f4
...
...
@@ -201,17 +201,17 @@ function _M:act()
if
not
radius_x
then
radius_x
,
radius_y
=
self
.
old_x
,
self
.
old_y
end
self
.
src
:
projectDoStop
(
self
.
project
.
def
.
typ
,
self
.
project
.
def
.
tg
,
self
.
project
.
def
.
damtype
,
self
.
project
.
def
.
dam
,
self
.
project
.
def
.
particles
,
radius_x
,
radius_y
,
self
.
tmp_proj
)
game
.
level
:
removeEntity
(
self
,
true
)
game
.
level
:
removeEntity
(
self
)
self
.
dead
=
true
self
.
src
:
projectDoStop
(
self
.
project
.
def
.
typ
,
self
.
project
.
def
.
tg
,
self
.
project
.
def
.
damtype
,
self
.
project
.
def
.
dam
,
self
.
project
.
def
.
particles
,
radius_x
,
radius_y
,
self
.
tmp_proj
)
end
elseif
self
.
homing
then
self
:
moveDirection
(
self
.
homing
.
target
.
x
,
self
.
homing
.
target
.
y
)
self
.
homing
.
count
=
self
.
homing
.
count
-
1
if
(
self
.
x
==
self
.
homing
.
target
.
x
and
self
.
y
==
self
.
homing
.
target
.
y
)
or
self
.
homing
.
count
<=
0
then
self
.
homing
.
on_hit
(
self
,
self
.
src
,
self
.
homing
.
target
)
game
.
level
:
removeEntity
(
self
,
true
)
game
.
level
:
removeEntity
(
self
)
self
.
dead
=
true
self
.
homing
.
on_hit
(
self
,
self
.
src
,
self
.
homing
.
target
)
else
self
.
homing
.
on_move
(
self
,
self
.
src
)
end
...
...
@@ -224,9 +224,9 @@ end
--- Something moved in the same spot as us, hit ?
function
_M
:
on_move
(
x
,
y
,
target
)
if
self
.
project
and
self
.
project
.
def
.
typ
.
stop_block
then
self
.
src
:
projectDoStop
(
self
.
project
.
def
.
typ
,
self
.
project
.
def
.
tg
,
self
.
project
.
def
.
damtype
,
self
.
project
.
def
.
dam
,
self
.
project
.
def
.
particles
,
self
.
x
,
self
.
y
,
self
.
tmp_proj
)
game
.
level
:
removeEntity
(
self
,
true
)
game
.
level
:
removeEntity
(
self
)
self
.
dead
=
true
self
.
src
:
projectDoStop
(
self
.
project
.
def
.
typ
,
self
.
project
.
def
.
tg
,
self
.
project
.
def
.
damtype
,
self
.
project
.
def
.
dam
,
self
.
project
.
def
.
particles
,
self
.
x
,
self
.
y
,
self
.
tmp_proj
)
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