Skip to content

Commit

Permalink
light cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
krazyjakee committed Jun 24, 2024
1 parent 9ee0d11 commit 315341e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions addons/nodot/kits/FirstPerson/FirstPersonItemsContainer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ func change_item(new_index: int) -> void:
func activate_current_item():
is_item_active = true;
var items: Array = get_all_items();
if GameManager.has_item(active_item_index):
await (items[active_item_index] as FirstPersonItem).activate();
await (items[active_item_index] as FirstPersonItem).activate();

func deactivate_current_item():
is_item_active = false;
Expand Down
2 changes: 1 addition & 1 deletion addons/nodot/kits/Locomotion3D/CharacterJump3D.gd
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func physics(delta: float) -> void:
return

if Input.is_action_pressed(jump_action):
if not character.floor_body.has_meta("soft_floor") or character.floor_body.has_meta("can_jump"):
if !character.floor_body or !character.floor_body.has_meta("soft_floor") or character.floor_body.has_meta("can_jump"):
sm.set_state(state_ids["jump"])
elif sm.state == state_ids["jump"]:
sm.set_state(state_ids["land"])
Expand Down
3 changes: 1 addition & 2 deletions addons/nodot/kits/Locomotion3D/CharacterProne3D.gd
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ func ready():

if character_mover:
initial_movement_speed = character_mover.movement_speed

initial_head_position = character.head_position

func state_updated(old_state: int, new_state: int) -> void:
if new_state == state_ids["prone"]:
initial_head_position = character.head.position
collision_shape.rotation.x = PI / 2
target_head_position = Vector3(character.head.position.x, 0.0, -(collider_height / 2))
character.velocity = Vector3.ZERO
Expand Down

0 comments on commit 315341e

Please sign in to comment.