Player changes + projectile fixes
This commit is contained in:
@@ -120,6 +120,10 @@ func get_state_name() -> String:
|
||||
return STATE_NAMES[current_state] if current_state < STATE_NAMES.size() else "UNKNOWN"
|
||||
|
||||
func _on_message_received(opcode: int, data: Dictionary):
|
||||
# Debug: log projectile-related opcodes
|
||||
if opcode == 504 or opcode == 505 or opcode == 506:
|
||||
print("[GameState] !!!!! Received projectile opcode: ", opcode, " !!!!!")
|
||||
|
||||
match opcode:
|
||||
OpCodes.AUTH_LOGIN_RESULT, OpCodes.AUTH_REGISTER_RESULT:
|
||||
_handle_auth_result(data)
|
||||
@@ -768,8 +772,17 @@ func _handle_tile_update(data: Dictionary):
|
||||
dungeon_tiles_updated.emit(tiles)
|
||||
|
||||
func _handle_projectile_spawned(data: Dictionary):
|
||||
print("[GameState] Projectile spawned: ", data.get("id", -1))
|
||||
print("[GameState] ===== PROJECTILE SPAWNED EVENT =====")
|
||||
print("[GameState] Projectile ID: ", data.get("id", -1))
|
||||
print("[GameState] Position: (", data.get("x", 0), ", ", data.get("y", 0), ")")
|
||||
print("[GameState] Velocity: (", data.get("vx", 0), ", ", data.get("vy", 0), ")")
|
||||
print("[GameState] Sprite: ", data.get("sprite", ""))
|
||||
print("[GameState] Linear: ", data.get("isLinear", false))
|
||||
print("[GameState] Full data: ", data)
|
||||
print("[GameState] Emitting projectile_spawned signal")
|
||||
projectile_spawned.emit(data)
|
||||
print("[GameState] ===== END PROJECTILE SPAWNED =====")
|
||||
|
||||
|
||||
func _handle_projectile_hit(data: Dictionary):
|
||||
print("[GameState] Projectile hit: ", data)
|
||||
|
||||
Reference in New Issue
Block a user