Showing
1 changed file
with
1 additions
and
1 deletions
@@ -131,7 +131,7 @@ function _M:display(dispx, dispy, prevfbo, rotate_keyframes) | @@ -131,7 +131,7 @@ function _M:display(dispx, dispy, prevfbo, rotate_keyframes) | ||
131 | self.fbo_shader.shad:use(false) | 131 | self.fbo_shader.shad:use(false) |
132 | end | 132 | end |
133 | 133 | ||
134 | - if not self.target_type.immediate_keys or firstx then | 134 | + if (not self.target_type.immediate_keys or firstx) and self.target and self.target.x then |
135 | core.display.glMatrix(true) | 135 | core.display.glMatrix(true) |
136 | core.display.glTranslate(self.display_x + (self.target.x - game.level.map.mx) * self.tile_w * Map.zoom + self.tile_w * Map.zoom / 2, self.display_y + (self.target.y - game.level.map.my + util.hexOffset(self.target.x)) * self.tile_h * Map.zoom + self.tile_h * Map.zoom / 2, 0) | 136 | core.display.glTranslate(self.display_x + (self.target.x - game.level.map.mx) * self.tile_w * Map.zoom + self.tile_w * Map.zoom / 2, self.display_y + (self.target.y - game.level.map.my + util.hexOffset(self.target.x)) * self.tile_h * Map.zoom + self.tile_h * Map.zoom / 2, 0) |
137 | if rotate_keyframes then | 137 | if rotate_keyframes then |
-
Please register or login to post a comment