Skip to content

Commit

Permalink
[7596] Better use wmo MOPY flags data on extract vmaps. No changes, j…
Browse files Browse the repository at this point in the history
…ust speedup.

Signed-off-by: DiSlord <dislord@nomail.com>
  • Loading branch information
DiSlord committed Apr 1, 2009
1 parent ac83026 commit 7f81558
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
Binary file modified contrib/vmap_extract_assembler_bin/vmapextract_v2.exe
Binary file not shown.
6 changes: 5 additions & 1 deletion contrib/vmap_extractor_v2/vmapextract/wmo.cpp
Expand Up @@ -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)];
Expand Down
8 changes: 8 additions & 0 deletions contrib/vmap_extractor_v2/vmapextract/wmo.h
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion 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.