-- [ Picked text/plain from multipart/alternative ] Hi I'm trying to get started with third person but the animations are really glitchy - they start to play but its like they are constantly resetting so the model wobels a heck of a lot. I found a wavelength post about it (with a couple of suggestions) but still can't get around it. Setting cl_pred_optimize to 1 instead of 2 stops this without totally disabling preditction, but after looking at the places where cl_pred_optimize is used i'm more than a little bit lost as to what specifically is causing it.
This is the Wavelength post that seems similar to what I describe, but cannot confirm it is the same problem: http://forums.thewavelength.net/index.php?showtopic=11505&st=0 The only bit of code that seems to depend on cl_pred_optimize > 2 is listed below. CPrediction::ComputeFirstCommandToExecute <snip> // Otherwise, there is a second optimization, wherein if we did receive an update, but no // values differed (or were outside their epsilon) and the server actually acknowledged running // one or more commands, then we can revert the entity to the predicted state from last frame, // shift the # of commands worth of intermediate state off of front the intermediate state array, and // only predict the usercmd from the latest render frame. if ( cl_pred_optimize.GetInt() >= 2 && !m_bPreviousAckHadErrors && m_nCommandsPredicted > 0 && m_nServerCommandsAcknowledged > 0 && m_nServerCommandsAcknowledged <= m_nCommandsPredicted ) { // Copy all of the previously predicted data back into entity so we can skip repredicting it // This is the final slot that we previously predicted RestoreEntityToPredictedFrame( m_nCommandsPredicted - 1 ); // Shift intermediate state blocks down by # of commands ack'd ShiftIntermediateDataForward( m_nServerCommandsAcknowledged, m_nCommandsPredicted ); // Only predict new commands (note, this should be the same number that we could compute // above based on outgoing_command - incoming_acknowledged - 1 skipahead = ( m_nCommandsPredicted - m_nServerCommandsAcknowledged ); So at a Hl2 'noob' guessing I would say... For some reason my animation is getting reset because the prediction code doesn't think that any of the values are sufficiently different? Although when the code takes the other path (cl_pred_optimize=1) the animation plays smoothly. Please help John -- _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders