/*
- * Copyright 2021-2022 (C) Mount0 Software, Harry Godden - All Rights Reserved
- * -----------------------------------------------------------------------------
- *
- * Player physics and control submodule
- * contains main physics models, input, and player control.
- *
- * -----------------------------------------------------------------------------
+ * Copyright (C) 2021-2022 Mt.ZERO Software, Harry Godden - All Rights Reserved
*/
#ifndef PLAYER_PHYSICS_H
phys->jump = 0.0f;
player.jump_time = vg_time;
-
+
+ /* TODO: Move to audio file */
audio_lock();
audio_player_set_flags( &audio_player_extra, AUDIO_FLAG_SPACIAL_3D );
audio_player_set_position( &audio_player_extra, phys->rb.co );
float horizontal = vg_get_axis("horizontal"),
vertical = vg_get_axis("vertical");
+ if( (phys->rb.co[1] < 0.0f) && !player.is_dead )
+ {
+ audio_lock();
+ audio_player_set_flags( &audio_player_extra, AUDIO_FLAG_SPACIAL_3D );
+ audio_player_set_position( &audio_player_extra, phys->rb.co );
+ audio_player_set_vol( &audio_player_extra, 20.0f );
+ audio_player_playclip( &audio_player_extra, &audio_splash );
+ audio_unlock();
+
+ player_kill();
+ }
+
if( phys->on_board )
player_physics();
else
player_save_frame();
audio_lock();
- audio_play_oneshot( &audio_gate_lap, 1.0f );
+ audio_play_oneshot( &audio_gate_pass, 1.0f );
audio_unlock();
break;
}