Commit 3d81edd4bbe9865827811764fdfd51e1083298ac

Authored by DarkGod
1 parent 471b8cd8

meh

@@ -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