diff options
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/fourisland/fourpuzzle/gamestate/mapview/event/HeroEvent.java | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/HeroEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/HeroEvent.java index 8b9e3fb..f39c451 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/HeroEvent.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/HeroEvent.java | |||
@@ -13,6 +13,7 @@ import com.fourisland.fourpuzzle.Game; | |||
13 | import com.fourisland.fourpuzzle.GameCharacter; | 13 | import com.fourisland.fourpuzzle.GameCharacter; |
14 | import com.fourisland.fourpuzzle.gamestate.mapview.Map; | 14 | import com.fourisland.fourpuzzle.gamestate.mapview.Map; |
15 | import com.fourisland.fourpuzzle.gamestate.mapview.MapViewGameState; | 15 | import com.fourisland.fourpuzzle.gamestate.mapview.MapViewGameState; |
16 | import com.fourisland.fourpuzzle.gamestate.mapview.event.graphic.BlankEventGraphic; | ||
16 | 17 | ||
17 | /** | 18 | /** |
18 | * | 19 | * |
@@ -33,16 +34,7 @@ public class HeroEvent extends AbstractEvent implements Event { | |||
33 | public void render(Graphics g) | 34 | public void render(Graphics g) |
34 | { | 35 | { |
35 | GameCharacter toDraw = Game.getSaveFile().getParty().getLeader(); | 36 | GameCharacter toDraw = Game.getSaveFile().getParty().getLeader(); |
36 | 37 | if (!(toDraw.getGraphic() instanceof BlankEventGraphic)) | |
37 | /* TODO Replace below condition with an instanceof check to | ||
38 | * see if toDraw.getGraphic() is an instance of BlankEventGraphic. | ||
39 | * The current way does not, in fact, work because an EventGraphic | ||
40 | * never be equal to a String. This current way only exists because | ||
41 | * HeroEvent's graphic used to be stored as a filename/offset combo | ||
42 | * instead of as an EventGraphic. | ||
43 | */ | ||
44 | |||
45 | if (!toDraw.getGraphic().equals("blank")) | ||
46 | { | 38 | { |
47 | toDraw.getGraphic().setDirection(direction); | 39 | toDraw.getGraphic().setDirection(direction); |
48 | toDraw.getGraphic().setAnimationStep(animationStep); | 40 | toDraw.getGraphic().setAnimationStep(animationStep); |