I see two potential problems with the way you're spawning the entity. First,
you're using GetClassPtr() to create an instance of the CBreakable class. Most
other places in the SDK where an entity is created use the
CREATE_NAMED_ENTITY() macro to instantiate the class. Second, you should call
DispatchSpawn() instead of calling the CBreakable's spawn function yourself.
Take a look at CBaseEntity::Create() or CMonsterMaker::MakeMonster() for other
examples of how entities can be created by other entities in the SDK.
---Reedbeta
--- Jeff Fearn [EMAIL PROTECTED] wrote:
The UTIL_REMOVE(this); line should not be in a Spawn function... But you
might have some good reasons to put this there :)
The entity is not required once it spawns the func_breakable.
I think you're problem appears beacause you haven't done a
UTIL_SetOrigin(pev, pev-origin);... You've done this on breakable but
not on the entity itself.
The origins are correct, the func_breakable appears in the correct location.
I would set pev-solid to SOLID_BSP... Here, you've commented the line out
!
That is the default value set in the func_breakable's spawn function. I just
left
the commented version in there to illustrate how I have tried over riding
that
default value.
Hope that helps...
NO :( Nice try though :)
Jeff.
___
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders