2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04:00

Fix some stupid stuff that would have crashed the plugin...

This commit is contained in:
2011-04-15 17:00:26 -04:00
parent 92defe7570
commit 205105ef23
11 changed files with 20 additions and 28 deletions

View File

@ -1015,15 +1015,15 @@ protected:
void IGetNewLocalFileName( plBaseSoundEmitterComponent *soundComponent, plBaseSoundEmitterComponent::WhichSound which )
{
char* fileName[ MAX_PATH ], dirName[ MAX_PATH ];
char fileName[ MAX_PATH ], dirName[ MAX_PATH ];
const char* name = soundComponent->GetSoundFileName( which );
if( name != nil )
strcpy( (char*)fileName, name );
strcpy( fileName, name );
else
strcpy( (char*)fileName, _T( "" ) );
strcpy( fileName, _T( "" ) );
strcpy( dirName, (const char*)fileName );
strcpy( dirName, fileName );
::PathRemoveFileSpec( dirName );
OPENFILENAME ofn = {0};

View File

@ -304,12 +304,8 @@ plMaxNodeBase *plComponentBase::GetINode()
ReferenceMaker* rm = di.Next();
while (rm != nil)
{
for (int i = 0; i < rm->NumRefs(); i++)
{
RefTargetHandle h = rm->GetReference(i);
if (h->SuperClassID() == BASENODE_CLASS_ID)
return (plMaxNodeBase*)h;
}
if (rm->SuperClassID() == BASENODE_CLASS_ID)
return (plMaxNodeBase*)rm;
rm = di.Next();
}

View File

@ -4470,19 +4470,15 @@ static void GetMtlNodes(Mtl *mtl, INodeTab& nodes)
ReferenceMaker *rm = di.Next();
while (rm != nil)
{
for (int i = 0; i < rm->NumRefs(); i++)
if (rm->SuperClassID() == BASENODE_CLASS_ID)
{
RefTargetHandle item = rm->GetReference(i);
if (item->SuperClassID() == BASENODE_CLASS_ID)
{
INode *node = (INode*)item;
if (node->GetMtl() == mtl)
nodes.Append(1, &node);
}
INode *node = (INode*)rm;
if (node->GetMtl() == mtl)
nodes.Append(1, &node);
}
rm = di.Next();
}
rm = di.Next();
}
int hsMaterialConverter::GetMaterialArray(Mtl *mtl, hsTArray<hsGMaterial*>& out, UInt32 multiIndex /* = 0 */)

View File

@ -25,7 +25,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "plBumpMtl.h"
#include "plBumpMtlBasicPB.h"
#include "resource.h"
#include "../resource.h"
#include "iparamm2.h"
class BumpBasicDlgProc;

View File

@ -27,7 +27,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "max.h"
#include "MaxIcon.h"
#include "resource.h"
#include "../resource.h"
#include "plCompositeMtl.h"
//#include "plCompositeMtlPB.h"
//#include "plMaxLayer.h"

View File

@ -27,7 +27,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plDecalMtl.h"
#include "../resource.h"
//extern ClassDesc2* GetMaxLayerDesc();
#include "Shaders.h"
#include "../Shaders.h"
#include "MaxComponent/plMaxAnimUtils.h"
#include "plPassBaseParamIDs.h"

View File

@ -25,7 +25,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "plDecalMtl.h"
#include "plDecalMtlBasicPB.h"
#include "resource.h"
#include "../resource.h"
#include "iparamm2.h"
class DecalBasicPBAccessor;

View File

@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
plNoteTrackWatcher::plNoteTrackWatcher( plPassMtlBase *parentMtl ) : fParentMtl(nil)
{
fNoteTrackCount = parentMtl->NumNoteTracks();
MakeRefByID( FOREVER, kRefParentMtl, parentMtl );
ReplaceReference(kRefParentMtl, parentMtl);
}
plNoteTrackWatcher::~plNoteTrackWatcher()

View File

@ -27,7 +27,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plParticleMtl.h"
#include "../resource.h"
//extern ClassDesc2* GetMaxLayerDesc();
#include "Shaders.h"
#include "../Shaders.h"
#include "iparamm2.h"

View File

@ -333,7 +333,7 @@ void plPassMtlBase::NoteTrackAdded( void )
if( fNotetracks.Find( track ) == fNotetracks.kMissingIndex )
{
MakeRefByID( FOREVER, kRefNotetracks + fNotetracks.GetCount(), track );
ReplaceReference(kRefNotetracks + fNotetracks.GetCount(), track);
break;
}
}

View File

@ -25,7 +25,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "plPassMtl.h"
#include "plPassMtlBasicPB.h"
#include "resource.h"
#include "../resource.h"
#include "iparamm2.h"
class PassBasicPBAccessor;