Re: [hlcoders] TF2 style player collisions (again)

2009-07-23 Thread Richard Slaughter
Hmm, I just realised that whilst adding the test for CONTENTS_TEAM1 mask 
to the ShouldCollide method, I haven't added it to the actual player 
anywhere so that it can be tested against, aside from in gamemovement, 
which I presume ShouldCollide doesn't care about.

Where should the mask be specified for the player, in 
PhysicsSolidMaskForEntity?

Am I barking up the wrong tree?
Thanks guys,

Rich

Chris Harris wrote:
 In player class and in Gamemovement are some traces do not call to proper
 function to get solid mask and assume the standard player collision masks.
 All these should change to call to the function to get proper solid mask.
 In the player class I remember, in Gamemovement Ladder code were some too.

 On Wed, Jul 22, 2009 at 7:39 PM, Tobias Kammersgaard 
 tobias.kammersga...@gmail.com wrote:

   
 Code for this was in the latest SDK release, wasn't it?
 /ScarT


 2009/7/23 Richard Slaughter slau...@vault13.co.uk

 
 Hi List,

 This has been discussed before but I can't find any concrete advice to
 get TF2 style player collisions working fully (team mates can pass
 through each other, enemies are solid).

 I've gotten as far as modifying PlayerSolidMask to:

 unsigned int CGameMovement::PlayerSolidMask( bool brushOnly )
 {
  unsigned int playerMask = MASK_PLAYERSOLID;
  if(player-GetTeamNumber() == 2)
playerMask |= CONTENTS_TEAM1;
  else if(player-GetTeamNumber() == 3)
playerMask |= CONTENTS_TEAM2;

return ( brushOnly ) ? MASK_PLAYERSOLID_BRUSHONLY : playerMask;
 }

 And shouldCollide in baseentity to:

 bool CBaseEntity::ShouldCollide( int collisionGroup, int contentsMask )
 const
 {
if ( m_CollisionGroup == COLLISION_GROUP_DEBRIS )
{
if ( ! (contentsMask  CONTENTS_DEBRIS) )
return false;
}

  if(contentsMask  CONTENTS_TEAM1  GetTeamNumber() == 2 ||
 contentsMask  CONTENTS_TEAM2  GetTeamNumber() == 3 )
return false;

return true;
 }


 And this seems to nearly do it, but theres still something stopping the
 player mid way through.

 What else am I missing? Is it VPhysics related?
 Thanks!

 Rich

 ___
 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

   


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



Re: [hlcoders] TF2 style player collisions (again)

2009-07-22 Thread Tobias Kammersgaard
Code for this was in the latest SDK release, wasn't it?
/ScarT


2009/7/23 Richard Slaughter slau...@vault13.co.uk

 Hi List,

 This has been discussed before but I can't find any concrete advice to
 get TF2 style player collisions working fully (team mates can pass
 through each other, enemies are solid).

 I've gotten as far as modifying PlayerSolidMask to:

 unsigned int CGameMovement::PlayerSolidMask( bool brushOnly )
 {
  unsigned int playerMask = MASK_PLAYERSOLID;
  if(player-GetTeamNumber() == 2)
playerMask |= CONTENTS_TEAM1;
  else if(player-GetTeamNumber() == 3)
playerMask |= CONTENTS_TEAM2;

return ( brushOnly ) ? MASK_PLAYERSOLID_BRUSHONLY : playerMask;
 }

 And shouldCollide in baseentity to:

 bool CBaseEntity::ShouldCollide( int collisionGroup, int contentsMask )
 const
 {
if ( m_CollisionGroup == COLLISION_GROUP_DEBRIS )
{
if ( ! (contentsMask  CONTENTS_DEBRIS) )
return false;
}

  if(contentsMask  CONTENTS_TEAM1  GetTeamNumber() == 2 ||
 contentsMask  CONTENTS_TEAM2  GetTeamNumber() == 3 )
return false;

return true;
 }


 And this seems to nearly do it, but theres still something stopping the
 player mid way through.

 What else am I missing? Is it VPhysics related?
 Thanks!

 Rich

 ___
 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



Re: [hlcoders] TF2 style player collisions

2008-08-18 Thread Daniel Menard
That would be very helpful. It's a common piece of code a lot of mods
want to implement.

Dan

On Fri, Aug 15, 2008 at 9:49 PM, Adrian Finol [EMAIL PROTECTED] wrote:
 TF2 players are only solid to enemies. The way we do all the soft
 collision behavior on the client is by modifying their user commands.

 Basically we figure out if you're near a non-solid team mate and modify
 your forwardmove and sidemoves accordingly. Doing it this way is why it
 feels smooth and prevents any prediction problems you'd run into
 otherwise.

 I'll talk to Mike about releasing the TF2 avoidance code either in the
 SDK or maybe we'll put it on the developer page.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Maarten De
 Meyer
 Sent: Thursday, August 14, 2008 11:54 PM
 To: Discussion of Half-Life Programming
 Subject: Re: [hlcoders] TF2 style player collisions

 Well I've managed to disable collisions based on team in the meantime,
 but
 don't have the soft physics push. Mind you I'm still in the ep1 engine.
 Basically, I had already added a custom filter to the TracePlayerBBox in
 gamemovement.cpp to filter gamemovement for my mod ( players can walk
 through forcefields, but only belonging to their team ). I just added
 the
 condition for players of the same team to that filter. So they're not
 blocking eachother anymore when casting rays for their movement.
 VPhysics
 has not been an issue at all for me, there's no collision.

 I'm looking for the same check the Player collisions, enemies vs
 friendlies. thread for more details. I still haven't found a fix to
 the prediction issues (if you have any insight, let me know).

 On Tue, Aug 12, 2008 at 5:43 AM, Maarten De Meyer
 [EMAIL PROTECTED]
 wrote:
 Hi list,

 In my mod by default players collide ( hard ) against eachother. For
 obvious reasons I want to disable this for teammates and rather have
 a
 soft collision/physics push like in TF2, where you still have the
 option
 to clip through a teammate if you want to, but you do get a slight
 physics
 resistance when you do.

 I know this isn't that hard, just wondering if someone had done it
 before
 and could point me in the right direction for the soft push part, I'm
 not
 too at home in Source's physics.

 -- Maarten


 ___
 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


 ___
 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



Re: [hlcoders] TF2 style player collisions

2008-08-18 Thread Adrian Finol
By the way, this is based on HL2's player push code for NPCs, so you can
look at that to get an idea on how the TF2 does it. 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Daniel
Menard
Sent: Monday, August 18, 2008 1:20 PM
To: Discussion of Half-Life Programming
Subject: Re: [hlcoders] TF2 style player collisions

That would be very helpful. It's a common piece of code a lot of mods
want to implement.

Dan

On Fri, Aug 15, 2008 at 9:49 PM, Adrian Finol [EMAIL PROTECTED]
wrote:
 TF2 players are only solid to enemies. The way we do all the soft
 collision behavior on the client is by modifying their user commands.

 Basically we figure out if you're near a non-solid team mate and
modify
 your forwardmove and sidemoves accordingly. Doing it this way is why
it
 feels smooth and prevents any prediction problems you'd run into
 otherwise.

 I'll talk to Mike about releasing the TF2 avoidance code either in the
 SDK or maybe we'll put it on the developer page.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Maarten
De
 Meyer
 Sent: Thursday, August 14, 2008 11:54 PM
 To: Discussion of Half-Life Programming
 Subject: Re: [hlcoders] TF2 style player collisions

 Well I've managed to disable collisions based on team in the meantime,
 but
 don't have the soft physics push. Mind you I'm still in the ep1
engine.
 Basically, I had already added a custom filter to the TracePlayerBBox
in
 gamemovement.cpp to filter gamemovement for my mod ( players can walk
 through forcefields, but only belonging to their team ). I just added
 the
 condition for players of the same team to that filter. So they're not
 blocking eachother anymore when casting rays for their movement.
 VPhysics
 has not been an issue at all for me, there's no collision.

 I'm looking for the same check the Player collisions, enemies vs
 friendlies. thread for more details. I still haven't found a fix to
 the prediction issues (if you have any insight, let me know).

 On Tue, Aug 12, 2008 at 5:43 AM, Maarten De Meyer
 [EMAIL PROTECTED]
 wrote:
 Hi list,

 In my mod by default players collide ( hard ) against eachother. For
 obvious reasons I want to disable this for teammates and rather have
 a
 soft collision/physics push like in TF2, where you still have the
 option
 to clip through a teammate if you want to, but you do get a slight
 physics
 resistance when you do.

 I know this isn't that hard, just wondering if someone had done it
 before
 and could point me in the right direction for the soft push part,
I'm
 not
 too at home in Source's physics.

 -- Maarten


 ___
 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


 ___
 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



Re: [hlcoders] TF2 style player collisions

2008-08-15 Thread Maarten De Meyer
Well I've managed to disable collisions based on team in the meantime, but
don't have the soft physics push. Mind you I'm still in the ep1 engine.
Basically, I had already added a custom filter to the TracePlayerBBox in
gamemovement.cpp to filter gamemovement for my mod ( players can walk
through forcefields, but only belonging to their team ). I just added the
condition for players of the same team to that filter. So they're not
blocking eachother anymore when casting rays for their movement. VPhysics
has not been an issue at all for me, there's no collision.

 I'm looking for the same check the Player collisions, enemies vs
 friendlies. thread for more details. I still haven't found a fix to
 the prediction issues (if you have any insight, let me know).

 On Tue, Aug 12, 2008 at 5:43 AM, Maarten De Meyer [EMAIL PROTECTED]
 wrote:
 Hi list,

 In my mod by default players collide ( hard ) against eachother. For
 obvious reasons I want to disable this for teammates and rather have a
 soft collision/physics push like in TF2, where you still have the option
 to clip through a teammate if you want to, but you do get a slight
 physics
 resistance when you do.

 I know this isn't that hard, just wondering if someone had done it
 before
 and could point me in the right direction for the soft push part, I'm
 not
 too at home in Source's physics.

 -- Maarten


 ___
 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



Re: [hlcoders] TF2 style player collisions

2008-08-15 Thread Adrian Finol
TF2 players are only solid to enemies. The way we do all the soft
collision behavior on the client is by modifying their user commands.

Basically we figure out if you're near a non-solid team mate and modify
your forwardmove and sidemoves accordingly. Doing it this way is why it
feels smooth and prevents any prediction problems you'd run into
otherwise.

I'll talk to Mike about releasing the TF2 avoidance code either in the
SDK or maybe we'll put it on the developer page.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Maarten De
Meyer
Sent: Thursday, August 14, 2008 11:54 PM
To: Discussion of Half-Life Programming
Subject: Re: [hlcoders] TF2 style player collisions

Well I've managed to disable collisions based on team in the meantime,
but
don't have the soft physics push. Mind you I'm still in the ep1 engine.
Basically, I had already added a custom filter to the TracePlayerBBox in
gamemovement.cpp to filter gamemovement for my mod ( players can walk
through forcefields, but only belonging to their team ). I just added
the
condition for players of the same team to that filter. So they're not
blocking eachother anymore when casting rays for their movement.
VPhysics
has not been an issue at all for me, there's no collision.

 I'm looking for the same check the Player collisions, enemies vs
 friendlies. thread for more details. I still haven't found a fix to
 the prediction issues (if you have any insight, let me know).

 On Tue, Aug 12, 2008 at 5:43 AM, Maarten De Meyer
[EMAIL PROTECTED]
 wrote:
 Hi list,

 In my mod by default players collide ( hard ) against eachother. For
 obvious reasons I want to disable this for teammates and rather have
a
 soft collision/physics push like in TF2, where you still have the
option
 to clip through a teammate if you want to, but you do get a slight
 physics
 resistance when you do.

 I know this isn't that hard, just wondering if someone had done it
 before
 and could point me in the right direction for the soft push part, I'm
 not
 too at home in Source's physics.

 -- Maarten


 ___
 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


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



Re: [hlcoders] TF2 style player collisions

2008-08-14 Thread Daniel Menard
I'm looking for the same check the Player collisions, enemies vs
friendlies. thread for more details. I still haven't found a fix to
the prediction issues (if you have any insight, let me know).

On Tue, Aug 12, 2008 at 5:43 AM, Maarten De Meyer [EMAIL PROTECTED] wrote:
 Hi list,

 In my mod by default players collide ( hard ) against eachother. For
 obvious reasons I want to disable this for teammates and rather have a
 soft collision/physics push like in TF2, where you still have the option
 to clip through a teammate if you want to, but you do get a slight physics
 resistance when you do.

 I know this isn't that hard, just wondering if someone had done it before
 and could point me in the right direction for the soft push part, I'm not
 too at home in Source's physics.

 -- Maarten


 ___
 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