diff --git a/src/game/g_active.c b/src/game/g_active.c index 0a7898f6..fec4d7ef 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -1618,7 +1618,14 @@ void ClientThink_real( gentity_t *ent ) { BG_PlayerStateToEntityState( &ent->client->ps, &ent->s, qtrue ); }*/ - BG_PlayerStateToEntityStatePro(&ent->client->ps, &ent->s, level.time, qtrue); + if (g_thinkStateLevelTime.integer) + { + BG_PlayerStateToEntityStatePro(&ent->client->ps, &ent->s, level.time, qtrue); + } + else + { + BG_PlayerStateToEntityStatePro(&ent->client->ps, &ent->s, ent->client->ps.commandTime, qtrue); + } // RTCWPro end if ( !( ent->client->ps.eFlags & EF_FIRING ) ) { @@ -2239,7 +2246,14 @@ void ClientEndFrame( gentity_t *ent ) { BG_PlayerStateToEntityState( &ent->client->ps, &ent->s, ( ( ent->r.svFlags & SVF_CASTAI ) == 0 ) ); }*/ - BG_PlayerStateToEntityStatePro(&ent->client->ps, &ent->s, level.time, qfalse); + if (g_endStateLevelTime.integer) + { + BG_PlayerStateToEntityStatePro(&ent->client->ps, &ent->s, level.time, qfalse); + } + else + { + BG_PlayerStateToEntityStatePro(&ent->client->ps, &ent->s, ent->client->ps.commandTime, qfalse); + } // RTCWPro end //SendPendingPredictableEvents( &ent->client->ps ); diff --git a/src/game/g_local.h b/src/game/g_local.h index d79ecbf7..cbb8d8af 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -1667,6 +1667,8 @@ extern vmCvar_t g_hsDamage; extern vmCvar_t g_spawnOffset; // random spawn offset for both teams, between 1 and cvar integer - 1 extern vmCvar_t g_bodiesGrabFlags; extern vmCvar_t g_mapScriptDirectory; +extern vmCvar_t g_thinkStateLevelTime; +extern vmCvar_t g_endStateLevelTime; void trap_Printf( const char *fmt ); void trap_Error( const char *fmt ); diff --git a/src/game/g_main.c b/src/game/g_main.c index c89b5206..3727a202 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -273,6 +273,8 @@ vmCvar_t g_hsDamage; vmCvar_t g_spawnOffset; vmCvar_t g_bodiesGrabFlags; vmCvar_t g_mapScriptDirectory; +vmCvar_t g_thinkStateLevelTime; +vmCvar_t g_endStateLevelTime; cvarTable_t gameCvarTable[] = { // don't override the cheat state set by the system @@ -498,6 +500,8 @@ cvarTable_t gameCvarTable[] = { { &g_bodiesGrabFlags, "g_bodiesGrabFlags", "1", CVAR_ARCHIVE, 0, qtrue }, { &g_mapScriptDirectory, "g_mapScriptDirectory", "", 0, qfalse }, { &g_damageRadiusKnockback, "g_damageRadiusKnockback", "1000", 0, 0, qtrue }, + { &g_thinkStateLevelTime, "g_thinkStateLevelTime", "1", CVAR_ARCHIVE | CVAR_LATCH, 0, qfalse }, + { &g_endStateLevelTime, "g_endStateLevelTime", "1", CVAR_ARCHIVE | CVAR_LATCH, 0, qfalse }, {&stats_matchid, "stats_matchid", "None", CVAR_SERVERINFO | CVAR_ROM, 0, qfalse}, { &P, "P", "", CVAR_SERVERINFO | CVAR_ARCHIVE, 0, qfalse } // ET Port Players server info };