mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
In CCmpVisualActor, m_Unit is not initialized when running without graphics, so we must check that pointer everytime. Also make one call consistent with the rest of the file.
Fixes #4238, refs #3952 This was SVN commit r18812.
This commit is contained in:
parent
bb0924bb6c
commit
0030f6ad2b
1 changed files with 2 additions and 2 deletions
|
|
@ -264,7 +264,7 @@ public:
|
|||
// If we serialized a different seed or different actor, reload actor
|
||||
if (oldSeed != GetActorSeed() || m_BaseActorName != m_ActorName)
|
||||
ReloadActor();
|
||||
else
|
||||
else if (m_Unit)
|
||||
m_Unit->SetEntitySelection(m_VariantSelections);
|
||||
|
||||
fixed repeattime = m_AnimSyncRepeatTime; // save because SelectAnimation overwrites it
|
||||
|
|
@ -745,7 +745,7 @@ void CCmpVisualActor::ReloadActor()
|
|||
|
||||
void CCmpVisualActor::Update(fixed UNUSED(turnLength))
|
||||
{
|
||||
if (m_Unit == NULL)
|
||||
if (!m_Unit)
|
||||
return;
|
||||
|
||||
// If we're in the special movement mode, select an appropriate animation
|
||||
|
|
|
|||
Loading…
Reference in a new issue