Skip to content
Browse files

[7596] Better use wmo MOPY flags data on extract vmaps. No changes, j…

…ust speedup.

Signed-off-by: DiSlord <dislord@nomail.com>
  • Loading branch information...
1 parent ac83026 commit 7f81558f3675fd0d32defeef8d9532570c01475d DiSlord committed Apr 1, 2009
View
BIN contrib/vmap_extract_assembler_bin/vmapextract_v2.exe
Binary file not shown.
View
6 contrib/vmap_extractor_v2/vmapextract/wmo.cpp
@@ -315,7 +315,11 @@ int WMOGroup::ConvertToVMAPGroupWmo(FILE *output, bool pPreciseVectorData)
IndexExTr = new int[mopy_size];
for (int i=0; i<mopy_size; i+=2)
{
- if ((int)MOPY[i]==0x00000008 ||(int)MOPY[i]==0x00000009 ||(int)MOPY[i]==0x00000020 ||(int)MOPY[i]==0x00000021 ||(int)MOPY[i]==0x00000022 ||(int)MOPY[i]==0x00000048 ||(int)MOPY[i]==0x00000049 ||(int)MOPY[i]==0x00000060 ||(int)MOPY[i]==0x00000061 ||(int)MOPY[i]==0x00000062 ||(int)MOPY[i]==0x0000000A ||(int)MOPY[i]==0x0000004A)
+ // Skip no collision triangles
+ if ((int)MOPY[i]&WMO_MATERIAL_NO_COLLISION)
+ continue;
+ // Use only this triangles
+ if ((int)MOPY[i]&(WMO_MATERIAL_HINT|WMO_MATERIAL_COLLIDE_HIT))
{
MopyEx[n] = MOPY[i];
MopyEx[(n+1)] = MOPY[(i+1)];
View
8 contrib/vmap_extractor_v2/vmapextract/wmo.h
@@ -10,6 +10,14 @@
#include <set>
#include "mpq.h"
+// MOPY flags
+#define WMO_MATERIAL_NOCAMCOLLIDE 0x01
+#define WMO_MATERIAL_DETAIL 0x02
+#define WMO_MATERIAL_NO_COLLISION 0x04
+#define WMO_MATERIAL_HINT 0x08
+#define WMO_MATERIAL_RENDER 0x10
+#define WMO_MATERIAL_COLLIDE_HIT 0x20
+#define WMO_MATERIAL_WALL_SURFACE 0x40
class WMOInstance;
class WMOManager;
View
2 src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "7595"
+ #define REVISION_NR "7596"
#endif // __REVISION_NR_H__

0 comments on commit 7f81558

Please sign in to comment.
Something went wrong with that request. Please try again.