>
> It does not get that far. The func_breakable gets created in PlaceDTO(),
> which will no becalled unless the origin can be determined. This is the spawn
> function for the entity I use to handle the func_bomb_target:
>
> LINK_ENTITY_TO_CLASS(func_bomb_target, CSwarmCSDE);
>
> void CSwarmCSDE::Spawn()
> {
>  Precache();
>
>  Vector origint = VecBModelOrigin(pev);
> <----------------- This returns -1,-1,-1
>
>  if((pev->origin.x == 0) && (pev->origin.y == 0) && (pev->origin.z == 0))
> <---------------- These are all 0 and never get set
>  {
>   pev->nextthink = gpGlobals->time + 1.1;
>   SetThink(&CSwarmCSDE::Wait);
>   return;
>  }
>
>  PlaceDTO();
> }

All of the Spawn() functions for brush models that I looked at had this...

SET_MODEL( ENT(pev), STRING(pev->model) );

...setting the model of the entity to the *modelindex value for the brush
model.

Perhaps you need to do the same thing and set the pev->model up properly before
trying to get the VecBModelOrigin().  The pev->origin will always be (0,0,0)
for brush models.

Jeffrey "botman" Broome

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

Reply via email to