RE: [hlcoders] Ragdolls and Constraints

2005-05-26 Thread Jay Stelly
My best guess from looking at the code is that
m_ArmRagdoll->VPhysicsGetObject() is not returning a pointer to the
correct piece of that ragdoll.  You can use VPhysicsGetObjectList() to
get all of the arm's pieces and then pick the one with the correct index
by asking each object GetGameIndex().

UpdateRagdollTransform() is for animating the relative transform between
the two objects attached by the ragdoll constraint.  It doesn't sound
like what you are looking for.

The other thing that looks suspect is the RopeHookAttach code.  Are you
sure that the RopeHook model attachment is attached to the same bone as
the physics you intend to constrain?  Pass it through the arm ragdoll
object's LocalToWorld() and draw a debug overlay cross/box there.  Is it
where you expect?

Jay


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Greg "Monder" Chadwick
> Sent: Thursday, May 26, 2005 6:38 AM
> To: hlcoders@list.valvesoftware.com
> Subject: [hlcoders] Ragdolls and Constraints
>
> I'm currently writing code for a trebuchet, the arm of which
> is a ragdoll and it's sling is a prop_physics entity.  The
> sling needs to be attached to the arm via ropes.  Creating
> the actual rope is easy enough but I'm having trouble with
> setting up length constraints between the sling and the arm.
> It appears that when the arm swings round (it's attached via
> a hinge constraint to g_PhysWorldObject) the attachment point
> of the length constraint doesn't move with it and I'm not
> entirely sure why.  I guess it could be something to do with
> the arm being a ragdoll and taking a look at the
> IPhysicsConstraint interface definition I see there's a
> UpdateRagdollTransform function.  However I'm not entirely
> sure what you need to pass for the two matricies.  This is
> the code that I'm using to setup the constraints:
>
> m_Sling->GetAttachmentLocal("Rope1", Rope1SlingAttach, none);
> m_Sling->GetAttachmentLocal("Rope2", Rope2SlingAttach, none);
> m_ArmRagdoll->GetAttachmentLocal("RopeHook", RopeHookAttach, none);
>
> Rope1ConstraintParams.Defaults( );
> Rope1ConstraintParams.objectPosition[0] = RopeHookAttach;
> Rope1ConstraintParams.objectPosition[1] = Rope1SlingAttach;
> Rope1ConstraintParams.totalLength =   TrebRopeLength.GetFloat( );
> Rope1ConstraintParams.minLength = 0.0f;
>
> Rope2ConstraintParams.Defaults( );
> Rope2ConstraintParams.objectPosition[0] = RopeHookAttach;
> Rope2ConstraintParams.objectPosition[1] = Rope2SlingAttach;
> Rope2ConstraintParams.totalLength =   TrebRopeLength.GetFloat( );
> Rope2ConstraintParams.minLength = 0.0f;
>
> Assert(m_Sling->VPhysicsGetObject( ));
> Assert(m_ArmRagdoll->VPhysicsGetObject( ));
>
> m_Rope1Constraint =
> physenv->CreateLengthConstraint(m_ArmRagdoll->VPhysicsGetObject( ),
> m_Sling->VPhysicsGetObject( ), m_ConstraintGroup,
> Rope1ConstraintParams); m_Rope2Constraint =
> physenv->CreateLengthConstraint(m_ArmRagdoll->VPhysicsGetObject( ),
> m_Sling->VPhysicsGetObject( ), m_ConstraintGroup,
> Rope2ConstraintParams);
>
> So does anyone know how I can get the length constraint
> attachment on the arm (i.e. objectPosition[0]) to follow the
> arm as it rotates?
>
>
> ___
> 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] Server query

2005-05-26 Thread Alfred Reynolds
Enabling old queries doesn't remove A2S queries (it just lets them
respond without a valid challenge/secret).

- Alfred

Original Message
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of McCormack,
Chris Sent: Thursday, May 26, 2005 1:46 AM To:
hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Server query

> There is a flag to enable old style queries on each server (the style
> which you are not sending).
> I have no idea (Alfred will of course), but if this old style is
> enabled it might disable A2S queries. That would explain why some are
> responding(A2S query enabled) and some are not (old style queries).
>
> I may be wide of the mark and it may be a coding issue :P
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of badger
> Sent: 25 May 2005 06:02
> To: hlcoders@list.valvesoftware.com
> Subject: Re: [hlcoders] Server query
>
>
> Some servers are responding on the S2A_INFO packets and some are not
> - querying both with exactly the same program.
>
> What else could be the problem ?
>
>
> ___
> To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
>
>

*
> This e-mail and its attachments are confidential and are intended for
> the above named recipient only. If this has come to you in error,
> please notify the sender immediately and delete this e-mail from your
> system. You must take no action based on this, nor must you copy or
> disclose it or any part of its contents to any person or
> organisation. Statements and opinions contained in this email may not
> necessarily represent those of Littlewoods Group Limited or its
> subsidiaries. Please note that e-mail communications may be
> monitored. The Registered Office of Littlewoods Group Limited and its
> subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered
> number of Littlewoods Group Limited is 5059352.
>

*
>
>
>
>
> This message has been scanned for viruses by BlackSpider MailControl
> - www.blackspider.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



Re: [hlcoders] Player specific flags

2005-05-26 Thread Andrew (British_Bomber)
So you could have up to 32 flags total?  I was affraid to touch those
incase it was vital to only have 10, thanks for answering my unasked
question :D

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



[hlcoders] Ragdolls and Constraints

2005-05-26 Thread Greg \"Monder\" Chadwick
I'm currently writing code for a trebuchet, the arm of which is a
ragdoll and it's sling is a prop_physics entity.  The sling needs to be
attached to the arm via ropes.  Creating the actual rope is easy enough
but I'm having trouble with setting up length constraints between the
sling and the arm.  It appears that when the arm swings round (it's
attached via a hinge constraint to g_PhysWorldObject) the attachment
point of the length constraint doesn't move with it and I'm not entirely
sure why.  I guess it could be something to do with the arm being a
ragdoll and taking a look at the IPhysicsConstraint interface definition
I see there's a UpdateRagdollTransform function.  However I'm not
entirely sure what you need to pass for the two matricies.  This is the
code that I'm using to setup the constraints:

m_Sling->GetAttachmentLocal("Rope1", Rope1SlingAttach, none);
m_Sling->GetAttachmentLocal("Rope2", Rope2SlingAttach, none);
m_ArmRagdoll->GetAttachmentLocal("RopeHook", RopeHookAttach, none);

Rope1ConstraintParams.Defaults( );
Rope1ConstraintParams.objectPosition[0] = RopeHookAttach;
Rope1ConstraintParams.objectPosition[1] = Rope1SlingAttach;
Rope1ConstraintParams.totalLength = TrebRopeLength.GetFloat( );
Rope1ConstraintParams.minLength = 0.0f;

Rope2ConstraintParams.Defaults( );
Rope2ConstraintParams.objectPosition[0] = RopeHookAttach;
Rope2ConstraintParams.objectPosition[1] = Rope2SlingAttach;
Rope2ConstraintParams.totalLength = TrebRopeLength.GetFloat( );
Rope2ConstraintParams.minLength = 0.0f;

Assert(m_Sling->VPhysicsGetObject( ));
Assert(m_ArmRagdoll->VPhysicsGetObject( ));

m_Rope1Constraint =
physenv->CreateLengthConstraint(m_ArmRagdoll->VPhysicsGetObject( ),
m_Sling->VPhysicsGetObject( ), m_ConstraintGroup,
Rope1ConstraintParams);
m_Rope2Constraint =
physenv->CreateLengthConstraint(m_ArmRagdoll->VPhysicsGetObject( ),
m_Sling->VPhysicsGetObject( ), m_ConstraintGroup,
Rope2ConstraintParams);

So does anyone know how I can get the length constraint attachment on
the arm (i.e. objectPosition[0]) to follow the arm as it rotates?


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



Re: [hlcoders] SZ_GetSpace error - HL1

2005-05-26 Thread Jeff Fearn
On 5/25/05, Jeffrey botman Broome <[EMAIL PROTECTED]> wrote:
> Jeff Fearn wrote:
> > On 5/23/05, Deadman Standing <[EMAIL PROTECTED]> wrote:
> >
> >>Adding -zone 8192 to the command line can sometimes help this. From looking
> >>at the Quake code it appears the SZ_GetSpace error occurs when the engine
> >>overruns static buffers used to build network messages. Too many or poorly
> >>written plugins can aggravate the situation.
> >
> >
> > I'll try that.
> >
> > What exactly makes a plugin badly written? I have a bot plugin based
> > on HPB bot that might be at fault, but no idea what to target to fix
> > it.
>
> The HPB bot can generate the SZ_GetSpace crash when displaying lots of
> waypoints (if you are editing waypoints on the client).  The waypoint
> display method sends a reliable network message for each waypoint line
> drawn.  If enough of these reliable messages are sent in too short a
> time period, the buffer overflows.
>
> One of the Counter-Strike bot authors (I don't remember which one)
> changed this to use an un-reliable message for displaying these lines
> which helps prevent the overflow.  In the worst case, sometimes a
> waypoint line wouldn't get drawn and then would appear the next time it
> was updated.
>
> The SZ_GetSpace crashing problem also occurred if some plugin attempts
> to send a network message to a fake client (bot).  The HPB bot code
> tries to prevent this, but there can still be cases of other pluggins
> running (if you are using metamod, which it sounds like you are not)
> that send a network message to "all players" that could cause this problem.

I'm still getting this on occasions with -zone 8192 set :(

I am using metamod from http://metamod-p.sourceforge.net and the HPB
version modified to work with that, as I plan on using the bot with a
couple of mods.

I don't have any other metamod plugins installed, not even adminmod.

It seems to crash when a human player joins or leaves the server, and
then only on rare occasions.

I'm pretty certain it has nothing to do with the waypoints as I have
not been setting them up when it has crashed. It has mostly been
during stress test of the server with 14+ bots and a couple of humans.

OT: My server is a little laggy with 30 bots and me, but it's hell
funny on small maps ;)

Jeff

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



RE: [hlcoders] Server query

2005-05-26 Thread McCormack, Chris
There is a flag to enable old style queries on each server (the style which you 
are not sending).
I have no idea (Alfred will of course), but if this old style is enabled it 
might disable A2S
queries. That would explain why some are responding(A2S query enabled) and some 
are not (old style queries).

I may be wide of the mark and it may be a coding issue :P

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of badger
Sent: 25 May 2005 06:02
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Server query


Some servers are responding on the S2A_INFO packets and some are not -
querying both with exactly the same program.

What else could be the problem ?


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



*
This e-mail and its attachments are confidential and are intended for the above 
named recipient only. If this has come to you in error, please notify the 
sender immediately and delete this e-mail from your system. You must take no 
action based on this, nor must you copy or disclose it or any part of its 
contents to any person or organisation. Statements and opinions contained in 
this email may not necessarily represent those of Littlewoods Group Limited or 
its subsidiaries. Please note that e-mail communications may be monitored. The 
Registered Office of Littlewoods Group Limited and its subsidiaries is 100 Old 
Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Group Limited 
is 5059352.
*




This message has been scanned for viruses by BlackSpider MailControl - 
www.blackspider.com

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



Re: [hlcoders] Player specific flags

2005-05-26 Thread r00t 3:16

There is a 32 bit limit though. So going beyond (1<<31)
I didn't think that would work?

r00t 3:16
CQC Gaming
www.cqc-gaming.com
- Original Message -
From: "Stephen Micheals" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, May 26, 2005 1:30 AM
Subject: Re: [hlcoders] Player specific flags



yes set
#define PLAYER_FLAG_BITS 10
and add FL_PRONE where you want then increment ALL the flags under
that one so if you placed it before FL_WATERJUMP you would change it
to
#define   FL_WATERJUMP (1<<3)
and increment each flag under it by one from FL_ONTRAIN all the way to
FL_UNBLOCKABLE_BY_PLAYER.

On 5/25/05, r00t 3:16 <[EMAIL PROTECTED]> wrote:

oops, no he didn't replace it did not see it below the FL_PRONE..
So I guess just moving
#define PLAYER_FLAG_BITS 9
to
#define PLAYER_FLAG_BITS 10


___
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