X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;ds=sidebyside;f=world.c;h=f8d7168a1ca781a99c60fe1a733d2394035bedff;hb=47bdc07d1a3e268f7926b5849ea751b0ef63289b;hp=22c3c2c63be1017518454612ccbf169adee2829d;hpb=00653e446d6b1310fa89d3aace70800f9fef4122;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world.c b/world.c index 22c3c2c..f8d7168 100644 --- a/world.c +++ b/world.c @@ -41,15 +41,24 @@ 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 ]; - if( index != world_static.active_instance ) + if( index != world_static.active_instance ){ v3_copy( localplayer.rb.co, current->player_co ); + skaterift_autosave(1); + } + v3_copy( new->player_co, localplayer.rb.co ); world_static.active_instance = index; - player__reset(); }