mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-26 23:05:30 +03:00
Fix console error on BreakableBrushes without spawnobject
This commit is contained in:
parent
7d2970eacd
commit
7ad12764fa
@ -221,6 +221,10 @@ bool CBreakable::KeyValue( const char *szKeyName, const char *szValue )
|
||||
if ( object > 0 && object < ARRAYSIZE(pSpawnObjects) )
|
||||
m_iszSpawnObject = MAKE_STRING( pSpawnObjects[object] );
|
||||
#ifdef MAPBASE
|
||||
// "0" is the default value of a "choices" field in Hammer, representing nothing selected
|
||||
// atoi() returning 0 may also indicate a failed conversion, so check szValue directly
|
||||
else if ( FStrEq( szValue, "0" ) )
|
||||
m_iszSpawnObject = NULL_STRING;
|
||||
else
|
||||
m_iszSpawnObject = AllocPooledString(szValue);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user