Various bugfixes by Tobias Kuehnhammer (#5270)
- A stupid bug where bots re-trigger jumppads if they fell onto it. - A small "memset" bug concerning player animations. - Reward sounds were never cleared and thus they are played on a map restart. - Safer and more secure handling of disconnected clients and clients with malformed or illegal info strings. - first_gauntlet_hit.wav was not played (ops/ps) bug - capturelimit not hit (from OAX)
This commit is contained in:
parent
1af9c636a5
commit
56f16e10d6
11 changed files with 32 additions and 29 deletions
|
@ -668,20 +668,21 @@ CG_AdjustPositionForMover
|
|||
Also called by client movement prediction code
|
||||
=========================
|
||||
*/
|
||||
void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int toTime, vec3_t out ) {
|
||||
void CG_AdjustPositionForMover(const vec3_t in, int moverNum, int fromTime, int toTime, vec3_t out, vec3_t angles_in, vec3_t angles_out) {
|
||||
centity_t *cent;
|
||||
vec3_t oldOrigin, origin, deltaOrigin;
|
||||
vec3_t oldAngles, angles;
|
||||
//vec3_t deltaAngles;
|
||||
vec3_t oldAngles, angles, deltaAngles;
|
||||
|
||||
if ( moverNum <= 0 || moverNum >= ENTITYNUM_MAX_NORMAL ) {
|
||||
VectorCopy( in, out );
|
||||
VectorCopy(angles_in, angles_out);
|
||||
return;
|
||||
}
|
||||
|
||||
cent = &cg_entities[ moverNum ];
|
||||
if ( cent->currentState.eType != ET_MOVER ) {
|
||||
VectorCopy( in, out );
|
||||
VectorCopy(angles_in, angles_out);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -692,10 +693,10 @@ void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int
|
|||
BG_EvaluateTrajectory( ¢->currentState.apos, toTime, angles );
|
||||
|
||||
VectorSubtract( origin, oldOrigin, deltaOrigin );
|
||||
//VectorSubtract( angles, oldAngles, deltaAngles );
|
||||
VectorSubtract( angles, oldAngles, deltaAngles );
|
||||
|
||||
VectorAdd( in, deltaOrigin, out );
|
||||
|
||||
VectorAdd( angles_in, deltaAngles, angles_out );
|
||||
// FIXME: origin change when on a rotating object
|
||||
}
|
||||
|
||||
|
@ -773,7 +774,7 @@ static void CG_CalcEntityLerpPositions( centity_t *cent ) {
|
|||
// player state
|
||||
if ( cent != &cg.predictedPlayerEntity ) {
|
||||
CG_AdjustPositionForMover( cent->lerpOrigin, cent->currentState.groundEntityNum,
|
||||
cg.snap->serverTime, cg.time, cent->lerpOrigin );
|
||||
cg.snap->serverTime, cg.time, cent->lerpOrigin, cent->lerpAngles, cent->lerpAngles);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1333,7 +1333,7 @@ void CG_PainEvent( centity_t *cent, int health );
|
|||
void CG_SetEntitySoundPosition( centity_t *cent );
|
||||
void CG_AddPacketEntities( void );
|
||||
void CG_Beam( centity_t *cent );
|
||||
void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int toTime, vec3_t out );
|
||||
void CG_AdjustPositionForMover(const vec3_t in, int moverNum, int fromTime, int toTime, vec3_t out, vec3_t angles_in, vec3_t angles_out);
|
||||
|
||||
void CG_PositionEntityOnTag( refEntity_t *entity, const refEntity_t *parent,
|
||||
qhandle_t parentModel, char *tagName );
|
||||
|
|
|
@ -2615,7 +2615,7 @@ void CG_ResetPlayerEntity( centity_t *cent ) {
|
|||
cent->pe.legs.pitchAngle = 0;
|
||||
cent->pe.legs.pitching = qfalse;
|
||||
|
||||
memset( ¢->pe.torso, 0, sizeof( cent->pe.legs ) );
|
||||
memset( ¢->pe.torso, 0, sizeof( cent->pe.torso ) );
|
||||
cent->pe.torso.yawAngle = cent->rawAngles[YAW];
|
||||
cent->pe.torso.yawing = qfalse;
|
||||
cent->pe.torso.pitchAngle = cent->rawAngles[PITCH];
|
||||
|
|
|
@ -375,7 +375,7 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
|
|||
}
|
||||
if (ps->persistant[PERS_GAUNTLET_FRAG_COUNT] != ops->persistant[PERS_GAUNTLET_FRAG_COUNT]) {
|
||||
#ifdef MISSIONPACK
|
||||
if (ops->persistant[PERS_GAUNTLET_FRAG_COUNT] == 1) {
|
||||
if (ps->persistant[PERS_GAUNTLET_FRAG_COUNT] == 1) {
|
||||
sfx = cgs.media.firstHumiliationSound;
|
||||
} else {
|
||||
sfx = cgs.media.humiliationSound;
|
||||
|
|
|
@ -534,9 +534,9 @@ void CG_PredictPlayerState( void ) {
|
|||
}
|
||||
cg.thisFrameTeleport = qfalse;
|
||||
} else {
|
||||
vec3_t adjusted;
|
||||
vec3_t adjusted, new_angles;
|
||||
CG_AdjustPositionForMover( cg.predictedPlayerState.origin,
|
||||
cg.predictedPlayerState.groundEntityNum, cg.physicsTime, cg.oldTime, adjusted );
|
||||
cg.predictedPlayerState.groundEntityNum, cg.physicsTime, cg.oldTime, adjusted, cg.predictedPlayerState.viewangles, new_angles);
|
||||
|
||||
if ( cg_showmiss.integer ) {
|
||||
if (!VectorCompare( oldPlayerState.origin, adjusted )) {
|
||||
|
@ -604,7 +604,7 @@ void CG_PredictPlayerState( void ) {
|
|||
// adjust for the movement of the groundentity
|
||||
CG_AdjustPositionForMover( cg.predictedPlayerState.origin,
|
||||
cg.predictedPlayerState.groundEntityNum,
|
||||
cg.physicsTime, cg.time, cg.predictedPlayerState.origin );
|
||||
cg.physicsTime, cg.time, cg.predictedPlayerState.origin, cg.predictedPlayerState.viewangles, cg.predictedPlayerState.viewangles);
|
||||
|
||||
if ( cg_showmiss.integer ) {
|
||||
if (cg.predictedPlayerState.eventSequence > oldPlayerState.eventSequence + MAX_PS_EVENTS) {
|
||||
|
|
|
@ -457,7 +457,8 @@ static void CG_MapRestart( void ) {
|
|||
cg.fraglimitWarnings = 0;
|
||||
|
||||
cg.timelimitWarnings = 0;
|
||||
|
||||
cg.rewardTime = 0;
|
||||
cg.rewardStack = 0;
|
||||
cg.intermissionStarted = qfalse;
|
||||
cg.levelShot = qfalse;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue