rigidbody math corrections & ragdoll tweaks for stability
[carveJwlIkooP6JGAAIwe30JlM.git] / ent_skateshop.c
index 50b456941c9bde1ee8fc77d1ea4a0c70d130f33b..85a0fa48b5fda101d32380f03790b9ca3c3532df 100644 (file)
@@ -10,7 +10,6 @@
 #include "player.h"
 #include "gui.h"
 #include "menu.h"
-#include "highscores.h"
 #include "steam.h"
 #include "addon.h"
 #include "save.h"
@@ -219,10 +218,15 @@ static void skateshop_server_helper_update(void){
    vg_strnull( &text, global_skateshop.helper_toggle->text, 
                sizeof(global_skateshop.helper_toggle->text) );
 
-   if( network_client.user_intent == k_server_intent_online )
-      vg_strcat( &text, "Disconnect" );
-   else
-      vg_strcat( &text, "Go Online" );
+   if( skaterift.demo_mode ){
+      vg_strcat( &text, "Not availible in demo" );
+   }
+   else {
+      if( network_client.user_intent == k_server_intent_online )
+         vg_strcat( &text, "Disconnect" );
+      else
+         vg_strcat( &text, "Go Online" );
+   }
 }
 
 /*
@@ -410,7 +414,7 @@ static void ent_skateshop_preupdate( ent_skateshop *shop, int active ){
    else if( shop->type == k_skateshop_type_server ){
       f64 delta = vg.time_real - network_client.last_intent_change;
 
-      if( delta > 5.0 ){
+      if( (delta > 5.0) && (!skaterift.demo_mode) ){
          global_skateshop.helper_pick->greyed = 0;
          if( button_down( k_srbind_maccept ) ){
             network_client.user_intent = !network_client.user_intent;
@@ -807,6 +811,8 @@ static void ent_skateshop_call( world_instance *world, ent_call *call ){
          vg_str text;
          global_skateshop.helper_pick = gui_new_helper(
                      input_button_list[k_srbind_maccept], &text);
+         if( gui_new_helper( input_button_list[k_srbind_mback], &text ))
+            vg_strcat( &text, "exit" );
          skateshop_server_helper_update();
       }
    }