diff --git a/Code/DanBias.sln b/Code/DanBias.sln index 80a76dea..e14d2c37 100644 --- a/Code/DanBias.sln +++ b/Code/DanBias.sln @@ -45,6 +45,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GameClient", "Game\GameClie EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utilities", "Misc\Utilities\Utilities.vcxproj", "{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LevelLoader", "Game\LevelLoader\LevelLoader.vcxproj", "{6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -679,6 +681,40 @@ Global {2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|x64.Build.0 = Release|x64 {2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|x86.ActiveCfg = Release|Win32 {2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|x86.Build.0 = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|Win32.ActiveCfg = Debug|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|Win32.Build.0 = Debug|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|x64.ActiveCfg = Debug|x64 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|x64.Build.0 = Debug|x64 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|x86.ActiveCfg = Debug|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Debug|x86.Build.0 = Debug|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|Any CPU.ActiveCfg = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|Win32.ActiveCfg = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|Win32.Build.0 = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|x64.ActiveCfg = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|x86.ActiveCfg = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.MinSizeRel|x86.Build.0 = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|Any CPU.ActiveCfg = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|Mixed Platforms.Build.0 = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|Win32.ActiveCfg = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|Win32.Build.0 = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|x64.ActiveCfg = Release|x64 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|x64.Build.0 = Release|x64 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|x86.ActiveCfg = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.Release|x86.Build.0 = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|Win32.Build.0 = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|x64.ActiveCfg = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|x86.ActiveCfg = Release|Win32 + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63}.RelWithDebInfo|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -692,6 +728,7 @@ Global {C83A6FAD-E71F-4B1E-9D63-E93E61DDC012} = {20720CA7-795C-45AD-A302-9383A6DD503A} {8690FDDF-C5B7-4C42-A337-BD5243F29B85} = {20720CA7-795C-45AD-A302-9383A6DD503A} {2A1BC987-AF42-4500-802D-89CD32FC1309} = {20720CA7-795C-45AD-A302-9383A6DD503A} + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63} = {20720CA7-795C-45AD-A302-9383A6DD503A} {C4C76A8D-44C5-4452-9F61-39C7E01CBDB4} = {F156EEBC-0195-4020-8700-4433208DE12B} {3EA5F14D-2A71-4588-A69D-87C4571C580F} = {F156EEBC-0195-4020-8700-4433208DE12B} {7E3990D2-3D94-465C-B58D-64A74B3ECF9B} = {1322B12B-5E37-448A-AAAF-F637460DCB23} diff --git a/Code/Game/GameClient/GameClient.vcxproj b/Code/Game/GameClient/GameClient.vcxproj index a8de48ef..6d09de24 100644 --- a/Code/Game/GameClient/GameClient.vcxproj +++ b/Code/Game/GameClient/GameClient.vcxproj @@ -106,7 +106,7 @@ Disabled DANBIAS_GAME_DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) true - $(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;%(AdditionalIncludeDirectories) + $(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;$(SolutionDir)Game\LevelLoader Windows @@ -123,7 +123,7 @@ Disabled DANBIAS_GAME_DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) true - $(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;%(AdditionalIncludeDirectories) + $(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;$(SolutionDir)Game\LevelLoader Windows @@ -142,7 +142,7 @@ true DANBIAS_GAME_DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) true - $(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;%(AdditionalIncludeDirectories) + $(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;$(SolutionDir)Game\LevelLoader Windows @@ -163,7 +163,7 @@ true DANBIAS_GAME_DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) true - $(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;%(AdditionalIncludeDirectories) + $(SolutionDir)Misc\OysterMath;$(SolutionDir)Misc\Input;$(SolutionDir)OysterGraphics;$(SolutionDir)Misc\Utilities;$(SolutionDir)Game\LevelLoader Windows @@ -196,6 +196,9 @@ {143bd516-20a1-4890-a3e4-f8bfd02220e7} + + {6391e709-d9fa-4fef-a3b9-4343db5a0c63} + @@ -213,10 +216,6 @@ - - - - @@ -240,11 +239,6 @@ - - - - - diff --git a/Code/Game/GameClient/GameClientState/LanMenuState.cpp b/Code/Game/GameClient/GameClientState/LanMenuState.cpp index 8c096617..7bd709cc 100644 --- a/Code/Game/GameClient/GameClientState/LanMenuState.cpp +++ b/Code/Game/GameClient/GameClientState/LanMenuState.cpp @@ -126,6 +126,9 @@ void LanMenuState::ChangeState( ClientState next ) // attempt to connect to lobby if( !this->privData->nwClient->Connect(this->privData->connectPort, (*this->privData->connectIP)[0]) ) return; + //this->privData->nwClient->Disconnect(); + //if( !this->privData->nwClient->Reconnect() ) + //return; break; default: break; } diff --git a/Code/Game/GameClient/GameClientState/NetLoadState.cpp b/Code/Game/GameClient/GameClientState/NetLoadState.cpp index 6ffc0ae4..1c4fbf65 100644 --- a/Code/Game/GameClient/GameClientState/NetLoadState.cpp +++ b/Code/Game/GameClient/GameClientState/NetLoadState.cpp @@ -2,7 +2,7 @@ #include "NetworkClient.h" #include "OysterMath.h" #include "Protocols.h" -#include "LevelLoader\LevelLoader.h" +#include "LevelLoader.h" #include "Utilities.h" #include "C_obj\C_StaticObj.h" #include "C_obj\C_DynamicObj.h" diff --git a/Code/Game/GameLogic/GameAPI.h b/Code/Game/GameLogic/GameAPI.h index 65d606d8..c739735b 100644 --- a/Code/Game/GameLogic/GameAPI.h +++ b/Code/Game/GameLogic/GameAPI.h @@ -12,7 +12,7 @@ #include "GameLogicDef.h" #include "GameLogicStates.h" #include -#include "LevelLoader\ObjectDefines.h" +#include "..\LevelLoader\ObjectDefines.h" #include "DynamicArray.h" diff --git a/Code/Game/GameLogic/GameLogic.vcxproj b/Code/Game/GameLogic/GameLogic.vcxproj index ad129c3b..52b7722b 100644 --- a/Code/Game/GameLogic/GameLogic.vcxproj +++ b/Code/Game/GameLogic/GameLogic.vcxproj @@ -99,7 +99,7 @@ Level3 Disabled true - $(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;%(AdditionalIncludeDirectories) + $(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;$(SolutionDir)Game\LevelLoader DANBIAS_GAMELOGIC_DLL_EXPORT;_WINDLL;%(PreprocessorDefinitions) @@ -113,7 +113,7 @@ Level3 Disabled true - $(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;%(AdditionalIncludeDirectories) + $(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;$(SolutionDir)Game\LevelLoader DANBIAS_GAMELOGIC_DLL_EXPORT;_WINDLL;%(PreprocessorDefinitions) @@ -129,7 +129,7 @@ true true true - $(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;%(AdditionalIncludeDirectories) + $(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;$(SolutionDir)Game\LevelLoader DANBIAS_GAMELOGIC_DLL_EXPORT;_WINDLL;%(PreprocessorDefinitions) @@ -147,7 +147,7 @@ true true true - $(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;%(AdditionalIncludeDirectories) + $(SolutionDir)Misc\Utilities;$(SolutionDir)Misc\OysterMath;$(SolutionDir)Physics\OysterPhysics3D;$(SolutionDir)Physics\GamePhysics;$(SolutionDir)Game\LevelLoader DANBIAS_GAMELOGIC_DLL_EXPORT;_WINDLL;%(PreprocessorDefinitions) @@ -172,12 +172,7 @@ - - - - - @@ -198,11 +193,7 @@ - - - - @@ -223,6 +214,9 @@ {3ea5f14d-2a71-4588-a69d-87c4571c580f} + + {6391e709-d9fa-4fef-a3b9-4343db5a0c63} + diff --git a/Code/Game/GameLogic/GameLogic.vcxproj.user b/Code/Game/GameLogic/GameLogic.vcxproj.user index 4b847ee6..2e28d6f7 100644 --- a/Code/Game/GameLogic/GameLogic.vcxproj.user +++ b/Code/Game/GameLogic/GameLogic.vcxproj.user @@ -1,7 +1,7 @@  - false + true $(OutDir) diff --git a/Code/Game/GameLogic/Level.cpp b/Code/Game/GameLogic/Level.cpp index 85d82c68..a3a1c07f 100644 --- a/Code/Game/GameLogic/Level.cpp +++ b/Code/Game/GameLogic/Level.cpp @@ -4,6 +4,10 @@ #include "JumpPad.h" #include "ExplosiveCrate.h" #include "Portal.h" + +//Conversion from wstring to string +#include + using namespace GameLogic; using namespace Utility::DynamicMemory; using namespace Oyster::Physics; @@ -200,9 +204,16 @@ ICustomBody* Level::InitRigidBodySphere( const ObjectHeader* obj) bool Level::InitiateLevel(std::wstring levelPath) { LevelLoader ll; - ll.SetFolderPath(L"..\\Content\\Worlds\\"); + ll.SetFolderPath("..\\Content\\Worlds\\"); std::vector> objects; - objects = ll.LoadLevel(levelPath); + + //Convert from wstring to string + typedef std::codecvt_utf8 convert_typeX; + std::wstring_convert converterX; + + std::string convertedLevelPath = converterX.to_bytes(levelPath); + objects = ll.LoadLevel(convertedLevelPath); + if(objects.size() == 0) return false; diff --git a/Code/Game/GameLogic/Level.h b/Code/Game/GameLogic/Level.h index 14269c73..fb26280c 100644 --- a/Code/Game/GameLogic/Level.h +++ b/Code/Game/GameLogic/Level.h @@ -14,7 +14,7 @@ #include "PhysicsAPI.h" #include "TeamManager.h" #include "DynamicArray.h" -#include "LevelLoader/LevelLoader.h" +#include "LevelLoader.h" namespace GameLogic { diff --git a/Code/Game/GameLogic/LevelLoader/ParseFunctions.h b/Code/Game/GameLogic/LevelLoader/ParseFunctions.h deleted file mode 100644 index 0fc6dbc6..00000000 --- a/Code/Game/GameLogic/LevelLoader/ParseFunctions.h +++ /dev/null @@ -1,28 +0,0 @@ -////////////////////////////////// -// Created by Sam Svensson 2013 // -////////////////////////////////// - -#ifndef PARSERFUNCTIONS_H -#define PARSERFUNCTIONS_H -#include "ObjectDefines.h" - -namespace GameLogic -{ - namespace LevelFileLoader - { - /* - These functions will copy data from where the buffer pointer points. - header is the destination where the data will be copied. - size is either the size of the data to be copied (if it is NOT sent by reference). - Or the current index that is being used to parse the entire file (if it is sent by reference) this means you have to increase size with the appropiate size after you have copied. - - */ - void ParseObject(char* buffer, void *header, int size); - void ParseObject(char* buffer, ObjectHeader& header, int& size , bool loadCgf); - void ParseLevelMetaData(char* buffer, LevelMetaData &header, int &size); - void ParseBoundingVolume(char* buffer, LevelLoaderInternal::BoundingVolume& volume, int &size); - } -} - - -#endif \ No newline at end of file diff --git a/Code/Game/GameClient/GameClientState/LevelLoader/LevelLoader.cpp b/Code/Game/LevelLoader/LevelLoader.cpp similarity index 100% rename from Code/Game/GameClient/GameClientState/LevelLoader/LevelLoader.cpp rename to Code/Game/LevelLoader/LevelLoader.cpp diff --git a/Code/Game/GameClient/GameClientState/LevelLoader/LevelLoader.h b/Code/Game/LevelLoader/LevelLoader.h similarity index 100% rename from Code/Game/GameClient/GameClientState/LevelLoader/LevelLoader.h rename to Code/Game/LevelLoader/LevelLoader.h diff --git a/Code/Game/LevelLoader/LevelLoader.vcxproj b/Code/Game/LevelLoader/LevelLoader.vcxproj new file mode 100644 index 00000000..7f748c5f --- /dev/null +++ b/Code/Game/LevelLoader/LevelLoader.vcxproj @@ -0,0 +1,165 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {6391E709-D9FA-4FEF-A3B9-4343DB5A0C63} + LevelLoader + + + + StaticLibrary + true + v110 + Unicode + + + StaticLibrary + true + v110 + Unicode + + + StaticLibrary + false + v110 + true + Unicode + + + StaticLibrary + false + v110 + true + Unicode + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\External\Lib\$(ProjectName)\ + $(ProjectName)_$(PlatformShortName)D + $(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\ + + + $(SolutionDir)..\External\Lib\$(ProjectName)\ + $(ProjectName)_$(PlatformShortName) + $(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\ + + + $(SolutionDir)..\External\Lib\$(ProjectName)\ + $(ProjectName)_$(PlatformShortName)D + $(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\ + + + $(SolutionDir)..\External\Lib\$(ProjectName)\ + $(ProjectName)_$(PlatformShortName) + $(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\ + + + + Level3 + Disabled + true + $(SolutionDir)Misc\Utilities; + + + true + + + + + Level3 + Disabled + true + $(SolutionDir)Misc\Utilities; + + + true + + + + + Level3 + MaxSpeed + true + true + true + $(SolutionDir)Misc\Utilities; + + + true + true + true + + + + + + + + + Level3 + MaxSpeed + true + true + true + $(SolutionDir)Misc\Utilities; + + + true + true + true + + + + + + + + + + + + + + + + + + {2ec4dded-8f75-4c86-a10b-e1e8eb29f3ee} + + + + + + \ No newline at end of file diff --git a/Code/Game/LevelLoader/LevelLoader.vcxproj.user b/Code/Game/LevelLoader/LevelLoader.vcxproj.user new file mode 100644 index 00000000..2e28d6f7 --- /dev/null +++ b/Code/Game/LevelLoader/LevelLoader.vcxproj.user @@ -0,0 +1,22 @@ + + + + true + + + $(OutDir) + WindowsLocalDebugger + + + $(OutDir) + WindowsLocalDebugger + + + $(OutDir) + WindowsLocalDebugger + + + $(OutDir) + WindowsLocalDebugger + + \ No newline at end of file diff --git a/Code/Game/GameClient/GameClientState/LevelLoader/LevelParser.cpp b/Code/Game/LevelLoader/LevelParser.cpp similarity index 99% rename from Code/Game/GameClient/GameClientState/LevelLoader/LevelParser.cpp rename to Code/Game/LevelLoader/LevelParser.cpp index 2fbf5df3..0c450f71 100644 --- a/Code/Game/GameClient/GameClientState/LevelLoader/LevelParser.cpp +++ b/Code/Game/LevelLoader/LevelParser.cpp @@ -98,7 +98,7 @@ std::vector> LevelParser::Parse(std::string filen case ObjectSpecialType_Spike: case ObjectSpecialType_SpikeBox: case ObjectSpecialType_RedExplosiveBox: - case ObjectSpecialType_StandarsBox: + case ObjectSpecialType_StandardBox: case ObjectSpecialType_Stone: case ObjectSpecialType_Building: { diff --git a/Code/Game/GameClient/GameClientState/LevelLoader/LevelParser.h b/Code/Game/LevelLoader/LevelParser.h similarity index 100% rename from Code/Game/GameClient/GameClientState/LevelLoader/LevelParser.h rename to Code/Game/LevelLoader/LevelParser.h diff --git a/Code/Game/GameClient/GameClientState/LevelLoader/Loader.cpp b/Code/Game/LevelLoader/Loader.cpp similarity index 100% rename from Code/Game/GameClient/GameClientState/LevelLoader/Loader.cpp rename to Code/Game/LevelLoader/Loader.cpp diff --git a/Code/Game/GameClient/GameClientState/LevelLoader/Loader.h b/Code/Game/LevelLoader/Loader.h similarity index 100% rename from Code/Game/GameClient/GameClientState/LevelLoader/Loader.h rename to Code/Game/LevelLoader/Loader.h diff --git a/Code/Game/GameClient/GameClientState/LevelLoader/ObjectDefines.h b/Code/Game/LevelLoader/ObjectDefines.h similarity index 98% rename from Code/Game/GameClient/GameClientState/LevelLoader/ObjectDefines.h rename to Code/Game/LevelLoader/ObjectDefines.h index bb2ae439..918fb4e6 100644 --- a/Code/Game/GameClient/GameClientState/LevelLoader/ObjectDefines.h +++ b/Code/Game/LevelLoader/ObjectDefines.h @@ -31,7 +31,7 @@ namespace GameLogic ObjectSpecialType_World, //Always the main celestial body ObjectSpecialType_Building, ObjectSpecialType_Stone, - ObjectSpecialType_StandarsBox, + ObjectSpecialType_StandardBox, ObjectSpecialType_RedExplosiveBox, ObjectSpecialType_SpikeBox, ObjectSpecialType_Spike, @@ -40,6 +40,7 @@ namespace GameLogic ObjectSpecialType_JumpPad, ObjectSpecialType_Portal, ObjectSpecialType_Player, + ObjectSpecialType_Generic, ObjectSpecialType_Count, diff --git a/Code/Game/GameClient/GameClientState/LevelLoader/ParseFunctions.cpp b/Code/Game/LevelLoader/ParseFunctions.cpp similarity index 99% rename from Code/Game/GameClient/GameClientState/LevelLoader/ParseFunctions.cpp rename to Code/Game/LevelLoader/ParseFunctions.cpp index 59f967de..b6b57d83 100644 --- a/Code/Game/GameClient/GameClientState/LevelLoader/ParseFunctions.cpp +++ b/Code/Game/LevelLoader/ParseFunctions.cpp @@ -117,7 +117,7 @@ namespace GameLogic int temp; - for(int i = 0; i < tempSize; i++) + for(int i = 0; i < (int)tempSize; i++) { memcpy(&temp, &buffer[start], 4); start += 4; diff --git a/Code/Game/GameClient/GameClientState/LevelLoader/ParseFunctions.h b/Code/Game/LevelLoader/ParseFunctions.h similarity index 100% rename from Code/Game/GameClient/GameClientState/LevelLoader/ParseFunctions.h rename to Code/Game/LevelLoader/ParseFunctions.h diff --git a/Code/Network/NetworkAPI/NetworkClient.cpp b/Code/Network/NetworkAPI/NetworkClient.cpp index 6f2998e9..5bd10165 100644 --- a/Code/Network/NetworkAPI/NetworkClient.cpp +++ b/Code/Network/NetworkAPI/NetworkClient.cpp @@ -319,7 +319,23 @@ bool NetworkClient::Connect(unsigned short port, std::wstring serverIP) bool NetworkClient::Reconnect() { - return this->privateData->connection.Reconnect(); + if(this->IsConnected()) + return false; + //if(this->privateData) + //return false; + if(!this->privateData) this->privateData = new PrivateData(); + + int result = this->privateData->connection.Reconnect(); + + if(result != 0) + { + return false; + } + this->privateData->owner = 0; + this->privateData->parent = this; + this->privateData->thread.Start(); + + return true; } void NetworkClient::Disconnect()