Skip to content

Commit 3ff0677

Browse files
Made the player trail clear sometimes idk
this is kinda gay
1 parent af167cb commit 3ff0677

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,7 @@ async fn main() {
676676
jump_force.0.set(default_jump_force.0.get());
677677
from_editor = false;
678678
kill_player = false;
679+
player_trail.clear();
679680
restart_audio(&sink);
680681
}
681682

@@ -761,6 +762,7 @@ async fn main() {
761762
}
762763

763764
if editor_back_button.is_clicked() {
765+
player_trail.clear();
764766
game_state.0.set(GameState::CreatorMenu)
765767
}
766768

@@ -790,6 +792,7 @@ async fn main() {
790792

791793
if editor_playtest_button.is_clicked() {
792794
from_editor = true;
795+
player_trail.clear();
793796
stop_audio(&sink);
794797
play_audio_path(&current_song, master_volume, false, &sink);
795798
game_state.0.set(GameState::Playing)
@@ -860,6 +863,7 @@ async fn main() {
860863
gravity.0.set(default_gravity.0.get());
861864
jump_force.0.set(default_jump_force.0.get());
862865
from_editor = false;
866+
player_trail.clear();
863867

864868
stop_audio(&sink);
865869
play_audio_path("Resources/Music/menu-music.mp3", master_volume, true, &sink);

0 commit comments

Comments
 (0)