[hlcoders] Respawn Bug fix

2005-04-05 Thread Matt Boone

I've seen this particular bug in a few mods now, thought I would send
out a snippet for you guys until it can be sent out in the next SDK
update.

The problem shows up as players not respawning properly, seeming to fail
the teleport call. What's actually happening is the lag compensation
manager is teleporting them to their previous location for a lag
compensation check, then failing to restore them. If you think you have
this problem in your mod, give this change a try.

dlls\Player_lagcompensation.cpp
~ line 351

Change the while loop to look like this:

// store our previous origin - to start with it is our current
location
Vector prevOrg = pPlayer-GetLocalOrigin();

// Walk context looking for any invalidating event
while( track-IsValidIndex(curr) )
{
// remember last record
prevRecord = record;

// get next record
record = track-Element( curr );

if ( !(record-m_fFlags  LC_ALIVE) )
{
// player most be alive, lost track
return;
}

Vector delta = record-m_vecOrigin - prevOrg;
if ( delta.LengthSqr() 
LAG_COMPENSATION_TELEPORTED_DISTANCE_SQR )
{
// lost track, too much difference
return;
}

// did we found a context smaller then target time ?
if ( record-m_flSimulationTime = flTargetTime )
break; // hurra, stop

// store this position for the next time through the
loop
prevOrg = record-m_vecOrigin;

// go one step back
curr = track-Next( curr );
}

This fixes the distance check not being applied to the first stored
position in the lag compensation history.

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



[hlcoders] spectator eye mode problem AddToFullPack (not related)

2005-04-05 Thread Heritage
First question: Everything in EYE mode spectator seems to be working
except the view angle is not updating. I think it just sits at 0,0,0.
But I can see the weapon and weapon animations just fine and the
camera tracks the players movement too. I believe the view angle along
with the other eye mode stuff is dealt with client side because the
client already receives those numbers (view angle, origin etc..) for
all players within sight. I just don't know where this is dealt with
in the hl2 sdk. I checked out hltvcamera.cpp but that doest seem to be
it. Does any know where the client side spectator stuff is dealt with
or if this is really a client side problem at all? Other than that,
spectator mode seems to be working normal.

Second question, what is the equivalent of AddToFullPack function for
hl2? I have some entities in my mod that can only be seen by members
of a certain team and more importantly not the others.

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



RE: [hlcoders] spectator eye mode problem AddToFullPack (not related)

2005-04-05 Thread Matt Boone
To change visibility of an entity to different players, check out
CBasePlayer::ShouldTransmit

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Heritage
Sent: Tuesday, April 05, 2005 6:36 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] spectator eye mode problem  AddToFullPack (not
related)

First question: Everything in EYE mode spectator seems to be working
except the view angle is not updating. I think it just sits at 0,0,0.
But I can see the weapon and weapon animations just fine and the camera
tracks the players movement too. I believe the view angle along with the
other eye mode stuff is dealt with client side because the client
already receives those numbers (view angle, origin etc..) for all
players within sight. I just don't know where this is dealt with in the
hl2 sdk. I checked out hltvcamera.cpp but that doest seem to be it. Does
any know where the client side spectator stuff is dealt with or if this
is really a client side problem at all? Other than that, spectator mode
seems to be working normal.

Second question, what is the equivalent of AddToFullPack function for
hl2? I have some entities in my mod that can only be seen by members of
a certain team and more importantly not the others.

___
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] spectator eye mode problem AddToFullPack (not related)

2005-04-05 Thread Heritage
Ok thanks Mr. Boone!

I also have been looking into the eye mode stuff
looks like at least one problem is in c_baseplayer.cpp line 1171
eyeAngles = target-EyeAngles();

The call the EyeAngles always returns 0,0,0 because there is no
MoveParent.. whatever that is inside const QAngle
CBasePlayer::EyeAngles( ) in
baseplayer_shared.cpp

CBaseEntity *pMoveParent = const_castCBasePlayer*(this)-GetMoveParent();

is always NULL.  so I'm gonna look into that next.

On Apr 5, 2005 6:42 PM, Matt Boone [EMAIL PROTECTED] wrote:
 To change visibility of an entity to different players, check out
 CBasePlayer::ShouldTransmit

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Heritage
 Sent: Tuesday, April 05, 2005 6:36 PM
 To: hlcoders@list.valvesoftware.com
 Subject: [hlcoders] spectator eye mode problem  AddToFullPack (not
 related)

 First question: Everything in EYE mode spectator seems to be working
 except the view angle is not updating. I think it just sits at 0,0,0.
 But I can see the weapon and weapon animations just fine and the camera
 tracks the players movement too. I believe the view angle along with the
 other eye mode stuff is dealt with client side because the client
 already receives those numbers (view angle, origin etc..) for all
 players within sight. I just don't know where this is dealt with in the
 hl2 sdk. I checked out hltvcamera.cpp but that doest seem to be it. Does
 any know where the client side spectator stuff is dealt with or if this
 is really a client side problem at all? Other than that, spectator mode
 seems to be working normal.

 Second question, what is the equivalent of AddToFullPack function for
 hl2? I have some entities in my mod that can only be seen by members of
 a certain team and more importantly not the others.

 ___
 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



[hlcoders] Third Party Mod crashes while starting a server

2005-04-05 Thread Knifa
Hi all.
With the latest update, my mod (and other mods) crash with a memory
error while trying to start a Server.
Running it through the debugger comes up:
ntdll.dll!77f8d85d()
server.dll!CCollisionProperty::CollisionAABBToWorldAABB(const
Vector  entityMins={...}, const Vector  entityMaxs={...}, Vector *
pWorldMins=0x27dfef28, Vector * pWorldMaxs=0x2743c994)  Line 709 +
0x21C++
ntdll.dll!77f59037()
engine.dll!012736f9()
vphysics.dll!260359cb()
vphysics.dll!2601e285()
vphysics.dll!26035720()
vphysics.dll!2601bca3()
server.dll!CUtlHashCEntityDataInstantiatortouchlink_t::HashEntry::Find(const
CEntityDataInstantiatortouchlink_t::HashEntry  src={...})  Line 328 +
0x11C++
tier0.dll!0089024c()
server.dll!CCollisionEvent::DispatchStartTouch(CBaseEntity *
pEntity0=0x0001, CBaseEntity * pEntity1=0x0020, const Vector 
point={...}, const Vector  normal={...})  Line 1676 + 0x32C++
engine.dll!01154577()
engine.dll!012a237a()
server.dll!CBasePlayer::SetupVisibility(CBaseEntity *
pViewEntity=0x, unsigned char * pvs=0x07ff411c, int
pvssize=8192)  Line 504C++
server.dll!CHL2_Player::SetupVisibility(CBaseEntity *
pViewEntity=0x, unsigned char * pvs=0x07ff411c, int
pvssize=8192)  Line 1427C++
server.dll!CServerGameClients::ClientSetupVisibility(edict_t *
pViewEntity=0x, edict_t * pClient=0x10020024, unsigned char *
pvs=0x07ff411c, int pvssize=1065353216)  Line 1743C++
engine.dll!0127c9bc()
engine.dll!01289df5()
engine.dll!0128749e()
and it looks like it's crashing here (in collisionproperty.cpp on the
server side)
TransformAABB( CollisionToWorldTransform(), entityMins, entityMaxs,
*pWorldMins, *pWorldMaxs );
Other people seem to be getting this problem too.
So uh, Valve, what the hell did you do?
-Knifa
-SourceForts
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


RE: [hlcoders] spectator eye mode problem AddToFullPack (not related)

2005-04-05 Thread Matt Boone
Its ok that the player does not have a move parent. In that case it
should fall back to pl.v_angle, which is most likely not networked for
other clients to your local client. Dod:S and CS:S base player implement
their own overriding EyeAngles function which returns a networked eye
angles, m_angEyeAngles. I believe this is already set up and networked
in c_sdk_player.cpp if you are using the sdk sample app as your base.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Heritage
Sent: Tuesday, April 05, 2005 7:28 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] spectator eye mode problem  AddToFullPack (not
related)

Ok thanks Mr. Boone!

I also have been looking into the eye mode stuff looks like at least one
problem is in c_baseplayer.cpp line 1171 eyeAngles =
target-EyeAngles();

The call the EyeAngles always returns 0,0,0 because there is no
MoveParent.. whatever that is inside const QAngle
CBasePlayer::EyeAngles( ) in baseplayer_shared.cpp

CBaseEntity *pMoveParent =
const_castCBasePlayer*(this)-GetMoveParent();

is always NULL.  so I'm gonna look into that next.

On Apr 5, 2005 6:42 PM, Matt Boone [EMAIL PROTECTED] wrote:
 To change visibility of an entity to different players, check out
 CBasePlayer::ShouldTransmit

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Heritage
 Sent: Tuesday, April 05, 2005 6:36 PM
 To: hlcoders@list.valvesoftware.com
 Subject: [hlcoders] spectator eye mode problem  AddToFullPack (not
 related)

 First question: Everything in EYE mode spectator seems to be working
 except the view angle is not updating. I think it just sits at 0,0,0.
 But I can see the weapon and weapon animations just fine and the
 camera tracks the players movement too. I believe the view angle along

 with the other eye mode stuff is dealt with client side because the
 client already receives those numbers (view angle, origin etc..) for
 all players within sight. I just don't know where this is dealt with
 in the
 hl2 sdk. I checked out hltvcamera.cpp but that doest seem to be it.
 Does any know where the client side spectator stuff is dealt with or
 if this is really a client side problem at all? Other than that,
 spectator mode seems to be working normal.

 Second question, what is the equivalent of AddToFullPack function for
 hl2? I have some entities in my mod that can only be seen by members
 of a certain team and more importantly not the others.

 ___
 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] spectator eye mode problem AddToFullPack (not related)

2005-04-05 Thread Heritage
I am using the multiplayer sdk. It looks like m_angEyeAngles, like
v_angle is also zero

Here was my new code in EyeAngles(

if ( !pMoveParent )
{
#ifdef CLIENT_DLL
C_HL2MP_Player *pPlayer = dynamic_cast C_HL2MP_Player* ( this );
if(pPlayer-IsObserver()) // UNDONE: check for eye mode too
return pPlayer-GetAnimEyeAngles(); // clientside spectating 
players
in eye mode (i.e. target's view angle)
else
return pl.v_angle;  // client side non spectating players
#endif
return  pl.v_angle; // server side only
}

when its the local client, obviously it works just fine.. but when its
the client's target, there are no values for the view angle. I looked
through the pPlayer pointer and saw most of the values were zero, I
did notice one interesting vector that was not zero m_vLookAtTarget,
but it has some very strange values over 360 degrees for some of the
components. I'm not sure what that vector is for or if its even
meaningful. I guess the next approach I need to take is to set up
m_angEyeAngles to be networked properly; however, I looked through he
code at it appears like it should be already networked.


Here is the stock code that was in  c_hl2mp_player.cpp

IMPLEMENT_CLIENTCLASS_DT(C_HL2MP_Player, DT_HL2MP_Player, CHL2MP_Player)
RecvPropFloat( RECVINFO( m_angEyeAngles[0] ) ),
RecvPropFloat( RECVINFO( m_angEyeAngles[1] ) ),


.. further down


IMPLEMENT_SERVERCLASS_ST(CHL2MP_Player, DT_HL2MP_Player)
SendPropAngle( SENDINFO_VECTORELEM(m_angEyeAngles, 0), 11,
SPROP_CHANGES_OFTEN ),
SendPropAngle( SENDINFO_VECTORELEM(m_angEyeAngles, 1), 11,
SPROP_CHANGES_OFTEN ),


seems like its being sent and received, although I will admit I know
very little about this data send table functionality.

 Maybe I'll take a look at c_sdk_player.cpp but I will have to
download another SDK.

Thanks for the help.

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



Re: [hlcoders] Third Party Mod crashes while starting a server

2005-04-05 Thread Heritage
After a steam update, you have to run your mod thu steam at least
once, then you can go back to running it via batch file or debugger in
visual studio for example. For some reaon there are dll errors if you
don't. Just openup steam games menu and double click your game. All
should be well after that.


On Apr 5, 2005 7:27 PM, Knifa [EMAIL PROTECTED] wrote:
 Hi all.

 With the latest update, my mod (and other mods) crash with a memory
 error while trying to start a Server.

 Running it through the debugger comes up:
 ntdll.dll!77f8d85d()
 server.dll!CCollisionProperty::CollisionAABBToWorldAABB(const
 Vector  entityMins={...}, const Vector  entityMaxs={...}, Vector *
 pWorldMins=0x27dfef28, Vector * pWorldMaxs=0x2743c994)  Line 709 +
 0x21C++
 ntdll.dll!77f59037()
 engine.dll!012736f9()
 vphysics.dll!260359cb()
 vphysics.dll!2601e285()
 vphysics.dll!26035720()
 vphysics.dll!2601bca3()

 server.dll!CUtlHashCEntityDataInstantiatortouchlink_t::HashEntry::Find(const
 CEntityDataInstantiatortouchlink_t::HashEntry  src={...})  Line 328 +
 0x11C++
 tier0.dll!0089024c()
 server.dll!CCollisionEvent::DispatchStartTouch(CBaseEntity *
 pEntity0=0x0001, CBaseEntity * pEntity1=0x0020, const Vector 
 point={...}, const Vector  normal={...})  Line 1676 + 0x32C++
 engine.dll!01154577()
 engine.dll!012a237a()
 server.dll!CBasePlayer::SetupVisibility(CBaseEntity *
 pViewEntity=0x, unsigned char * pvs=0x07ff411c, int
 pvssize=8192)  Line 504C++
 server.dll!CHL2_Player::SetupVisibility(CBaseEntity *
 pViewEntity=0x, unsigned char * pvs=0x07ff411c, int
 pvssize=8192)  Line 1427C++
 server.dll!CServerGameClients::ClientSetupVisibility(edict_t *
 pViewEntity=0x, edict_t * pClient=0x10020024, unsigned char *
 pvs=0x07ff411c, int pvssize=1065353216)  Line 1743C++
 engine.dll!0127c9bc()
 engine.dll!01289df5()
 engine.dll!0128749e()

 and it looks like it's crashing here (in collisionproperty.cpp on the
 server side)
 TransformAABB( CollisionToWorldTransform(), entityMins, entityMaxs,
 *pWorldMins, *pWorldMaxs );

 Other people seem to be getting this problem too.

 So uh, Valve, what the hell did you do?

 -Knifa
 -SourceForts

 ___
 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] Respawn Bug fix

2005-04-05 Thread Heritage
Thanks for the heads up.

On Apr 5, 2005 6:30 PM, Matt Boone [EMAIL PROTECTED] wrote:

 I've seen this particular bug in a few mods now, thought I would send
 out a snippet for you guys until it can be sent out in the next SDK
 update.

 The problem shows up as players not respawning properly, seeming to fail
 the teleport call. What's actually happening is the lag compensation
 manager is teleporting them to their previous location for a lag
 compensation check, then failing to restore them. If you think you have
 this problem in your mod, give this change a try.

 dlls\Player_lagcompensation.cpp
 ~ line 351

 Change the while loop to look like this:

// store our previous origin - to start with it is our current
 location
Vector prevOrg = pPlayer-GetLocalOrigin();

// Walk context looking for any invalidating event
while( track-IsValidIndex(curr) )
{
// remember last record
prevRecord = record;

// get next record
record = track-Element( curr );

if ( !(record-m_fFlags  LC_ALIVE) )
{
// player most be alive, lost track
return;
}

Vector delta = record-m_vecOrigin - prevOrg;
if ( delta.LengthSqr() 
 LAG_COMPENSATION_TELEPORTED_DISTANCE_SQR )
{
// lost track, too much difference
return;
}

// did we found a context smaller then target time ?
if ( record-m_flSimulationTime = flTargetTime )
break; // hurra, stop

// store this position for the next time through the
 loop
prevOrg = record-m_vecOrigin;

// go one step back
curr = track-Next( curr );
}

 This fixes the distance check not being applied to the first stored
 position in the lag compensation history.

 ___
 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] Third Party Mod crashes while starting a server

2005-04-05 Thread Knifa
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
I did, when you try to run it, it crashes (there).

I've tried merging that code (only from the files that those crashes are
coming from) but that didn't help.
Can anyone give me a list of changed files since the 28th of Febuary?
(or this update.)

After a steam update, you have to run your mod thu steam at least
once, then you can go back to running it via batch file or debugger in
visual studio for example. For some reaon there are dll errors if you
don't. Just openup steam games menu and double click your game. All
should be well after that.


On Apr 5, 2005 7:27 PM, Knifa [EMAIL PROTECTED] wrote:


Hi all.

With the latest update, my mod (and other mods) crash with a memory
error while trying to start a Server.

Running it through the debugger comes up:
ntdll.dll!77f8d85d()
server.dll!CCollisionProperty::CollisionAABBToWorldAABB(const
Vector  entityMins={...}, const Vector  entityMaxs={...}, Vector *
pWorldMins=0x27dfef28, Vector * pWorldMaxs=0x2743c994)  Line 709 +
0x21C++


   ntdll.dll!77f59037()


engine.dll!012736f9()
vphysics.dll!260359cb()
vphysics.dll!2601e285()
vphysics.dll!26035720()
vphysics.dll!2601bca3()

server.dll!CUtlHashCEntityDataInstantiatortouchlink_t::HashEntry::Find(const
CEntityDataInstantiatortouchlink_t::HashEntry  src={...})  Line 328 +
0x11C++
tier0.dll!0089024c()
server.dll!CCollisionEvent::DispatchStartTouch(CBaseEntity *
pEntity0=0x0001, CBaseEntity * pEntity1=0x0020, const Vector 
point={...}, const Vector  normal={...})  Line 1676 + 0x32C++
engine.dll!01154577()
engine.dll!012a237a()
server.dll!CBasePlayer::SetupVisibility(CBaseEntity *
pViewEntity=0x, unsigned char * pvs=0x07ff411c, int
pvssize=8192)  Line 504C++
server.dll!CHL2_Player::SetupVisibility(CBaseEntity *
pViewEntity=0x, unsigned char * pvs=0x07ff411c, int
pvssize=8192)  Line 1427C++
server.dll!CServerGameClients::ClientSetupVisibility(edict_t *
pViewEntity=0x, edict_t * pClient=0x10020024, unsigned char *
pvs=0x07ff411c, int pvssize=1065353216)  Line 1743C++
engine.dll!0127c9bc()
engine.dll!01289df5()
engine.dll!0128749e()

and it looks like it's crashing here (in collisionproperty.cpp on the
server side)
TransformAABB( CollisionToWorldTransform(), entityMins, entityMaxs,
*pWorldMins, *pWorldMaxs );

Other people seem to be getting this problem too.

So uh, Valve, what the hell did you do?

-Knifa
-SourceForts

___
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



[hlcoders] Server IP and Port ?

2005-04-05 Thread Ratman2000
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Hi,

i need to get the Servers IP and Port with my Plugin but the Server Event 
server_spawn
is called before plugins load i think :(

So gives it another way to get the IP and port the server is running at?

Sorry for my bad english! My main language is German!
--



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