Finally found the problem, turns out I needed to add new_gamerules to 
the list of preserved entities too.

Bleh, oh well, works now.
Thanks,

Rich

Andrew Ritchie wrote:
> it's a bit messy looking but assert in release mode usually replaces with
> nothing or in Source's case ((void)0) instead of the expression.  So aslong
> as you don't go messing with enabling asserts in release and don't use the
> pEnt the compiler can live with it without erroring.  Might get a warning
> though.
>
> What might be a better usage would be
>
> ...
> g_pLastRebelSpawn = NULL;
> Verify( CBaseEntity::Create( "new_gamerules", vec3_origin, vec3_angle ) );
>
> }
>
> but it's also Valve's own code so no point going to nuts over it.
>
> On Wed, Nov 4, 2009 at 1:18 PM, Jonas 'Sortie' Termansen
> <[email protected]>wrote:
>
>   
>> How can that possibly work, or compile? The pEnt is defined in _DEBUG
>> but you assert it in the non-_DEBUG build. Doesn't that throw a warning?
>>     
>>> void CNewGameRules::CreateStandardEntities( void )
>>> {
>>> #ifndef CLIENT_DLL
>>>     CGameRules::CreateStandardEntities();
>>>
>>>     g_pLastCombineSpawn = NULL;
>>>     g_pLastRebelSpawn = NULL;
>>>
>>> #ifdef _DEBUG
>>>     CBaseEntity *pEnt =
>>> #endif
>>>     CBaseEntity::Create( "new_gamerules", vec3_origin, vec3_angle );
>>>     Assert( pEnt );
>>> #endif
>>> }
>>>
>>>       
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>
>>     
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>   


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to