Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Core/Common): delete lib game-interface inherited #5333

Merged
merged 18 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ target_include_directories(common
${CMAKE_CURRENT_BINARY_DIR})

target_link_libraries(common
PRIVATE
game-interface
PUBLIC
acore-core-interface
ace
Expand Down
16 changes: 2 additions & 14 deletions src/common/Collision/DynamicTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
*/

#include "DynamicTree.h"
//#include "QuadTree.h"
//#include "RegularGrid.h"
#include "BoundingIntervalHierarchyWrapper.h"

#include "Log.h"
#include "RegularGrid.h"
#include "Timer.h"
#include "GameObjectModel.h"
#include "ModelInstance.h"

#include <G3D/AABox.h>
#include <G3D/Ray.h>
#include <G3D/Vector3.h>
Expand All @@ -23,10 +19,8 @@ using VMAP::ModelInstance;

namespace
{

int CHECK_TREE_PERIOD = 200;

} // namespace
}

template<> struct HashTrait< GameObjectModel>
{
Expand All @@ -44,15 +38,9 @@ template<> struct BoundsTrait< GameObjectModel>
static void getBounds2(const GameObjectModel* g, G3D::AABox& out) { out = g->getBounds();}
};

/*
static bool operator == (const GameObjectModel& mdl, const GameObjectModel& mdl2){
return &mdl == &mdl2;
}
*/

typedef RegularGrid2D<GameObjectModel, BIHWrap<GameObjectModel>> ParentTree;

struct DynTreeImpl : public ParentTree/*, public Intersectable*/
struct DynTreeImpl : public ParentTree
{
typedef GameObjectModel Model;
typedef ParentTree base;
Expand Down
2 changes: 1 addition & 1 deletion src/common/Collision/Management/IMMAPManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ namespace MMAP
};
}

#endif
#endif
3 changes: 1 addition & 2 deletions src/common/Collision/Management/IVMapManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ This is the minimum interface to the VMapMamager.

namespace VMAP
{

enum VMAP_LOAD_RESULT
{
VMAP_LOAD_RESULT_ERROR,
Expand Down Expand Up @@ -83,6 +82,6 @@ namespace VMAP
virtual bool getAreaInfo(unsigned int pMapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const = 0;
virtual bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 ReqLiquidType, float& level, float& floor, uint32& type) const = 0;
};

}

#endif
9 changes: 1 addition & 8 deletions src/common/Collision/Management/MMapFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

#include "MMapFactory.h"
#include "World.h"
#include <set>

namespace MMAP
Expand All @@ -23,12 +22,6 @@ namespace MMAP
return g_MMapManager;
}

bool MMapFactory::IsPathfindingEnabled(const Map* map)
{
if (!map) return false;
return !forbiddenMaps[map->GetId()] && (sWorld->getBoolConfig(CONFIG_ENABLE_MMAPS) ? true : map->IsBattlegroundOrArena());
}

void MMapFactory::InitializeDisabledMaps()
{
memset(&forbiddenMaps, 0, sizeof(forbiddenMaps));
Expand All @@ -46,4 +39,4 @@ namespace MMAP
g_MMapManager = nullptr;
}
}
}
}
4 changes: 1 addition & 3 deletions src/common/Collision/Management/MMapFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#include "MMapManager.h"
#include "DetourAlloc.h"
#include "DetourNavMesh.h"
#include "Navigation/DetourExtended.h"
#include "Map.h"
#include "DetourExtended.h"
#include <unordered_map>

namespace MMAP
Expand All @@ -31,7 +30,6 @@ namespace MMAP
public:
static MMapManager* createOrGetMMapManager();
static void clear();
static bool IsPathfindingEnabled(const Map* map);
static void InitializeDisabledMaps();
static bool forbiddenMaps[1000];
};
Expand Down
Loading