added content lock for demo version
[carveJwlIkooP6JGAAIwe30JlM.git] / world.c
diff --git a/world.c b/world.c
index 550ac508f0c894a64412a73923fe92cc3289068b..f8d7168a1ca781a99c60fe1a733d2394035bedff 100644 (file)
--- a/world.c
+++ b/world.c
@@ -41,6 +41,13 @@ static void world_switch_instance( u32 index ){
       return;
    }
 
+   if( skaterift.demo_mode ){
+      if( world_static.instance_addons[index]->flags & ADDON_REG_PREMIUM ){
+         vg_error( "Can't switch to a premium world in the demo version\n" );
+         return;
+      }
+   }
+
    world_instance *current = 
       &world_static.instances[ world_static.active_instance ];
 
@@ -52,7 +59,6 @@ static void world_switch_instance( u32 index ){
    v3_copy( new->player_co, localplayer.rb.co );
 
    world_static.active_instance = index;
-
    player__reset();
 }