This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Hello,

If I've good understood the "//set size and look into world" commentary, UTIL_SetOrigin
set the size of the model to the entity.

I'll explain my thought :)
To set the size of an entity, there's two different solutions :

    - point-based entity : UTIL_SetOrigin(...), UTIL_SetSize(pev, Vector(...), 
Vector(...))

    - solid based entity : UTIL_SetOrigin(...), the size is automacally set to the 
model's one
(I don't know if it uses the hitboxes or the polys to calculate the size).

Hope you've understood what I think :)

For the solidity problem you could also set pev->solid to SOLID_BSP... I don't know if 
it works but it's worth
thinking over...
_______________________________
Cortex ( ICQ : 71548738 )
HL Albator coder & mapper ( www.hlalbator.fr.st )
  ----- Original Message -----
  From: "Charlie Cleveland" <[EMAIL PROTECTED]>
  To: <[EMAIL PROTECTED]>
  Sent: Friday, February 01, 2002 7:26 PM
  Subject: [hlcoders] Solidity problems


  >
  >    (I apologize if you receive this message twice, I've made some
  > subscription changes and I wanted to make sure my message went through)
  >
  > ----
  >
  >    Hey all,
  >
  >    I've had a lot of problems making a point entity with a model solid.
  > Brush-based entities are no problem. I've even gotten ONE point entity
  with
  > a model solid, though even when I use that code as a base for a new
  entity,
  > I can't make it work in the new entity.
  >
  >    The basic approach I'm taking is very standard, and looks something
  like
  > this:
  >
  > (in the entity's Spawn(), assuming that pev->model is filled with the
  model
  > name, constants substitued for values for clarity)
  >
  >    this->pev->classname = MAKE_STRING("avhhive");
  >    this->pev->solid = SOLID_BBOX;
  >    this->pev->movetype = MOVETYPE_NONE;
  >    this->pev->takedamage = DAMAGE_YES;
  >
  >    SET_MODEL(ENT(this->pev), STRING(this->pev->model));
  >    UTIL_SetOrigin( pev, pev->origin ); // link into world (??)
  >
  >    UTIL_SetSize(this->pev, Vector(-80, -80, -80), Vector(80, 80, 80));
  >    this->pev->team = inTeam;
  >    SetBits(pev->flags, FL_MONSTER);
  >
  >
  >    Some of these things I really don't know about:
  >
  >    - UTIL_SetOrigin(): In some places in the code, I'll see a comment next
  > to this line that says "// set size and link into world". What exactly
  does
  > this do? It seems to have no effect.
  >
  >    - Are hitboxes or anything else needed in the model to make it solid?
  Is
  > there any reliance on the .mdl, or is it all in the code?
  >
  >    - Does the order of SET_MODEL() and UTIL_SetSize() matter? Does it
  > matter if the pev->solid is set before or after any of UTIL_SetOrigin(),
  > SET_MODEL() or UTIL_SetSize()?
  >
  >
  >    I've tried a ton of different things and it really seems utterly
  random.
  > I've even been in the middle of testing something else suddenly noticed
  > that all my non-solid point entities are suddenly solid, for no apparent
  > reason. Later, I'll go in and test them and I'll be able to walk through
  > them again.
  >
  >    I've tried using artwork from TFC. I've tried copying code from TFC.
  > I've used base.mdl, and other standard Valve models. Nothing seems to work
  > reliably. I've developed quite a lot of code so far, so I'm pretty sure
  > it's not some blatantly obvious HL or programming issue.
  >
  >    Can anyone please enlighten this poor soul?
  >
  > -Charlie
  > Charlie Cleveland
  > Game programmer and designer
  > http://www.natural-selection.org
  > [EMAIL PROTECTED]
  >
  > _______________________________________________
  > 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