Fixed double clicking to ent
This commit is contained in:
@@ -70,9 +70,9 @@ class EntityPanel(QWidget):
|
|||||||
def onEntityDoubleClicked(self, item):
|
def onEntityDoubleClicked(self, item):
|
||||||
entity = item.data(Qt.UserRole)
|
entity = item.data(Qt.UserRole)
|
||||||
chunk = entity.chunk
|
chunk = entity.chunk
|
||||||
worldX = chunk.x + entity.localX
|
worldX = (chunk.x * CHUNK_WIDTH) + entity.localX
|
||||||
worldY = chunk.y + entity.localY
|
worldY = (chunk.y * CHUNK_HEIGHT) + entity.localY
|
||||||
worldZ = chunk.z + entity.localZ
|
worldZ = (chunk.z * CHUNK_DEPTH) + entity.localZ
|
||||||
self.parent.map.moveTo(worldX, worldY, worldZ)
|
self.parent.map.moveTo(worldX, worldY, worldZ)
|
||||||
|
|
||||||
def onEntityClicked(self, item):
|
def onEntityClicked(self, item):
|
||||||
|
|||||||
Reference in New Issue
Block a user