ソースを参照

Merge pull request #1466 from marauder2k9-torque/ISPLAYERBUILD-Added-function

add isPlayerBuild functon
Brian Roberts 4 ヶ月 前
コミット
4ec85c1e43
1 ファイル変更14 行追加0 行削除
  1. 14 0
      Engine/source/console/consoleFunctions.cpp

+ 14 - 0
Engine/source/console/consoleFunctions.cpp

@@ -2744,6 +2744,20 @@ DefineEngineFunction( debug, void, (),,
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 
 
+DefineEngineFunction(isPlayerBuild, bool, (), ,
+   "Test whether the engine has been compiled with TORQUE_PLAYER.\n\n"
+   "@return True if this is a playback only build; false otherwise.\n\n"
+   "@ingroup Platform")
+{
+#ifdef TORQUE_PLAYER
+   return true;
+#else
+   return false;
+#endif
+}
+
+//-----------------------------------------------------------------------------
+
 DefineEngineFunction( isShippingBuild, bool, (),,
 DefineEngineFunction( isShippingBuild, bool, (),,
    "Test whether the engine has been compiled with TORQUE_SHIPPING, i.e. in a form meant for final release.\n\n"
    "Test whether the engine has been compiled with TORQUE_SHIPPING, i.e. in a form meant for final release.\n\n"
    "@return True if this is a shipping build; false otherwise.\n\n"
    "@return True if this is a shipping build; false otherwise.\n\n"