non-meaningful cleanup
[carveJwlIkooP6JGAAIwe30JlM.git] / world_entity.c
index d8f4259dacd67179503656e569c6d415d68a1edb..440229102ecc8d548635c70dc1d100b5af76b186 100644 (file)
@@ -277,6 +277,19 @@ ent_spawn *world_find_spawn_by_name( world_instance *world, const char *name )
    return rp;
 }
 
+static void world_default_spawn_pos( world_instance *world, v3f pos )
+{
+   ent_spawn *rp = world_find_spawn_by_name( world, "start" );
+   if( !rp ) rp = world_find_closest_spawn( world, (v3f){0,0,0} );
+   if( rp )
+      v3_copy( rp->transform.co, pos );
+   else
+   {
+      vg_error( "There are no valid spawns in the world\n" );
+      v3_zero( pos );
+   }
+}
+
 static void ent_volume_call( world_instance *world, ent_call *call ){
    u32 index = mdl_entity_id_id( call->id );
    ent_volume *volume = mdl_arritm( &world->ent_volume, index );