[hlcoders] RE: Blood not spawning for attacker?
Hey, Well thank you Chris Janes for the fix, which I applied to the default bullet code in FireBullets on around line 158 of sdk_player_shared, and which fixed the blood problem. Here's the fixed code (all we did was move out the CTakeDamage initialise and calculations and the DispatchTraceAttack out of the #ifdef... //Imperio59: Fix for blood not being correctly predicted... CTakeDamageInfo info( pevAttacker, pevAttacker, fCurrentDamage, iDamageType ); #ifdef GAME_DLL ClearMultiDamage(); #endif CalculateBulletDamageForce( info, iBulletType, vecDir, tr.endpos ); tr.m_pEnt-DispatchTraceAttack( info, vecDir, tr ); #ifdef GAME_DLL TraceAttackToTriggers( info, tr.startpos, tr.endpos, vecDir ); ApplyMultiDamage(); #endif I'm gonna add this to the wiki list. Enjoy! ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] RE: Blood not spawning for attacker?
On Tuesday 27 June 2006 10:55 am, Imperio59 wrote: Hey, Well thank you Chris Janes for the fix, which I applied to the default bullet code in FireBullets on around line 158 of sdk_player_shared, and which fixed the blood problem. Here's the fixed code (all we did was move out the CTakeDamage initialise and calculations and the DispatchTraceAttack out of the #ifdef... I'm not so hot on that solution. As I understand it, for a normal bullet weapon, there are two parts to the impact effect: 1. Sparks/flecks/impact decal 2. Blood Only (1) should be predicted, because it doesn't require any server verification. Since these are minor effects (not gameplay-affecting), it's all right for the client to simulate them. Blood, however, is another matter. Blood spray is a visual confirmation to the player that he has indeed hit the target; and _this_ is not something you can afford to mispredict. Thus, the server should take care of telling the client to spawn the blood sprite. Now, as for your weapon, you'll need to do some thinking on this matter. For your particular mod, is the blood splatter gameplay-affecting or not? It makes sense for you that sparks should be predicted, but I'm not sure that blood should be the same way. Even if you do decide to predict blood, I would advise against changing it in sdk_player_shared, as this would affect _all_ weapons across your mod, even more conventional ones for which the player might expect conventional response. So, basically, your beef is with the prediction system, not sdk_player_shared. Watch out for hasty fixes :-P -John Sheu ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] RE: Blood not spawning for attacker?
I'm submitting this in a separate e-mail, since I'm not sure that it's completely in line with the subject of the thread, but I do think that it might have some useful points in common. So, with regards to my question of a while ago that went conveniently unaswered: What kind of timebase is the client rendering on? Does it try to be exactly synchronized with the server, regardless of latency, or does it just monotonically increase its current time as it receives packets? What I'm doing is creating a tempent with a fixed velocity. Every client frame, it simulates itself forward along that velocity. Now, if I just create it as usual, by the time the creation command gets to the client, the tempent will already be somewhere behind where it should be (if the client renders ahead). So, is the client ahead? If I need to pre-simulate the tempent forward, how far forward should I simulate it? I've been thinking about this as a way of reducing that blood-splatter-emerges-from-somewhere-behind-the-player effect that you see with hitscan weapons. -John Sheu ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Jerky Movement when player is on moving lift/elevator.
This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hello, There is apparently a bug with the SDK, that when you are on say, a lift or an elevator, your movement becomes jerky when the lift is in motion. At first I thought it was a problem with some custom movement code, so I got the base SDK and tried the same map with a lift. But no dice, same weird jerky movement issue. So, I fired up HL2DM, same map with a lift, smooth as a babies bottom, I then got the base HL2DM code, tried it, same jerky movement, and then CS:S, same jerky movement. So it appears that valve has applied some fixes to the HL2DM code, which I have missed out on. Does anyone know how to fix this jerky movement? Thanks. - voogru. -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Jerky Movement when player is on moving lift/elevator.
No, but i would give up my first born for it. Seriously, i've been trying to fix this for a while now, very frustrating On 6/28/06, Spencer 'voogru' MacDonald [EMAIL PROTECTED] wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hello, There is apparently a bug with the SDK, that when you are on say, a lift or an elevator, your movement becomes jerky when the lift is in motion. At first I thought it was a problem with some custom movement code, so I got the base SDK and tried the same map with a lift. But no dice, same weird jerky movement issue. So, I fired up HL2DM, same map with a lift, smooth as a babies bottom, I then got the base HL2DM code, tried it, same jerky movement, and then CS:S, same jerky movement. So it appears that valve has applied some fixes to the HL2DM code, which I have missed out on. Does anyone know how to fix this jerky movement? Thanks. - voogru. -- ___ 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] Jerky Movement when player is on moving lift/elevator.
I'm not sure if it's the issue or not, but I remember a bug like this in episode 1. If it's the same issue, then setting smoothstairs to zero will fix it (but cause other problems). If that's the case then you need to add some logic to disable stair smoothing when the player is on an elevator. Here's the code from ep1 baseplayer_shared.cpp: static ConVar smoothstairs( smoothstairs, 1, FCVAR_REPLICATED, Smooth player eye z coordinate when traversing stairs. ); //-- --- // Handle view smoothing when going up or down stairs //-- --- void CBasePlayer::SmoothViewOnStairs( Vector eyeOrigin ) { CBaseEntity *pGroundEntity = GetGroundEntity(); float flCurrentPlayerZ = GetLocalOrigin().z; float flCurrentPlayerViewOffsetZ = GetViewOffset().z; // Smooth out stair step ups // NOTE: Don't want to do this when the ground entity is moving the player if ( ( pGroundEntity != NULL pGroundEntity-GetMoveType() == MOVETYPE_NONE ) ( flCurrentPlayerZ != m_flOldPlayerZ ) smoothstairs.GetBool() m_flOldPlayerViewOffsetZ == flCurrentPlayerViewOffsetZ ) { int dir = ( flCurrentPlayerZ m_flOldPlayerZ ) ? 1 : -1; float steptime = gpGlobals-frametime; if (steptime 0) { steptime = 0; } m_flOldPlayerZ += steptime * 150 * dir; const float stepSize = 18.0f; if ( dir 0 ) { if (m_flOldPlayerZ flCurrentPlayerZ) { m_flOldPlayerZ = flCurrentPlayerZ; } if (flCurrentPlayerZ - m_flOldPlayerZ stepSize) { m_flOldPlayerZ = flCurrentPlayerZ - stepSize; } } else { if (m_flOldPlayerZ flCurrentPlayerZ) { m_flOldPlayerZ = flCurrentPlayerZ; } if (flCurrentPlayerZ - m_flOldPlayerZ -stepSize) { m_flOldPlayerZ = flCurrentPlayerZ + stepSize; } } eyeOrigin[2] += m_flOldPlayerZ - flCurrentPlayerZ; } else { m_flOldPlayerZ = flCurrentPlayerZ; m_flOldPlayerViewOffsetZ = flCurrentPlayerViewOffsetZ; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Teddy Sent: Tuesday, June 27, 2006 6:11 PM To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Jerky Movement when player is on moving lift/elevator. No, but i would give up my first born for it. Seriously, i've been trying to fix this for a while now, very frustrating On 6/28/06, Spencer 'voogru' MacDonald [EMAIL PROTECTED] wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hello, There is apparently a bug with the SDK, that when you are on say, a lift or an elevator, your movement becomes jerky when the lift is in motion. At first I thought it was a problem with some custom movement code, so I got the base SDK and tried the same map with a lift. But no dice, same weird jerky movement issue. So, I fired up HL2DM, same map with a lift, smooth as a babies bottom, I then got the base HL2DM code, tried it, same jerky movement, and then CS:S, same jerky movement. So it appears that valve has applied some fixes to the HL2DM code, which I have missed out on. Does anyone know how to fix this jerky movement? Thanks. - voogru. -- ___ 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] RE: Blood not spawning for attacker?
-- [ Picked text/plain from multipart/alternative ] With lag compensation, predicting blood spawning shouldn't really be an issue (unless cl_predict is 0 [which it shouldn't be]). -- ts2do -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] Jerky Movement when player is on moving lift/elevator.
That only masks the problem apparently. In hl2dm, it's smooth regardless of the smoothstairs setting. -Original Message- From: Jay Stelly [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 9:30 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Jerky Movement when player is on moving lift/elevator. I'm not sure if it's the issue or not, but I remember a bug like this in episode 1. If it's the same issue, then setting smoothstairs to zero will fix it (but cause other problems). If that's the case then you need to add some logic to disable stair smoothing when the player is on an elevator. Here's the code from ep1 baseplayer_shared.cpp: static ConVar smoothstairs( smoothstairs, 1, FCVAR_REPLICATED, Smooth player eye z coordinate when traversing stairs. ); //-- --- // Handle view smoothing when going up or down stairs //-- --- void CBasePlayer::SmoothViewOnStairs( Vector eyeOrigin ) { CBaseEntity *pGroundEntity = GetGroundEntity(); float flCurrentPlayerZ = GetLocalOrigin().z; float flCurrentPlayerViewOffsetZ = GetViewOffset().z; // Smooth out stair step ups // NOTE: Don't want to do this when the ground entity is moving the player if ( ( pGroundEntity != NULL pGroundEntity-GetMoveType() == MOVETYPE_NONE ) ( flCurrentPlayerZ != m_flOldPlayerZ ) smoothstairs.GetBool() m_flOldPlayerViewOffsetZ == flCurrentPlayerViewOffsetZ ) { int dir = ( flCurrentPlayerZ m_flOldPlayerZ ) ? 1 : -1; float steptime = gpGlobals-frametime; if (steptime 0) { steptime = 0; } m_flOldPlayerZ += steptime * 150 * dir; const float stepSize = 18.0f; if ( dir 0 ) { if (m_flOldPlayerZ flCurrentPlayerZ) { m_flOldPlayerZ = flCurrentPlayerZ; } if (flCurrentPlayerZ - m_flOldPlayerZ stepSize) { m_flOldPlayerZ = flCurrentPlayerZ - stepSize; } } else { if (m_flOldPlayerZ flCurrentPlayerZ) { m_flOldPlayerZ = flCurrentPlayerZ; } if (flCurrentPlayerZ - m_flOldPlayerZ -stepSize) { m_flOldPlayerZ = flCurrentPlayerZ + stepSize; } } eyeOrigin[2] += m_flOldPlayerZ - flCurrentPlayerZ; } else { m_flOldPlayerZ = flCurrentPlayerZ; m_flOldPlayerViewOffsetZ = flCurrentPlayerViewOffsetZ; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Teddy Sent: Tuesday, June 27, 2006 6:11 PM To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Jerky Movement when player is on moving lift/elevator. No, but i would give up my first born for it. Seriously, i've been trying to fix this for a while now, very frustrating On 6/28/06, Spencer 'voogru' MacDonald [EMAIL PROTECTED] wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hello, There is apparently a bug with the SDK, that when you are on say, a lift or an elevator, your movement becomes jerky when the lift is in motion. At first I thought it was a problem with some custom movement code, so I got the base SDK and tried the same map with a lift. But no dice, same weird jerky movement issue. So, I fired up HL2DM, same map with a lift, smooth as a babies bottom, I then got the base HL2DM code, tried it, same jerky movement, and then CS:S, same jerky movement. So it appears that valve has applied some fixes to the HL2DM code, which I have missed out on. Does anyone know how to fix this jerky movement? Thanks. - voogru. -- ___ 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
RE: [hlcoders] Jerky Movement when player is on moving lift/elevator.
When you say, In hl2dm, it's smooth regardless of the smoothstairs setting. It sounds like you misunderstand what I'm trying to say. HL2DM is running the code from episode 1 that I pasted below. smoothstairs is already disabled when you're on an elevator in HL2DM - so testing HL2DM isn't going to prove whether this change is the fix or not - you have to test a mod based on the current SDK code release. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Spencer 'voogru' MacDonald Sent: Tuesday, June 27, 2006 7:07 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Jerky Movement when player is on moving lift/elevator. That only masks the problem apparently. In hl2dm, it's smooth regardless of the smoothstairs setting. -Original Message- From: Jay Stelly [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 9:30 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Jerky Movement when player is on moving lift/elevator. I'm not sure if it's the issue or not, but I remember a bug like this in episode 1. If it's the same issue, then setting smoothstairs to zero will fix it (but cause other problems). If that's the case then you need to add some logic to disable stair smoothing when the player is on an elevator. Here's the code from ep1 baseplayer_shared.cpp: static ConVar smoothstairs( smoothstairs, 1, FCVAR_REPLICATED, Smooth player eye z coordinate when traversing stairs. ); // -- --- // Handle view smoothing when going up or down stairs // -- --- void CBasePlayer::SmoothViewOnStairs( Vector eyeOrigin ) { CBaseEntity *pGroundEntity = GetGroundEntity(); float flCurrentPlayerZ = GetLocalOrigin().z; float flCurrentPlayerViewOffsetZ = GetViewOffset().z; // Smooth out stair step ups // NOTE: Don't want to do this when the ground entity is moving the player if ( ( pGroundEntity != NULL pGroundEntity-GetMoveType() == MOVETYPE_NONE ) ( flCurrentPlayerZ != m_flOldPlayerZ ) smoothstairs.GetBool() m_flOldPlayerViewOffsetZ == flCurrentPlayerViewOffsetZ ) { int dir = ( flCurrentPlayerZ m_flOldPlayerZ ) ? 1 : -1; float steptime = gpGlobals-frametime; if (steptime 0) { steptime = 0; } m_flOldPlayerZ += steptime * 150 * dir; const float stepSize = 18.0f; if ( dir 0 ) { if (m_flOldPlayerZ flCurrentPlayerZ) { m_flOldPlayerZ = flCurrentPlayerZ; } if (flCurrentPlayerZ - m_flOldPlayerZ stepSize) { m_flOldPlayerZ = flCurrentPlayerZ - stepSize; } } else { if (m_flOldPlayerZ flCurrentPlayerZ) { m_flOldPlayerZ = flCurrentPlayerZ; } if (flCurrentPlayerZ - m_flOldPlayerZ -stepSize) { m_flOldPlayerZ = flCurrentPlayerZ + stepSize; } } eyeOrigin[2] += m_flOldPlayerZ - flCurrentPlayerZ; } else { m_flOldPlayerZ = flCurrentPlayerZ; m_flOldPlayerViewOffsetZ = flCurrentPlayerViewOffsetZ; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Teddy Sent: Tuesday, June 27, 2006 6:11 PM To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Jerky Movement when player is on moving lift/elevator. No, but i would give up my first born for it. Seriously, i've been trying to fix this for a while now, very frustrating On 6/28/06, Spencer 'voogru' MacDonald [EMAIL PROTECTED] wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hello, There is apparently a bug with the SDK, that when you are on say, a lift or an elevator, your movement becomes jerky when the lift is in motion. At first I thought it was a problem with some custom movement code, so I got the base SDK and tried the same map with a lift. But no dice, same weird jerky movement issue. So, I fired up HL2DM, same map with a lift, smooth as a babies bottom, I then got the base HL2DM code, tried it, same jerky movement, and then CS:S, same jerky movement. So it appears that valve has applied some fixes to the HL2DM code, which I have missed out on. Does anyone know how to
RE: [hlcoders] Jerky Movement when player is on moving lift/elevator.
Thank you very much Jay for the fix! I have been side steping the use of elevators in my levels, becuase of this issue Now i got a reason to compile a fresh DLL for my play mod (not nightfall). Adam --- Jay Stelly [EMAIL PROTECTED] wrote: When you say, In hl2dm, it's smooth regardless of the smoothstairs setting. It sounds like you misunderstand what I'm trying to say. HL2DM is running the code from episode 1 that I pasted below. smoothstairs is already disabled when you're on an elevator in HL2DM - so testing HL2DM isn't going to prove whether this change is the fix or not - you have to test a mod based on the current SDK code release. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Spencer 'voogru' MacDonald Sent: Tuesday, June 27, 2006 7:07 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Jerky Movement when player is on moving lift/elevator. That only masks the problem apparently. In hl2dm, it's smooth regardless of the smoothstairs setting. -Original Message- From: Jay Stelly [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 9:30 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Jerky Movement when player is on moving lift/elevator. I'm not sure if it's the issue or not, but I remember a bug like this in episode 1. If it's the same issue, then setting smoothstairs to zero will fix it (but cause other problems). If that's the case then you need to add some logic to disable stair smoothing when the player is on an elevator. Here's the code from ep1 baseplayer_shared.cpp: static ConVar smoothstairs( smoothstairs, 1, FCVAR_REPLICATED, Smooth player eye z coordinate when traversing stairs. ); // -- --- // Handle view smoothing when going up or down stairs // -- --- void CBasePlayer::SmoothViewOnStairs( Vector eyeOrigin ) { CBaseEntity *pGroundEntity = GetGroundEntity(); float flCurrentPlayerZ = GetLocalOrigin().z; float flCurrentPlayerViewOffsetZ = GetViewOffset().z; // Smooth out stair step ups // NOTE: Don't want to do this when the ground entity is moving the player if ( ( pGroundEntity != NULL pGroundEntity-GetMoveType() == MOVETYPE_NONE ) ( flCurrentPlayerZ != m_flOldPlayerZ ) smoothstairs.GetBool() m_flOldPlayerViewOffsetZ == flCurrentPlayerViewOffsetZ ) { int dir = ( flCurrentPlayerZ m_flOldPlayerZ ) ? 1 : -1; float steptime = gpGlobals-frametime; if (steptime 0) { steptime = 0; } m_flOldPlayerZ += steptime * 150 * dir; const float stepSize = 18.0f; if ( dir 0 ) { if (m_flOldPlayerZ flCurrentPlayerZ) { m_flOldPlayerZ = flCurrentPlayerZ; } if (flCurrentPlayerZ - m_flOldPlayerZ stepSize) { m_flOldPlayerZ = flCurrentPlayerZ - stepSize; } } else { if (m_flOldPlayerZ flCurrentPlayerZ) { m_flOldPlayerZ = flCurrentPlayerZ; } if (flCurrentPlayerZ - m_flOldPlayerZ -stepSize) { m_flOldPlayerZ = flCurrentPlayerZ + stepSize; } } eyeOrigin[2] += m_flOldPlayerZ - flCurrentPlayerZ; } else { m_flOldPlayerZ = flCurrentPlayerZ; m_flOldPlayerViewOffsetZ = flCurrentPlayerViewOffsetZ; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Teddy Sent: Tuesday, June 27, 2006 6:11 PM To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Jerky Movement when player is on moving lift/elevator. No, but i would give up my first born for it. Seriously, i've been trying to fix this for a while now, very frustrating On 6/28/06, Spencer 'voogru' MacDonald [EMAIL PROTECTED] wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hello, There is apparently a bug with the SDK, that when you are on say, a lift or an elevator, your movement becomes jerky when the lift is in motion. At first I thought it was a problem with some custom movement code, so I got the base SDK and tried the same map with a lift. But no dice, same weird jerky movement issue.
Re: [hlcoders] Jerky Movement when player is on moving lift/elevator.
I just did a test on an elevator in Dystopia using smoothstairs 0, unfortunately the problem still persists. I noticed when this jerking is taking place there's prediction errors, further investigation shows it's getting a pred error in C_BaseEntity::m_vecNetworkOrigin, so I've been looking through the movement code for answers, to no avail. On 6/28/06, Jay Stelly [EMAIL PROTECTED] wrote: When you say, In hl2dm, it's smooth regardless of the smoothstairs setting. It sounds like you misunderstand what I'm trying to say. HL2DM is running the code from episode 1 that I pasted below. smoothstairs is already disabled when you're on an elevator in HL2DM - so testing HL2DM isn't going to prove whether this change is the fix or not - you have to test a mod based on the current SDK code release. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Spencer 'voogru' MacDonald Sent: Tuesday, June 27, 2006 7:07 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Jerky Movement when player is on moving lift/elevator. That only masks the problem apparently. In hl2dm, it's smooth regardless of the smoothstairs setting. -Original Message- From: Jay Stelly [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 9:30 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Jerky Movement when player is on moving lift/elevator. I'm not sure if it's the issue or not, but I remember a bug like this in episode 1. If it's the same issue, then setting smoothstairs to zero will fix it (but cause other problems). If that's the case then you need to add some logic to disable stair smoothing when the player is on an elevator. Here's the code from ep1 baseplayer_shared.cpp: static ConVar smoothstairs( smoothstairs, 1, FCVAR_REPLICATED, Smooth player eye z coordinate when traversing stairs. ); // -- --- // Handle view smoothing when going up or down stairs // -- --- void CBasePlayer::SmoothViewOnStairs( Vector eyeOrigin ) { CBaseEntity *pGroundEntity = GetGroundEntity(); float flCurrentPlayerZ = GetLocalOrigin().z; float flCurrentPlayerViewOffsetZ = GetViewOffset().z; // Smooth out stair step ups // NOTE: Don't want to do this when the ground entity is moving the player if ( ( pGroundEntity != NULL pGroundEntity-GetMoveType() == MOVETYPE_NONE ) ( flCurrentPlayerZ != m_flOldPlayerZ ) smoothstairs.GetBool() m_flOldPlayerViewOffsetZ == flCurrentPlayerViewOffsetZ ) { int dir = ( flCurrentPlayerZ m_flOldPlayerZ ) ? 1 : -1; float steptime = gpGlobals-frametime; if (steptime 0) { steptime = 0; } m_flOldPlayerZ += steptime * 150 * dir; const float stepSize = 18.0f; if ( dir 0 ) { if (m_flOldPlayerZ flCurrentPlayerZ) { m_flOldPlayerZ = flCurrentPlayerZ; } if (flCurrentPlayerZ - m_flOldPlayerZ stepSize) { m_flOldPlayerZ = flCurrentPlayerZ - stepSize; } } else { if (m_flOldPlayerZ flCurrentPlayerZ) { m_flOldPlayerZ = flCurrentPlayerZ; } if (flCurrentPlayerZ - m_flOldPlayerZ -stepSize) { m_flOldPlayerZ = flCurrentPlayerZ + stepSize; } } eyeOrigin[2] += m_flOldPlayerZ - flCurrentPlayerZ; } else { m_flOldPlayerZ = flCurrentPlayerZ; m_flOldPlayerViewOffsetZ = flCurrentPlayerViewOffsetZ; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Teddy Sent: Tuesday, June 27, 2006 6:11 PM To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Jerky Movement when player is on moving lift/elevator. No, but i would give up my first born for it. Seriously, i've been trying to fix this for a while now, very frustrating On 6/28/06, Spencer 'voogru' MacDonald [EMAIL PROTECTED] wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hello, There is apparently a bug with the SDK, that when you are on say, a lift or an elevator, your movement becomes jerky when the lift is in motion. At first I thought it was a problem with some custom movement code, so I got the base SDK and tried the same map with
[hlcoders] Adding sv_showimpacts to HL2DM mod.
Is there any simple(ish) way to add sv_showimpacts (as found in CS:S) to a third party HL2DM mod or something similar? We're currently trying to debug a lag/prediction problem and having this would be very handy. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] Jerky Movement when player is on moving lift/elevator.
Ah, my mistake. I see what you meant, I put in your code and it seems to solve a majority of the problem. Though, for some reason it still 'feels' different than from HL2DM, the lift in HL2DM is much smoother still. I have applied the fix to the Base SDK code to isolate anything we might have changed with the movement code that could be affecting it. The easiest way for me to describe it, within HL2DM, if you pay close attention to the lift, the lift will not appear to jitter up and down. In the base SDK with the fix, the lift appears to jitters up and down very slightly. Are there any other optimizations/fixes that have been applied? Thanks. - voogru. -Original Message- From: Jay Stelly [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 10:24 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Jerky Movement when player is on moving lift/elevator. When you say, In hl2dm, it's smooth regardless of the smoothstairs setting. It sounds like you misunderstand what I'm trying to say. HL2DM is running the code from episode 1 that I pasted below. smoothstairs is already disabled when you're on an elevator in HL2DM - so testing HL2DM isn't going to prove whether this change is the fix or not - you have to test a mod based on the current SDK code release. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Spencer 'voogru' MacDonald Sent: Tuesday, June 27, 2006 7:07 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Jerky Movement when player is on moving lift/elevator. That only masks the problem apparently. In hl2dm, it's smooth regardless of the smoothstairs setting. -Original Message- From: Jay Stelly [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 9:30 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Jerky Movement when player is on moving lift/elevator. I'm not sure if it's the issue or not, but I remember a bug like this in episode 1. If it's the same issue, then setting smoothstairs to zero will fix it (but cause other problems). If that's the case then you need to add some logic to disable stair smoothing when the player is on an elevator. Here's the code from ep1 baseplayer_shared.cpp: static ConVar smoothstairs( smoothstairs, 1, FCVAR_REPLICATED, Smooth player eye z coordinate when traversing stairs. ); // -- --- // Handle view smoothing when going up or down stairs // -- --- void CBasePlayer::SmoothViewOnStairs( Vector eyeOrigin ) { CBaseEntity *pGroundEntity = GetGroundEntity(); float flCurrentPlayerZ = GetLocalOrigin().z; float flCurrentPlayerViewOffsetZ = GetViewOffset().z; // Smooth out stair step ups // NOTE: Don't want to do this when the ground entity is moving the player if ( ( pGroundEntity != NULL pGroundEntity-GetMoveType() == MOVETYPE_NONE ) ( flCurrentPlayerZ != m_flOldPlayerZ ) smoothstairs.GetBool() m_flOldPlayerViewOffsetZ == flCurrentPlayerViewOffsetZ ) { int dir = ( flCurrentPlayerZ m_flOldPlayerZ ) ? 1 : -1; float steptime = gpGlobals-frametime; if (steptime 0) { steptime = 0; } m_flOldPlayerZ += steptime * 150 * dir; const float stepSize = 18.0f; if ( dir 0 ) { if (m_flOldPlayerZ flCurrentPlayerZ) { m_flOldPlayerZ = flCurrentPlayerZ; } if (flCurrentPlayerZ - m_flOldPlayerZ stepSize) { m_flOldPlayerZ = flCurrentPlayerZ - stepSize; } } else { if (m_flOldPlayerZ flCurrentPlayerZ) { m_flOldPlayerZ = flCurrentPlayerZ; } if (flCurrentPlayerZ - m_flOldPlayerZ -stepSize) { m_flOldPlayerZ = flCurrentPlayerZ + stepSize; } } eyeOrigin[2] += m_flOldPlayerZ - flCurrentPlayerZ; } else { m_flOldPlayerZ = flCurrentPlayerZ; m_flOldPlayerViewOffsetZ = flCurrentPlayerViewOffsetZ; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Teddy Sent: Tuesday, June 27, 2006 6:11 PM To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Jerky Movement when player is on moving lift/elevator. No, but i would give up my first born for it. Seriously, i've been trying to fix this for a
Re: [hlcoders] Jerky Movement when player is on moving lift/elevator.
-- [ Picked text/plain from multipart/alternative ] Well I have a solution to these issues, Valve should release the code updates. Our rotting code becomes more unstable each engine update it seems. On 6/27/06, Spencer 'voogru' MacDonald [EMAIL PROTECTED] wrote: Ah, my mistake. I see what you meant, I put in your code and it seems to solve a majority of the problem. Though, for some reason it still 'feels' different than from HL2DM, the lift in HL2DM is much smoother still. I have applied the fix to the Base SDK code to isolate anything we might have changed with the movement code that could be affecting it. The easiest way for me to describe it, within HL2DM, if you pay close attention to the lift, the lift will not appear to jitter up and down. In the base SDK with the fix, the lift appears to jitters up and down very slightly. Are there any other optimizations/fixes that have been applied? Thanks. - voogru. -Original Message- From: Jay Stelly [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 10:24 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Jerky Movement when player is on moving lift/elevator. When you say, In hl2dm, it's smooth regardless of the smoothstairs setting. It sounds like you misunderstand what I'm trying to say. HL2DM is running the code from episode 1 that I pasted below. smoothstairs is already disabled when you're on an elevator in HL2DM - so testing HL2DM isn't going to prove whether this change is the fix or not - you have to test a mod based on the current SDK code release. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Spencer 'voogru' MacDonald Sent: Tuesday, June 27, 2006 7:07 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Jerky Movement when player is on moving lift/elevator. That only masks the problem apparently. In hl2dm, it's smooth regardless of the smoothstairs setting. -Original Message- From: Jay Stelly [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 9:30 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Jerky Movement when player is on moving lift/elevator. I'm not sure if it's the issue or not, but I remember a bug like this in episode 1. If it's the same issue, then setting smoothstairs to zero will fix it (but cause other problems). If that's the case then you need to add some logic to disable stair smoothing when the player is on an elevator. Here's the code from ep1 baseplayer_shared.cpp: static ConVar smoothstairs( smoothstairs, 1, FCVAR_REPLICATED, Smooth player eye z coordinate when traversing stairs. ); // -- --- // Handle view smoothing when going up or down stairs // -- --- void CBasePlayer::SmoothViewOnStairs( Vector eyeOrigin ) { CBaseEntity *pGroundEntity = GetGroundEntity(); float flCurrentPlayerZ = GetLocalOrigin().z; float flCurrentPlayerViewOffsetZ = GetViewOffset().z; // Smooth out stair step ups // NOTE: Don't want to do this when the ground entity is moving the player if ( ( pGroundEntity != NULL pGroundEntity-GetMoveType() == MOVETYPE_NONE ) ( flCurrentPlayerZ != m_flOldPlayerZ ) smoothstairs.GetBool() m_flOldPlayerViewOffsetZ == flCurrentPlayerViewOffsetZ ) { int dir = ( flCurrentPlayerZ m_flOldPlayerZ ) ? 1 : -1; float steptime = gpGlobals-frametime; if (steptime 0) { steptime = 0; } m_flOldPlayerZ += steptime * 150 * dir; const float stepSize = 18.0f; if ( dir 0 ) { if (m_flOldPlayerZ flCurrentPlayerZ) { m_flOldPlayerZ = flCurrentPlayerZ; } if (flCurrentPlayerZ - m_flOldPlayerZ stepSize) { m_flOldPlayerZ = flCurrentPlayerZ - stepSize; } } else { if (m_flOldPlayerZ flCurrentPlayerZ) { m_flOldPlayerZ = flCurrentPlayerZ; } if (flCurrentPlayerZ - m_flOldPlayerZ -stepSize) { m_flOldPlayerZ = flCurrentPlayerZ + stepSize; } } eyeOrigin[2] += m_flOldPlayerZ - flCurrentPlayerZ; } else { m_flOldPlayerZ = flCurrentPlayerZ; m_flOldPlayerViewOffsetZ =