mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-10 23:32:06 +00:00
Small unlagged fixes and voting delay added.
This commit is contained in:
parent
64827fcc8f
commit
f56604b990
8 changed files with 53 additions and 5 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.40 2003/03/10 07:07:58 jbravo
|
||||
// Small unlagged fixes and voting delay added.
|
||||
//
|
||||
// Revision 1.39 2003/03/09 21:30:38 jbravo
|
||||
// Adding unlagged. Still needs work.
|
||||
//
|
||||
|
@ -885,6 +888,7 @@ static void CG_CalcEntityLerpPositions(centity_t * cent)
|
|||
// this is done server-side now - cg_smoothClients is undefined
|
||||
// players will always be TR_INTERPOLATE
|
||||
// if this player does not want to see extrapolated players
|
||||
// JBravo: done serverside now via unlagged
|
||||
/* if (!cg_smoothClients.integer) {
|
||||
// make sure the clients use TR_INTERPOLATE
|
||||
if (cent->currentState.number < MAX_CLIENTS) {
|
||||
|
@ -904,6 +908,7 @@ static void CG_CalcEntityLerpPositions(centity_t * cent)
|
|||
CG_InterpolateEntityPosition(cent);
|
||||
return;
|
||||
}
|
||||
// JBravo: unlagged
|
||||
if (cent->currentState.number < MAX_CLIENTS &&
|
||||
cent->currentState.clientNum != cg.predictedPlayerState.clientNum) {
|
||||
cent->currentState.pos.trType = TR_LINEAR_STOP;
|
||||
|
@ -915,6 +920,8 @@ static void CG_CalcEntityLerpPositions(centity_t * cent)
|
|||
// if it's one of ours
|
||||
if (cent->currentState.otherEntityNum == cg.clientNum) {
|
||||
timeshift = 1000 / sv_fps.integer;
|
||||
} else if ( cent->currentState.weapon != WP_GRENADE) {
|
||||
timeshift = cg_projectileNudge.integer + 1000 / sv_fps.integer;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.27 2003/03/10 07:07:58 jbravo
|
||||
// Small unlagged fixes and voting delay added.
|
||||
//
|
||||
// Revision 1.26 2003/03/09 21:30:38 jbravo
|
||||
// Adding unlagged. Still needs work.
|
||||
//
|
||||
|
@ -418,10 +421,10 @@ static void CG_TouchTriggerPrediction(void)
|
|||
}
|
||||
}
|
||||
|
||||
// JBravo: unlagged
|
||||
// JBravo: unlagged - optimized prediction
|
||||
#define ABS(x) ((x) < 0 ? (-(x)) : (x))
|
||||
|
||||
static int IsUnacceptableError( playerState_t *ps, playerState_t *pps ) {
|
||||
static int IsUnacceptableError (playerState_t *ps, playerState_t *pps) {
|
||||
vec3_t delta;
|
||||
int i;
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.2 2003/03/10 07:07:58 jbravo
|
||||
// Small unlagged fixes and voting delay added.
|
||||
//
|
||||
// Revision 1.1 2003/03/09 21:32:23 jbravo
|
||||
// *** empty log message ***
|
||||
//
|
||||
|
@ -131,7 +134,7 @@ void CG_PredictWeaponEffects(centity_t * cent)
|
|||
VectorMA(muzzlePoint, -1, up, muzzlePoint);
|
||||
|
||||
// draw a rail trail
|
||||
CG_RailTrail(&cgs.clientinfo[cent->currentState.number], muzzlePoint, trace.endpos);
|
||||
// CG_RailTrail(&cgs.clientinfo[cent->currentState.number], muzzlePoint, trace.endpos);
|
||||
//Com_Printf( "Predicted rail trail\n" );
|
||||
|
||||
// explosion at end if not SURF_NOIMPACT
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.97 2003/03/10 07:07:58 jbravo
|
||||
// Small unlagged fixes and voting delay added.
|
||||
//
|
||||
// Revision 1.96 2003/03/09 21:30:38 jbravo
|
||||
// Adding unlagged. Still needs work.
|
||||
//
|
||||
|
@ -1126,6 +1129,11 @@ void ClientThink_real(gentity_t * ent)
|
|||
} else {
|
||||
client->pers.realPing = client->ps.ping;
|
||||
}
|
||||
client->pers.cmdqueue[client->pers.cmdhead] = client->pers.cmd;
|
||||
client->pers.cmdhead++;
|
||||
if (client->pers.cmdhead >= MAX_LATENT_CMDS) {
|
||||
client->pers.cmdhead -= MAX_LATENT_CMDS;
|
||||
}
|
||||
if (client->pers.latentCmds) {
|
||||
int time = ucmd->serverTime;
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.126 2003/03/10 07:07:58 jbravo
|
||||
// Small unlagged fixes and voting delay added.
|
||||
//
|
||||
// Revision 1.125 2003/03/09 21:30:38 jbravo
|
||||
// Adding unlagged. Still needs work.
|
||||
//
|
||||
|
@ -1391,9 +1394,9 @@ char *ClientConnect(int clientNum, qboolean firstTime, qboolean isBot)
|
|||
client->pers.enterTime = level.time;
|
||||
// JBravo: unlagged
|
||||
if (g_delagHitscan.integer) {
|
||||
trap_SendServerCommand(clientNum, "print \"^1This server is Unlagged: full lag compensation is ON!\n\"");
|
||||
trap_SendServerCommand(clientNum, "print \"^3This server is Unlagged: full lag compensation is ^1ON!\n\"");
|
||||
} else {
|
||||
trap_SendServerCommand(clientNum, "print \"^1This server is Unlagged: full lag compensation is OFF!\n\"");
|
||||
trap_SendServerCommand(clientNum, "print \"^3This server is Unlagged: full lag compensation is ^1OFF!\n\"");
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.179 2003/03/10 07:07:58 jbravo
|
||||
// Small unlagged fixes and voting delay added.
|
||||
//
|
||||
// Revision 1.178 2003/03/09 21:30:38 jbravo
|
||||
// Adding unlagged. Still needs work.
|
||||
//
|
||||
|
@ -1944,6 +1947,7 @@ Cmd_CallVote_f
|
|||
void Cmd_CallVote_f(gentity_t * ent)
|
||||
{
|
||||
int i;
|
||||
float delay;
|
||||
char arg1[MAX_STRING_TOKENS];
|
||||
char arg2[MAX_STRING_TOKENS];
|
||||
|
||||
|
@ -1955,6 +1959,17 @@ void Cmd_CallVote_f(gentity_t * ent)
|
|||
trap_SendServerCommand(ent - g_entities, "print \"^1A vote is already in progress.\n\"");
|
||||
return;
|
||||
}
|
||||
// JBravo: delay added after mapchanges
|
||||
if (level.time - level.startTime < (float)g_RQ3_vote_waittime.integer * 1000) {
|
||||
delay = ((((float)g_RQ3_vote_waittime.integer * 1000) + level.startTime) - level.time) / 1000;
|
||||
if (delay < 10.0)
|
||||
trap_SendServerCommand(ent - g_entities, va("print \"^1Voting currently blocked - Please vote again in^2 %1.2f ^1seconds\n\"",
|
||||
delay));
|
||||
else
|
||||
trap_SendServerCommand(ent - g_entities, va("print \"^1Voting currently blocked - Please vote again in^2 %2.2f ^1seconds\n\"",
|
||||
delay));
|
||||
return;
|
||||
}
|
||||
//Makro - replaced the constant with a cvar
|
||||
if (ent->client->pers.voteCount >= g_RQ3_maxClientVotes.integer) {
|
||||
//Makro - added cvar info
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.136 2003/03/10 07:07:58 jbravo
|
||||
// Small unlagged fixes and voting delay added.
|
||||
//
|
||||
// Revision 1.135 2003/03/09 21:30:38 jbravo
|
||||
// Adding unlagged. Still needs work.
|
||||
//
|
||||
|
@ -1453,6 +1456,7 @@ extern vmCvar_t g_RQ3_allWeapons; // JBravo: if set, TP/DM players get all the w
|
|||
extern vmCvar_t g_RQ3_allItems; // JBravo: if set, TP/DM players get all the items
|
||||
extern vmCvar_t g_RQ3_tdmMode; // JBravo: Which TDM mode do we want?
|
||||
extern vmCvar_t g_RQ3_haveHelmet; // JBravo: Is the helmet active on the server ?
|
||||
extern vmCvar_t g_RQ3_vote_waittime; // JBravo: delay after mapchanges untill voting is allowed.
|
||||
|
||||
//Slicer: Team Status Cvars for MM
|
||||
//extern vmCvar_t g_RQ3_team1ready;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.136 2003/03/10 07:07:58 jbravo
|
||||
// Small unlagged fixes and voting delay added.
|
||||
//
|
||||
// Revision 1.135 2003/03/09 21:30:38 jbravo
|
||||
// Adding unlagged. Still needs work.
|
||||
//
|
||||
|
@ -494,6 +497,7 @@ vmCvar_t g_RQ3_allWeapons;
|
|||
vmCvar_t g_RQ3_allItems;
|
||||
vmCvar_t g_RQ3_tdmMode;
|
||||
vmCvar_t g_RQ3_haveHelmet;
|
||||
vmCvar_t g_RQ3_vote_waittime;
|
||||
|
||||
// aasimon: Ref System for MM
|
||||
vmCvar_t g_RQ3_AllowRef;
|
||||
|
@ -651,6 +655,7 @@ static cvarTable_t gameCvarTable[] = {
|
|||
{&g_RQ3_allItems, "g_RQ3_allItems", "0", CVAR_ARCHIVE, 0, qtrue},
|
||||
{&g_RQ3_tdmMode, "g_RQ3_tdmMode", "0", CVAR_SERVERINFO | CVAR_LATCH | CVAR_SYSTEMINFO, 0, qtrue},
|
||||
{&g_RQ3_haveHelmet, "g_RQ3_haveHelmet", "0", CVAR_ARCHIVE, 0, qtrue},
|
||||
{&g_RQ3_vote_waittime, "g_RQ3_vote_waittime", "15", CVAR_ARCHIVE, 0, qtrue},
|
||||
{&g_RQ3_idleaction, "g_RQ3_idleaction", "0", CVAR_ARCHIVE, 0, qtrue},
|
||||
//Makro - added CVAR_SERVERINFO flag, it's needed for the UI
|
||||
{&g_RQ3_weaponban, "g_RQ3_weaponban", "511", CVAR_ARCHIVE | CVAR_SERVERINFO, 0, qtrue},
|
||||
|
|
Loading…
Reference in a new issue