Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
1.0 KiB

//========= 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);
}