+static void world_water_drown(void)
+{
+ if( localplayer.drowned ) return;
+ player__networked_sfx( k_player_subsystem_walk, 32,
+ k_player_walk_soundeffect_splash,
+ localplayer.rb.co, 1.0f );
+ vg_info( "player fell of due to walking into walker\n" );
+ localplayer.drowned = 1;
+ player__dead_transition( k_player_die_type_generic );
+}
+
+bool world_water_player_safe( world_instance *world, f32 allowance )
+{
+ if( !world->water.enabled ) return 1;
+ if( world->info.flags & 0x2 ) return 1;
+
+ if( localplayer.rb.co[1]+allowance < world->water.height )
+ {
+ world_water_drown();
+ return 0;
+ }
+
+ return 1;
+}
+
+entity_call_result ent_water_call( world_instance *world, ent_call *call )
+{
+ if( call->function == 0 )
+ {
+ world_water_drown();
+ return k_entity_call_result_OK;
+ }
+
+ return k_entity_call_result_unhandled;
+}