|
|
|
@@ -164,10 +164,6 @@ func _rollback_tick(delta: float, tick: int, _is_fresh: bool):
|
|
|
|
|
# We process weapon actions anyway — the server reconciles via rollback.
|
|
|
|
|
# Only skip if the player is dead or frozen (checked below).
|
|
|
|
|
|
|
|
|
|
# Skip if player dead
|
|
|
|
|
if input and (input.slot_1 or input.slot_2 or input.slot_3 or input.slot_4):
|
|
|
|
|
print("[WEAPON DEBUG] _rollback_tick tick=%d slots=[s1=%s s2=%s s3=%s s4=%s] active=%d inv=%s" % [tick, input.slot_1, input.slot_2, input.slot_3, input.slot_4, active_slot, inventory])
|
|
|
|
|
|
|
|
|
|
# Skip if player dead
|
|
|
|
|
if player.death_tick >= 0 and tick >= player.death_tick:
|
|
|
|
|
return
|
|
|
|
@@ -413,8 +409,3 @@ func _spawn_grenade(origin: Vector3, direction: Vector3, owner_id: int, type_idx
|
|
|
|
|
get_tree().current_scene.add_child(grenade)
|
|
|
|
|
var gtype: Grenade.GrenadeType = Grenade.GrenadeType.FLASH if type_idx == 0 else Grenade.GrenadeType.SMOKE
|
|
|
|
|
grenade.setup(origin, direction, owner_id, gtype)
|
|
|
|
|
|
|
|
|
|
func _rollback_tick(delta: float, tick: int, _is_fresh: bool):
|
|
|
|
|
# DEBUG: Log when this is called with non-default input
|
|
|
|
|
if input and (input.slot_1 or input.slot_2 or input.slot_3 or input.slot_4):
|
|
|
|
|
print("[WEAPON DEBUG] _rollback_tick tick=%d slots=[%s %s %s %s]" % [tick, input.slot_1, input.slot_2, input.slot_3, input.slot_4])
|
|
|
|
|