Skip to content

Commit 2d167b3

Browse files
committed
Fixed laser bug (FlxTilemap.ray)
1 parent 72b2207 commit 2d167b3

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed
Binary file not shown.

Server/export/windows/cpp/bin/assets/maps/TwinCapture.oel

+1
Original file line numberDiff line numberDiff line change
@@ -343,5 +343,6 @@
343343
<JumpPad id="17" x="1616" y="736" angle="0" />
344344
<JumpPad id="18" x="1504" y="624" angle="180" />
345345
<JumpPad id="19" x="640" y="624" angle="180" />
346+
<Laser id="20" x="192" y="464" angle="0" />
346347
</Entities>
347348
</level>

Server/export/windows/cpp/bin/config.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ crashdump=true
1313
manifesturl=null
1414
#https://dl.dropboxusercontent.com/u/229424261/skullrush/manifest.json
1515

16-
maps=TileTest, TwinCapture, tele, TileTest, Test, CrateWorld, CaptureHell
16+
maps=tele, TwinCapture, TileTest, TileTest, Test, CrateWorld, CaptureHell
1717

1818
masterserver=http://skullrush.elementfx.com/laravel/public/
1919

Server/source/entities/Laser.hx

+9-2
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,16 @@ class LaserSprite extends NFlxSprite
138138

139139
var res:FlxPoint = new FlxPoint();
140140

141-
if (!map.ray(getMidpoint(), finalPoint, res))
141+
try
142142
{
143-
finalPoint.copyFrom(res);
143+
if (!map.ray(getMidpoint(), finalPoint, res))
144+
{
145+
finalPoint.copyFrom(res);
146+
}
147+
}
148+
catch (e:Dynamic)
149+
{
150+
144151
}
145152
}
146153

0 commit comments

Comments
 (0)