diff --git a/Engine/source/math/mathTypes.cpp b/Engine/source/math/mathTypes.cpp index ce0f198d1..7498cc8fc 100644 --- a/Engine/source/math/mathTypes.cpp +++ b/Engine/source/math/mathTypes.cpp @@ -1019,7 +1019,7 @@ F32 mRandF() 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 ) " "@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 " @@ -1033,21 +1033,21 @@ DefineConsoleFunction( getRandom, F32, (S32 a, S32 b), (1, 0), "@see setRandomSeed\n" "@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 max = b; - if (min > max) + if (min > max) { S32 t = min; min = max; max = t; } - return F32(gRandGen.randI(min,max)); + return F32(gRandGen.randI(min, max)); } } return gRandGen.randF(); diff --git a/Templates/Empty/buildFiles/VisualStudio 2012/projects/Torque.rc b/Templates/Empty/buildFiles/VisualStudio 2012/projects/Torque.rc new file mode 100644 index 000000000..cf88543da --- /dev/null +++ b/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 + diff --git a/Templates/Empty/buildFiles/VisualStudio 2012/projects/torque.ico b/Templates/Empty/buildFiles/VisualStudio 2012/projects/torque.ico new file mode 100644 index 000000000..22ac1a3d1 Binary files /dev/null and b/Templates/Empty/buildFiles/VisualStudio 2012/projects/torque.ico differ diff --git a/Tools/Vagrant/Vagrantfile b/Tools/Vagrant/Ubuntu 14/Vagrantfile similarity index 95% rename from Tools/Vagrant/Vagrantfile rename to Tools/Vagrant/Ubuntu 14/Vagrantfile index 8c6d0f381..b1959e1cf 100644 --- a/Tools/Vagrant/Vagrantfile +++ b/Tools/Vagrant/Ubuntu 14/Vagrantfile @@ -22,7 +22,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| end end - config.vm.synced_folder '../../', '/torque' + config.vm.synced_folder '../../../', '/torque' config.vm.provision :shell, path: 'provision.sh' if gui? diff --git a/Tools/Vagrant/provision-gui.sh b/Tools/Vagrant/Ubuntu 14/provision-gui.sh similarity index 100% rename from Tools/Vagrant/provision-gui.sh rename to Tools/Vagrant/Ubuntu 14/provision-gui.sh diff --git a/Tools/Vagrant/provision.sh b/Tools/Vagrant/Ubuntu 14/provision.sh similarity index 100% rename from Tools/Vagrant/provision.sh rename to Tools/Vagrant/Ubuntu 14/provision.sh