mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Adds safe bool operator to ICmpPtr, replacing the null() method, based on patch by leper. Also changes bool operator in AtSmartPtr to safe bool. Fixes #1077.
Changes some CmpPtr variable names for consistency. This was SVN commit r11036.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2011 Wildfire Games.
|
||||
/* Copyright (C) 2012 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -186,7 +186,7 @@ void CUnitAnimation::Update(float time)
|
||||
if (!m_ActionSound.empty())
|
||||
{
|
||||
CmpPtr<ICmpSoundManager> cmpSoundManager(*g_Game->GetSimulation2(), SYSTEM_ENTITY);
|
||||
if (!cmpSoundManager.null())
|
||||
if (cmpSoundManager)
|
||||
cmpSoundManager->PlaySoundGroup(m_ActionSound, m_Entity);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user