Browse Source

Merge branch 'GarageGames/release-3.7' into ueberengine-dev

duion 10 years ago
parent
commit
fffe154528

+ 7 - 7
Engine/source/math/mathTypes.cpp

@@ -1019,7 +1019,7 @@ F32 mRandF()
    return gRandGen.randF();
    return gRandGen.randF();
 }
 }
 
 
-DefineConsoleFunction( getRandom, F32, (S32 a, S32 b), (1, 0),
+DefineConsoleFunction(getRandom, F32, (S32 a, S32 b), (S32_MAX, S32_MAX),
    "( int a, int b ) "
    "( int a, int b ) "
    "@brief Returns a random number based on parameters passed in..\n\n"
    "@brief Returns a random number based on parameters passed in..\n\n"
    "If no parameters are passed in, getRandom() will return a float between 0.0 and 1.0. If one "
    "If no parameters are passed in, getRandom() will return a float between 0.0 and 1.0. If one "
@@ -1033,21 +1033,21 @@ DefineConsoleFunction( getRandom, F32, (S32 a, S32 b), (1, 0),
    "@see setRandomSeed\n"
    "@see setRandomSeed\n"
    "@ingroup Random" )
    "@ingroup Random" )
 {
 {
-   if (b == 0)
-      return F32(gRandGen.randI(0,getMax( a, 0 )));
-   else
+   if (a != S32_MAX)
    {
    {
-      if (b != 0) 
+      if (b == S32_MAX)
+         return F32(gRandGen.randI(0, getMax(a, 0)));
+      else
       {
       {
          S32 min = a;
          S32 min = a;
          S32 max = b;
          S32 max = b;
-         if (min > max) 
+         if (min > max)
          {
          {
             S32 t = min;
             S32 t = min;
             min = max;
             min = max;
             max = t;
             max = t;
          }
          }
-         return F32(gRandGen.randI(min,max));
+         return F32(gRandGen.randI(min, max));
       }
       }
    }
    }
    return gRandGen.randF();
    return gRandGen.randF();

+ 85 - 0
Templates/Empty/buildFiles/VisualStudio 2012/projects/Torque.rc

@@ -0,0 +1,85 @@
+//Microsoft Developer Studio generated resource script.
+//
+#define IDI_ICON1                       103
+#define IDI_ICON2                       107
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        108
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1000
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "windows.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON1               ICON    DISCARDABLE     "torque.ico"
+IDI_ICON2               ICON    DISCARDABLE     "torque.ico"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "#include ""windows.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+

BIN
Templates/Empty/buildFiles/VisualStudio 2012/projects/torque.ico


+ 1 - 1
Tools/Vagrant/Vagrantfile → Tools/Vagrant/Ubuntu 14/Vagrantfile

@@ -22,7 +22,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
     end
     end
   end
   end
 
 
-  config.vm.synced_folder '../../', '/torque'
+  config.vm.synced_folder '../../../', '/torque'
 
 
   config.vm.provision :shell, path: 'provision.sh'
   config.vm.provision :shell, path: 'provision.sh'
   if gui?
   if gui?

+ 0 - 0
Tools/Vagrant/provision-gui.sh → Tools/Vagrant/Ubuntu 14/provision-gui.sh


+ 0 - 0
Tools/Vagrant/provision.sh → Tools/Vagrant/Ubuntu 14/provision.sh