Skip to content

Commit 898b00b

Browse files
authored
[GEN] Backport more of WW3D2 from Zero Hour (#757)
1 parent d6f2ec4 commit 898b00b

21 files changed

+2428
-392
lines changed

Generals/Code/Libraries/Source/WWVegas/WW3D2/assetmgr.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ class Font3DDataIterator : public AssetIterator
200200
WW3DAssetManager::WW3DAssetManager(void) :
201201
PrototypeLoaders (PROTOLOADERS_VECTOR_SIZE),
202202
Prototypes (PROTOTYPES_VECTOR_SIZE),
203+
203204
WW3D_Load_On_Demand (false),
204205
Activate_Fog_On_Load (false),
205206
MetalManager(0)
@@ -212,7 +213,10 @@ WW3DAssetManager::WW3DAssetManager(void) :
212213
Prototypes.Set_Growth_Step(PROTOTYPES_GROWTH_RATE);
213214

214215
// install the default loaders
216+
#ifndef USE_WWSHADE
215217
Register_Prototype_Loader(&_MeshLoader);
218+
#endif
219+
216220
Register_Prototype_Loader(&_HModelLoader);
217221
Register_Prototype_Loader(&_CollectionLoader);
218222
Register_Prototype_Loader(&_BoxLoader);
@@ -798,7 +802,8 @@ RenderObjClass * WW3DAssetManager::Create_Render_Obj(const char * name)
798802

799803
// If we can't find it, try the parent directory
800804
if ( Load_3D_Assets( filename ) == false ) {
801-
StringClass new_filename = StringClass("..\\") + filename;
805+
StringClass new_filename(StringClass("..\\"),true);
806+
new_filename+=filename;
802807
Load_3D_Assets( new_filename );
803808
}
804809

@@ -1024,7 +1029,8 @@ HTreeClass * WW3DAssetManager::Get_HTree(const char * name)
10241029

10251030
// If we can't find it, try the parent directory
10261031
if ( Load_3D_Assets( filename ) == false ) {
1027-
StringClass new_filename = StringClass("..\\") + filename;
1032+
StringClass new_filename("..\\",true);
1033+
new_filename+=filename;
10281034
Load_3D_Assets( new_filename );
10291035
}
10301036

0 commit comments

Comments
 (0)