alleged fixes

This commit is contained in:
Rendo 2025-12-10 00:08:57 +05:00
commit f99108c4f0
4 changed files with 7 additions and 6 deletions

View file

@ -50,7 +50,7 @@ func spawn_player(id: int) -> void:
inst.global_position = new_position
func spawn_spectator(id: int) -> void:
var spectator: PackedScene = load("res://scenes/spectator.tscn")
var spectator: PackedScene = load("res://players/spectator.tscn")
var inst = spectator.instantiate()
inst.name = str(id)

View file

@ -86,13 +86,13 @@ func switch(to: StringName, exit: bool = true):
if slots.has(to) == false or slots[to] == null or slots[to] == current_state or (multiplayer.get_remote_sender_id() != 1 and is_multiplayer_authority() == false):
return
if current_state != null and exit:
current_state.exit()
current_state._exit()
if current_state.can_be_previous:
last_slot = slots.find_key(current_state)
else:
last_slot = ""
current_state = slots[to]
current_state.enter()
current_state._enter()
ammo_updated.emit(current_state.ammo,current_state.remaining_ammo)
switched_to.emit(current_state)

View file

@ -1,8 +1,9 @@
extends CharacterBody3D
func _physics_process(delta: float) -> void:
velocity += get_gravity() * delta
if is_multiplayer_authority() == false:
return
velocity += get_gravity() * delta / 4
if is_on_floor():
var fire: Node3D = preload("res://weapons/molikman/molik/molikman_molotov_fire.tscn").instantiate()

View file

@ -25,4 +25,4 @@ func fire() -> void:
var molotov: CharacterBody3D = molik.instantiate()
Session.dynamic_objects_parent.add_child(molotov,true)
molotov.global_transform = machine.player_camera.global_transform
molotov.velocity = -molotov.global_basis.z * 100
molotov.velocity = -molotov.global_basis.z * 25