Skip to content

Commit

Permalink
ps to es testing
Browse files Browse the repository at this point in the history
  • Loading branch information
wolf6542 committed Sep 9, 2021
1 parent 2e262b6 commit 0ae4584
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/game/g_active.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) {
Expand Down Expand Up @@ -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 );
Expand Down
2 changes: 2 additions & 0 deletions src/game/g_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
4 changes: 4 additions & 0 deletions src/game/g_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
};
Expand Down

0 comments on commit 0ae4584

Please sign in to comment.