mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 15:52:30 +00:00
client gravity fix
This commit is contained in:
parent
9894346d37
commit
c295980599
3 changed files with 14 additions and 3 deletions
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.42 2002/03/11 02:23:52 niceass
|
||||||
|
// client gravity fix
|
||||||
|
//
|
||||||
// Revision 1.41 2002/03/07 19:50:48 makro
|
// Revision 1.41 2002/03/07 19:50:48 makro
|
||||||
// Made cg_RQ3_ssgCrosshair latched
|
// Made cg_RQ3_ssgCrosshair latched
|
||||||
//
|
//
|
||||||
|
@ -228,6 +231,7 @@ vmCvar_t cg_bigFont;
|
||||||
vmCvar_t cg_noTaunt;
|
vmCvar_t cg_noTaunt;
|
||||||
vmCvar_t cg_noProjectileTrail;
|
vmCvar_t cg_noProjectileTrail;
|
||||||
vmCvar_t cg_oldRail;
|
vmCvar_t cg_oldRail;
|
||||||
|
vmCvar_t cg_gravity;
|
||||||
vmCvar_t cg_oldRocket;
|
vmCvar_t cg_oldRocket;
|
||||||
vmCvar_t cg_oldPlasma;
|
vmCvar_t cg_oldPlasma;
|
||||||
vmCvar_t cg_trueLightning;
|
vmCvar_t cg_trueLightning;
|
||||||
|
@ -401,6 +405,7 @@ static cvarTable_t cvarTable[] = { // bk001129
|
||||||
{ &cg_trueLightning, "cg_trueLightning", "0.0", CVAR_ARCHIVE},
|
{ &cg_trueLightning, "cg_trueLightning", "0.0", CVAR_ARCHIVE},
|
||||||
// JBravo: added
|
// JBravo: added
|
||||||
{ &RQ3_lca, "RQ3_lca", "0", 0},
|
{ &RQ3_lca, "RQ3_lca", "0", 0},
|
||||||
|
{ &cg_gravity, "g_gravity", "0", 0},
|
||||||
//Slicer: Team Status Cvars for MM
|
//Slicer: Team Status Cvars for MM
|
||||||
{ &MM_team1, "MM_team1", "0", 0},
|
{ &MM_team1, "MM_team1", "0", 0},
|
||||||
{ &MM_team2, "MM_team2", "0", 0}
|
{ &MM_team2, "MM_team2", "0", 0}
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.16 2002/03/11 02:23:06 niceass
|
||||||
|
// client gravity fix
|
||||||
|
//
|
||||||
// Revision 1.15 2002/02/26 02:58:47 jbravo
|
// Revision 1.15 2002/02/26 02:58:47 jbravo
|
||||||
// Fixing the spectator_free mode not being predicted in the client.
|
// Fixing the spectator_free mode not being predicted in the client.
|
||||||
//
|
//
|
||||||
|
@ -709,7 +712,7 @@ void CG_EvaluateTrajectory( const trajectory_t *tr, int atTime, vec3_t result )
|
||||||
case TR_GRAVITY:
|
case TR_GRAVITY:
|
||||||
deltaTime = ( atTime - tr->trTime ) * 0.001; // milliseconds to seconds
|
deltaTime = ( atTime - tr->trTime ) * 0.001; // milliseconds to seconds
|
||||||
VectorMA( tr->trBase, deltaTime, tr->trDelta, result );
|
VectorMA( tr->trBase, deltaTime, tr->trDelta, result );
|
||||||
result[2] -= 0.5 * cg.predictedPlayerState.gravity * deltaTime * deltaTime; // FIXME: local gravity...
|
result[2] -= 0.5 * cg_gravity.value * deltaTime * deltaTime; // FIXME: local gravity...
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Com_Error( ERR_DROP, "CG_EvaluateTrajectory: unknown trType: %i", tr->trTime );
|
Com_Error( ERR_DROP, "CG_EvaluateTrajectory: unknown trType: %i", tr->trTime );
|
||||||
|
@ -752,7 +755,7 @@ void CG_EvaluateTrajectoryDelta( const trajectory_t *tr, int atTime, vec3_t resu
|
||||||
case TR_GRAVITY:
|
case TR_GRAVITY:
|
||||||
deltaTime = ( atTime - tr->trTime ) * 0.001; // milliseconds to seconds
|
deltaTime = ( atTime - tr->trTime ) * 0.001; // milliseconds to seconds
|
||||||
VectorCopy( tr->trDelta, result );
|
VectorCopy( tr->trDelta, result );
|
||||||
result[2] -= cg.predictedPlayerState.gravity * deltaTime; // FIXME: local gravity...
|
result[2] -= cg_gravity.value * deltaTime; // FIXME: local gravity...
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Com_Error( ERR_DROP, "CG_EvaluateTrajectoryDelta: unknown trType: %i", tr->trTime );
|
Com_Error( ERR_DROP, "CG_EvaluateTrajectoryDelta: unknown trType: %i", tr->trTime );
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.29 2002/03/11 02:21:13 niceass
|
||||||
|
// client gravity fix
|
||||||
|
//
|
||||||
// Revision 1.28 2002/03/07 14:29:12 slicer
|
// Revision 1.28 2002/03/07 14:29:12 slicer
|
||||||
// Intermission ala aq2, when timelimit/roundlimit hits.
|
// Intermission ala aq2, when timelimit/roundlimit hits.
|
||||||
//
|
//
|
||||||
|
@ -211,7 +214,7 @@ static cvarTable_t gameCvarTable[] = {
|
||||||
|
|
||||||
// Elder: slow down to 300?
|
// Elder: slow down to 300?
|
||||||
{ &g_speed, "g_speed", "300", 0, 0, qtrue }, // was 320
|
{ &g_speed, "g_speed", "300", 0, 0, qtrue }, // was 320
|
||||||
{ &g_gravity, "g_gravity", "800", 0, 0, qtrue },
|
{ &g_gravity, "g_gravity", "800", CVAR_SYSTEMINFO, 0, qtrue }, // shared with client (cg_gravity)
|
||||||
{ &g_knockback, "g_knockback", "1000", 0, 0, qtrue },
|
{ &g_knockback, "g_knockback", "1000", 0, 0, qtrue },
|
||||||
{ &g_quadfactor, "g_quadfactor", "3", 0, 0, qtrue },
|
{ &g_quadfactor, "g_quadfactor", "3", 0, 0, qtrue },
|
||||||
{ &g_weaponRespawn, "g_weaponrespawn", "5", 0, 0, qtrue },
|
{ &g_weaponRespawn, "g_weaponrespawn", "5", 0, 0, qtrue },
|
||||||
|
|
Loading…
Reference in a new issue