Skip to content

Commit

Permalink
Core: Vmaps update 4.3 (#1021)
Browse files Browse the repository at this point in the history
Vmaps update from 4.2 to 4.3
  • Loading branch information
Nefertumm authored and BarbzYHOOL committed Jan 3, 2019
1 parent 676d5cd commit 59d4e1d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/common/Collision/VMapDefinitions.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@


namespace VMAP namespace VMAP
{ {
const char VMAP_MAGIC[] = "VMAP_4.2"; const char VMAP_MAGIC[] = "VMAP_4.3";
const char RAW_VMAP_MAGIC[] = "VMAP042"; // used in extracted vmap files with raw data const char RAW_VMAP_MAGIC[] = "VMAP043"; // used in extracted vmap files with raw data
const char GAMEOBJECT_MODELS[] = "GameObjectModels.dtree"; const char GAMEOBJECT_MODELS[] = "GameObjectModels.dtree";


// defined in TileAssembler.cpp currently... // defined in TileAssembler.cpp currently...
Expand Down
2 changes: 1 addition & 1 deletion src/tools/vmap4_extractor/vmapexport.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ bool preciseVectorData = false;


//static const char * szWorkDirMaps = ".\\Maps"; //static const char * szWorkDirMaps = ".\\Maps";
const char* szWorkDirWmo = "./Buildings"; const char* szWorkDirWmo = "./Buildings";
const char* szRawVMAPMagic = "VMAP042"; const char* szRawVMAPMagic = "VMAP043";


// Local testing functions // Local testing functions


Expand Down
5 changes: 3 additions & 2 deletions src/tools/vmap4_extractor/wmo.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -338,8 +338,9 @@ int WMOGroup::ConvertToVMAPGroupWmo(FILE *output, WMORoot *rootWMO, bool precise
for (int i=0; i<nTriangles; ++i) for (int i=0; i<nTriangles; ++i)
{ {
// Skip no collision triangles // Skip no collision triangles
if (MOPY[2*i]&WMO_MATERIAL_NO_COLLISION || bool isRenderFace = (MOPY[2 * i] & WMO_MATERIAL_RENDER) && !(MOPY[2 * i] & WMO_MATERIAL_DETAIL);
!(MOPY[2*i]&(WMO_MATERIAL_HINT|WMO_MATERIAL_COLLIDE_HIT)) ) bool isCollision = MOPY[2 * i] & WMO_MATERIAL_COLLISION || isRenderFace;
if (!isCollision)
continue; continue;
// Use this triangle // Use this triangle
for (int j=0; j<3; ++j) for (int j=0; j<3; ++j)
Expand Down
18 changes: 11 additions & 7 deletions src/tools/vmap4_extractor/wmo.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
#include "loadlib/loadlib.h" #include "loadlib/loadlib.h"


// MOPY flags // MOPY flags
#define WMO_MATERIAL_NOCAMCOLLIDE 0x01 enum MopyFlags
#define WMO_MATERIAL_DETAIL 0x02 {
#define WMO_MATERIAL_NO_COLLISION 0x04 WHO_MATERIAL_UNK01 = 0x01,
#define WMO_MATERIAL_HINT 0x08 WMO_MATERIAL_NOCAMCOLLIDE = 0x02,
#define WMO_MATERIAL_RENDER 0x10 WMO_MATERIAL_DETAIL = 0x04,
#define WMO_MATERIAL_COLLIDE_HIT 0x20 WMO_MATERIAL_COLLISION = 0x08,
#define WMO_MATERIAL_WALL_SURFACE 0x40 WMO_MATERIAL_HINT = 0x10,
WMO_MATERIAL_RENDER = 0x20,
WMO_MATERIAL_WALL_SURFACE = 0x40, // Guessed
WMO_MATERIAL_COLLIDE_HIT = 0x80,
};


class WMOInstance; class WMOInstance;
class WMOManager; class WMOManager;
Expand Down

3 comments on commit 59d4e1d

@Nefertumm
Copy link
Member Author

@Nefertumm Nefertumm commented on 59d4e1d Jan 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to re-extract vmaps again. OR just download from our WIKI

@boom8866
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What fixes have been made to this change?

@FrancescoBorzi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.