source-engine/hammer/modelfactory.cpp
FluorescentCIAAfricanAmerican 3bf9df6b27 1
2020-04-22 12:56:21 -04:00

48 lines
1.0 KiB
C++

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $Workfile: $
// $Date: $
//
//-----------------------------------------------------------------------------
// $Log: $
//
// $NoKeywords: $
//=============================================================================//
#include "stdafx.h"
#include "MapStudioModel.h"
#include "ModelFactory.h"
//-----------------------------------------------------------------------------
// Purpose:
// Input : eModelType -
// pszModelData -
// Output :
//-----------------------------------------------------------------------------
CMapClass *CModelFactory::CreateModel(ModelType_t eModelType, const char *pszModelData)
{
switch (eModelType)
{
case ModelTypeStudio:
{
int nLen = strlen(pszModelData);
if ((nLen > 4) && (!stricmp(&pszModelData[nLen - 4], ".mdl")))
{
CMapStudioModel *pModel = new CMapStudioModel(pszModelData);
return(pModel);
}
break;
}
default:
{
break;
}
}
return(NULL);
}