fix AV if character has no model
This commit is contained in:
@@ -110,6 +110,9 @@ ScreenHowToPlay::ScreenHowToPlay( CString sName ) : ScreenAttract( sName )
|
|||||||
{
|
{
|
||||||
Character* rndchar = GAMESTATE->GetRandomCharacter();
|
Character* rndchar = GAMESTATE->GetRandomCharacter();
|
||||||
|
|
||||||
|
CString sModelPath = rndchar->GetModelPath();
|
||||||
|
if( sModelPath != "" )
|
||||||
|
{
|
||||||
m_pmCharacter = new Model;
|
m_pmCharacter = new Model;
|
||||||
m_pmCharacter->LoadMilkshapeAscii( rndchar->GetModelPath() );
|
m_pmCharacter->LoadMilkshapeAscii( rndchar->GetModelPath() );
|
||||||
m_pmCharacter->LoadMilkshapeAsciiBones( "Step-LEFT", GetAnimPath( ANIM_LEFT ) );
|
m_pmCharacter->LoadMilkshapeAsciiBones( "Step-LEFT", GetAnimPath( ANIM_LEFT ) );
|
||||||
@@ -125,6 +128,7 @@ ScreenHowToPlay::ScreenHowToPlay( CString sName ) : ScreenAttract( sName )
|
|||||||
m_pmCharacter->SetRotationX( 40 );
|
m_pmCharacter->SetRotationX( 40 );
|
||||||
m_pmCharacter->Command( CHARACTERONCOMMAND );
|
m_pmCharacter->Command( CHARACTERONCOMMAND );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// silly to use the lifebar without a player, since the player updates the lifebar
|
// silly to use the lifebar without a player, since the player updates the lifebar
|
||||||
if( USELIFEBAR )
|
if( USELIFEBAR )
|
||||||
|
|||||||
Reference in New Issue
Block a user