--
[ Picked text/plain from multipart/alternative ]
Changing the return value to the new hull values, so that when the engine
calls GetPlayerMins/Max() it returns the appropriate value for the new Hull
Box. And editing the default values won't work (need more than 1 hull
box). How are you suggesting editing the CViewVectors to allow multiple
hulls? Overriding the view/hull data in descended classes linked to the
move data? Adding in new values/changing those wouldn't do much as it would
either just change the default or add in new variables that are unused?
Seems like the only way involving that that I can think of would be using
sub-classes that each set it to the appropriate value based on the player's
class/etc.? Will poke around with it a bit more, but thanks at ton for the
suggestions so far. : ) Here's the code for the returning by the way.
...
//using standard values right now to make sure this was the problem.
SNSView=Vector(0,0,64);
SNSHullMins=Vector(-16,-16,0);
SNSHullMaxs=Vector(16,16,72);
SNSDuckHullMins=Vector(-16,-16,0);
SNSDuckHullMaxs=Vector(16,16,36);
SNSDuckView=Vector(0,0,28);
...
...
const Vector& CIDSNSMovement::GetPlayerMins( bool ducked ) const
{
return ducked ? SNSDuckHullMins : SNSHullMins;
}
const Vector& CIDSNSMovement::GetPlayerMaxs( bool ducked ) const
{
return ducked ? SNSDuckHullMaxs : SNSHullMaxs;
}
const Vector& CIDSNSMovement::GetPlayerMins( void ) const
{
if ( m_pPlayer->IsObserver() )
{
return VEC_OBS_HULL_MIN;
}
else
{
return m_pPlayer->m_Local.m_bDucked ? SNSDuckHullMins :
SNSHullMins;
}
}
const Vector& CIDSNSMovement::GetPlayerMaxs( void ) const
{
if ( m_pPlayer->IsObserver() )
{
return VEC_OBS_HULL_MAX;
}
else
{
return m_pPlayer->m_Local.m_bDucked ? SNSDuckHullMaxs :
SNSHullMaxs;
}
}
const Vector& CIDSNSMovement::GetPlayerViewOffset( bool ducked ) const
{
return ducked ? SNSDuckView : SNSView;
}
//This all works right now except for weirdness where we should be able to
go under/through something
//with these values but the standard hull cannot. Is the engine calling
VEC_HULL_MAX/min hardcoded
//somewhere rather than using GetPlayerMins/Maxs()?
On 1/21/07, Minh <[EMAIL PROTECTED]> wrote:
>
> I'm not exactly sure how you're actually changing the bounding box of the
> player by invoking "getplayermins" and "getplayermaxs" but the way I've
> beeen able to do it is by editing the following vector array,
>
> static CViewVectors g_DefaultViewVectors(
>
> Vector( 0, 0, 64 ), // m_vView
>
>
> Vector(-16, -16, 0 ), // m_vHullMin
>
> Vector( 16, 16, 72 ), // m_vHullMax
>
> Vector(-16, -16, 0 ), // m_vDuckHullMin
>
> Vector( 16, 16, 44 ), // m_vDuckHullMax
>
> Vector( 0, 0, 32 ), // m_vDuckView
>
>
> Vector(-10, -10, -10 ), // m_vObsHullMin
>
> Vector( 10, 10, 10 ), // m_vObsHullMax
>
>
> Vector( 0, 0, 14 ) // m_vDeadViewHeight
>
> );
>
> inside of "gamerules.cpp"
>
>
> If you want to add a new custom hull definition, you'll also need to
> make the appropriate changes inside
> class CViewVectors
>
> located in the "sharedefs.h" header file
>
> Good luck
>
> ----- Original Message -----
> From: "Greg Scott" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Sunday, January 21, 2007 1:43 PM
> Subject: [hlcoders] Custom Hull Box Problems?
>
>
> > --
> > [ Picked text/plain from multipart/alternative ]
> > Been trying to make a custom hullbox/view for a player class, using a
> > custom
> > CMoveData class; I went changing the Hullbox data and view data by
> using
> > GetPlayerViewOffset() and
> > GetPlayerMins(bool/void)/GetPlayerMaxs(bool/void). Everything works,
> > except
> > that when the player moves into an area that is smaller than the
> standard
> > HL2/GordonFreeman hullbox, they get pushed out of the area..? I'm
> > guessing
> > some sort of Fixing player stuck workaround is causing this, but I'm not
> > really sure.
> >
> > Anyone who's done much work with hullboxes, any idea if there is more I
> > should modify beyond the GetPlayerMins/GetPlayerMaxs functions? In the
> > mod
> > there will be multiple differing hullboxes, so just modifying the
> default
> > Freeman box and using that won't work. : / Thanks for the help! : )
> >
> > -Greg 'Khaim - Wind' Scott (Intelligent Design Mod Coder)
> > --
> >
> > _______________________________________________
> > 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