예제 #1
0
void ModelBody::SetModel(const char *modelName)
{
	m_model = Pi::FindModel(modelName);
	SetClipRadius(m_model->GetDrawClipRadius());

	RebuildCollisionMesh();
}
예제 #2
0
void ModelBody::SetModel(const char *lmrModelName, bool isStatic)
{
	m_isStatic = isStatic;

	try {
		m_lmrModel = LmrLookupModelByName(lmrModelName);
	} catch (LmrModelNotFoundException) {
		printf("Could not find model '%s'.\n", lmrModelName);
		Pi::Quit();
	}

	RebuildCollisionMesh();
}
예제 #3
0
void ModelBody::SetModel(const char *modelName)
{
	//remove old instance
	delete m_model; m_model = 0;

	m_modelName = modelName;

	//create model instance (some modelbodies, like missiles could avoid this)
	m_model = Pi::FindModel(m_modelName)->MakeInstance();

	SetClipRadius(m_model->GetDrawClipRadius());

	RebuildCollisionMesh();
}
예제 #4
0
void ModelBody::SetModel(const char *modelName)
{
	//remove old instance
	delete m_model;
	m_model = 0;

	m_modelName = modelName;

	//create model instance (some modelbodies, like missiles could avoid this)
	m_model = Pi::FindModel(m_modelName)->MakeInstance();
	m_idleAnimation = m_model->FindAnimation("idle");

	SetClipRadius(m_model->GetDrawClipRadius());

	m_shields.reset(new Shields(m_model));

	RebuildCollisionMesh();
}