Hello,

I've checked things out a bit more, and I still cannot make
a CBasePlayerItem get hit by bullets...it's as if it doesn't register
as an entity that can get hit. Basically, I've modified
temporarily the GiveNamedItem function in CPlayer so that
the item has a solid bounding box and a model. I've also
cleared out the player->pev->weaponmodel to zero so that no pmodels
are rendered on the player, and the CBasePlayerWeapon calls
SET_MODEL with a p_model (so that all the hitboxes are present
with the bones). No matter what I do, it will not register
any hits.

I've also tried this: basically, instead of an item, I spawn
a CBaseMonster derived class and assign it to the player
with movetype == FOLLOW and pev->aiment and pev->owner set to the player.
The monster uses the same pmodel as the weapon. This works perfectly,
all hits actually get registered on the "monster" weapon. The thing
I've been tearing my eyes out to figure out is why the CBaseMonster
class registers hits and CBasePlayerWeapon doesn't...I mean, in both
cases I assign pev->solid to a bbox, I do a SetOrigin, a SetSize...
but the CBasePlayerWeapon never registers any hits! Those two classes
cannot be that different, since they both derive from CBaseAnimating.
Does anyone have any clue about this behavior? Will I basically have
to recode my weapons to be CBaseMonsters instead?

Georges

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Reedbeta
Sent: Tuesday, November 20, 2001 12:07 AM
To: [EMAIL PROTECTED]
Subject: RE: [hlcoders] Hitting a weapon p model


I'd advise you to start looking at the Deploy functions of weapons.  These
are
the only places where their p-models are referenced in the weapon code
(except
for precaching), so if you trace the execution path through them, they might
lead you someplace where you can make the changes you want.

--- Georges Giroux <[EMAIL PROTECTED]> wrote:
> Do you have a hint where I could start to look for this code to modify the
> weapon system?
> Or basically would I have to transform weapons in CBaseMonsters
> instead? The only other option I have is to integrate these things
> directly into the player models, but that would leave little room
> to do things like weapon switching.
>
> Georges
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Reedbeta
> Sent: Monday, November 19, 2001 7:06 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [hlcoders] Hitting a weapon p model
>
>
> No...as David just explained, it's because the p-model isn't represented
by
> an
> entity (like v-model and w-model are), it's just tacked onto the player
> model
> during the render process.  So you really can't hit it without making some
> major changes to the weapon system.  But those changes are quite possible
> given
> the code that is exposed in SDK 2.1 and 2.2.
>
> --- Gareth Llewellyn <[EMAIL PROTECTED]> wrote:
> > Urm, I may be wrong, but does the problem lie with the hitboxes on the P
> > weapon?
> >
> > Gareth Llewellyn
> > InNeedOfTherepy
> > -Project Leader
> > -Lead Coder
> > -Lead Mapper
> > Half-Life The Beginning
> > www.HLTB.co.uk
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> please
> > visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Find the one for you at Yahoo! Personals
> http://personals.yahoo.com
> _______________________________________________
> 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
>


__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
_______________________________________________
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