SOURCES: tremulous-backport.patch (NEW) - very popupar patch by TJW: http:/...

sparky sparky at pld-linux.org
Wed Sep 3 01:06:56 CEST 2008


Author: sparky                       Date: Tue Sep  2 23:06:56 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- very popupar patch by TJW: http://tjw.org/tremulous/tremulous-svn823.patch

---- Files affected:
SOURCES:
   tremulous-backport.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/tremulous-backport.patch
diff -u /dev/null SOURCES/tremulous-backport.patch:1.1
--- /dev/null	Wed Sep  3 01:06:56 2008
+++ SOURCES/tremulous-backport.patch	Wed Sep  3 01:06:50 2008
@@ -0,0 +1,2047 @@
+Index: src/server/sv_client.c
+===================================================================
+--- src/server/sv_client.c	(revision 823)
++++ src/server/sv_client.c	(working copy)
+@@ -460,7 +460,11 @@
+ 	sharedEntity_t *ent;
+ 
+ 	Com_DPrintf( "Going from CS_PRIMED to CS_ACTIVE for %s\n", client->name );
++
+ 	client->state = CS_ACTIVE;
++	// resend all configstrings using the cs commands since these are
++	// no longer sent when the client is CS_PRIMED
++	SV_UpdateConfigstrings( client );
+ 
+ 	// set up the entity for the client
+ 	clientNum = client - svs.clients;
+Index: src/server/server.h
+===================================================================
+--- src/server/server.h	(revision 823)
++++ src/server/server.h	(working copy)
+@@ -169,6 +169,7 @@
+ 	netchan_buffer_t **netchan_end_queue;
+ 
+ 	int				oldServerTime;
++	qboolean			csupdated[MAX_CONFIGSTRINGS+1];	
+ } client_t;
+ 
+ //=============================================================================
+@@ -227,6 +228,8 @@
+ extern	cvar_t	*sv_rconPassword;
+ extern	cvar_t	*sv_privatePassword;
+ extern	cvar_t	*sv_allowDownload;
++extern	cvar_t	*sv_wwwDownload;
++extern	cvar_t	*sv_wwwBaseURL;
+ extern	cvar_t	*sv_maxclients;
+ 
+ extern	cvar_t	*sv_privateClients;
+@@ -272,6 +275,7 @@
+ //
+ void SV_SetConfigstring( int index, const char *val );
+ void SV_GetConfigstring( int index, char *buffer, int bufferSize );
++void SV_UpdateConfigstrings( client_t *client );
+ 
+ void SV_SetUserinfo( int index, const char *val );
+ void SV_GetUserinfo( int index, char *buffer, int bufferSize );
+Index: src/server/sv_init.c
+===================================================================
+--- src/server/sv_init.c	(revision 823)
++++ src/server/sv_init.c	(working copy)
+@@ -23,15 +23,62 @@
+ 
+ #include "server.h"
+ 
++
+ /*
+ ===============
++SV_SendConfigstring
++===============
++*/
++static void SV_SendConfigString(client_t *client, int index)
++{
++	int maxChunkSize = MAX_STRING_CHARS - 24;
++	int len;
++
++	if(!sv.configstrings[index][0])
++		return;
++
++	len = strlen(sv.configstrings[index]);
++
++	if( len >= maxChunkSize ) {
++		int		sent = 0;
++		int		remaining = len;
++		char	*cmd;
++		char	buf[MAX_STRING_CHARS];
++
++		while (remaining > 0 ) {
++			if ( sent == 0 ) {
++				cmd = "bcs0";
++			}
++			else if( remaining < maxChunkSize ) {
++				cmd = "bcs2";
++			}
++			else {
++				cmd = "bcs1";
++			}
++			Q_strncpyz( buf, &sv.configstrings[index][sent],
++				maxChunkSize );
++
++			SV_SendServerCommand( client, "%s %i \"%s\"\n", cmd,
++				index, buf );
++
++			sent += (maxChunkSize - 1);
++			remaining -= (maxChunkSize - 1);
++		}
++	} else {
++		// standard cs, just send it
++		SV_SendServerCommand( client, "cs %i \"%s\"\n", index,
++			sv.configstrings[index] );
++	}
++}
++
++/*
++===============
+ SV_SetConfigstring
+ 
+ ===============
+ */
+ void SV_SetConfigstring (int index, const char *val) {
+ 	int		len, i;
+-	int		maxChunkSize = MAX_STRING_CHARS - 24;
+ 	client_t	*client;
+ 
+ 	if ( index < 0 || index >= MAX_CONFIGSTRINGS ) {
+@@ -57,48 +104,41 @@
+ 
+ 		// send the data to all relevent clients
+ 		for (i = 0, client = svs.clients; i < sv_maxclients->integer ; i++, client++) {
+-			if ( client->state < CS_PRIMED ) {
++			if ( client->state < CS_ACTIVE ) {
++				client->csupdated[index] = qtrue;
+ 				continue;
+ 			}
+ 			// do not always send server info to all clients
+ 			if ( index == CS_SERVERINFO && client->gentity && (client->gentity->r.svFlags & SVF_NOSERVERINFO) ) {
+ 				continue;
+ 			}
++		
+ 
+ 			len = strlen( val );
+-			if( len >= maxChunkSize ) {
+-				int		sent = 0;
+-				int		remaining = len;
+-				char	*cmd;
+-				char	buf[MAX_STRING_CHARS];
++			SV_SendConfigString(client, index);
++		}
++	}
++}
+ 
+-				while (remaining > 0 ) {
+-					if ( sent == 0 ) {
+-						cmd = "bcs0";
+-					}
+-					else if( remaining < maxChunkSize ) {
+-						cmd = "bcs2";
+-					}
+-					else {
+-						cmd = "bcs1";
+-					}
+-					Q_strncpyz( buf, &val[sent], maxChunkSize );
++void SV_UpdateConfigstrings(client_t *client)
++{
++	int index;
+ 
+-					SV_SendServerCommand( client, "%s %i \"%s\"\n", cmd, index, buf );
++	for( index = 0; index <= MAX_CONFIGSTRINGS; index++ ) {
++		// if the CS hasn't changed since we went to CS_PRIMED, ignore
++		if(!client->csupdated[index])
++			continue;
+ 
+-					sent += (maxChunkSize - 1);
+-					remaining -= (maxChunkSize - 1);
+-				}
+-			} else {
+-				// standard cs, just send it
+-				SV_SendServerCommand( client, "cs %i \"%s\"\n", index, val );
+-			}
++		// do not always send server info to all clients
++		if ( index == CS_SERVERINFO && client->gentity &&
++			(client->gentity->r.svFlags & SVF_NOSERVERINFO) ) {
++			continue;
+ 		}
++		SV_SendConfigString(client, index);
+ 	}
+ }
+ 
+ 
+-
+ /*
+ ===============
+ SV_GetConfigstring
+@@ -561,6 +601,10 @@
+ 	sv_zombietime = Cvar_Get ("sv_zombietime", "2", CVAR_TEMP );
+ 
+ 	sv_allowDownload = Cvar_Get ("sv_allowDownload", "0", CVAR_SERVERINFO);
++	sv_wwwDownload = Cvar_Get ("sv_wwwDownload", "1",
++		CVAR_SYSTEMINFO|CVAR_ARCHIVE);
++	sv_wwwBaseURL = Cvar_Get ("sv_wwwBaseURL", "",
++		CVAR_SYSTEMINFO|CVAR_ARCHIVE);
+ 	sv_master[0] = Cvar_Get ("sv_master1", MASTER_SERVER_NAME, 0 );
+ 	sv_master[1] = Cvar_Get ("sv_master2", "", CVAR_ARCHIVE );
+ 	sv_master[2] = Cvar_Get ("sv_master3", "", CVAR_ARCHIVE );
+Index: src/server/sv_main.c
+===================================================================
+--- src/server/sv_main.c	(revision 823)
++++ src/server/sv_main.c	(working copy)
+@@ -33,6 +33,8 @@
+ cvar_t	*sv_rconPassword;		// password for remote server commands
+ cvar_t	*sv_privatePassword;	// password for the privateClient slots
+ cvar_t	*sv_allowDownload;
++cvar_t	*sv_wwwBaseURL;
++cvar_t	*sv_wwwDownload;
+ cvar_t	*sv_maxclients;
+ 
+ cvar_t	*sv_privateClients;		// number of clients reserved for password
+@@ -129,6 +131,9 @@
+ //		return;
+ //	}
+ 
++	if( client->state < CS_ACTIVE )
++		return;
++
+ 	client->reliableSequence++;
+ 	// if we would be losing an old command that hasn't been acknowledged,
+ 	// we must drop the connection
+@@ -186,9 +191,6 @@
+ 
+ 	// send the data to all relevent clients
+ 	for (j = 0, client = svs.clients; j < sv_maxclients->integer ; j++, client++) {
+-		if ( client->state < CS_PRIMED ) {
+-			continue;
+-		}
+ 		SV_AddServerCommand( client, (char *)message );
+ 	}
+ }
+Index: src/game/bg_misc.c
+===================================================================
+--- src/game/bg_misc.c	(revision 823)
++++ src/game/bg_misc.c	(working copy)
+@@ -67,7 +67,8 @@
+     qfalse,                //qboolean  creepTest;
+     ASPAWN_CREEPSIZE,      //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qfalse                 //qboolean  reactorTest;
++    qfalse,                //qboolean  reactorTest;
++    qfalse,                //qboolean  replacable;
+   },
+   {
+     BA_A_BARRICADE,        //int       buildNum;
+@@ -102,7 +103,8 @@
+     qtrue,                 //qboolean  creepTest;
+     BARRICADE_CREEPSIZE,   //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qfalse                 //qboolean  reactorTest;
++    qfalse,                //qboolean  reactorTest;
++    qfalse,                //qboolean  replaceable;
+   },
+   {
+     BA_A_BOOSTER,          //int       buildNum;
+@@ -137,7 +139,8 @@
+     qtrue,                 //qboolean  creepTest;
+     BOOSTER_CREEPSIZE,     //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qfalse                 //qboolean  reactorTest;
++    qfalse,                //qboolean  reactorTest;
++    qtrue,                 //qboolean  replacable;
+   },
+   {
+     BA_A_ACIDTUBE,         //int       buildNum;
+@@ -172,7 +175,8 @@
+     qtrue,                 //qboolean  creepTest;
+     ACIDTUBE_CREEPSIZE,    //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qfalse                 //qboolean  reactorTest;
++    qfalse,                //qboolean  reactorTest;
++    qfalse,                //qboolean  replacable;
+   },
+   {
+     BA_A_HIVE,             //int       buildNum;
+@@ -207,7 +211,8 @@
+     qtrue,                 //qboolean  creepTest;
+     HIVE_CREEPSIZE,        //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qfalse                 //qboolean  reactorTest;
++    qfalse,                //qboolean  reactorTest;
++    qfalse,                //qboolean  replacable;
+   },
+   {
+     BA_A_TRAPPER,          //int       buildNum;
+@@ -242,7 +247,8 @@
+     qtrue,                 //qboolean  creepTest;
+     TRAPPER_CREEPSIZE,     //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qfalse                 //qboolean  reactorTest;
++    qfalse,                //qboolean  reactorTest;
++    qfalse,                //qboolean  replacable;
+   },
+   {
+     BA_A_OVERMIND,         //int       buildNum;
+@@ -277,7 +283,8 @@
+     qfalse,                //qboolean  creepTest;
+     OVERMIND_CREEPSIZE,    //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qtrue                  //qboolean  reactorTest;
++    qtrue,                 //qboolean  reactorTest;
++    qtrue,                 //qboolean  replacable;
+   },
+   {
+     BA_A_HOVEL,            //int       buildNum;
+@@ -312,7 +319,8 @@
+     qtrue,                 //qboolean  creepTest;
+     HOVEL_CREEPSIZE,       //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qtrue                  //qboolean  reactorTest;
++    qtrue,                 //qboolean  reactorTest;
++    qfalse,                //qboolean  replacable;
+   },
+   {
+     BA_H_SPAWN,            //int       buildNum;
+@@ -347,7 +355,8 @@
+     qfalse,                //qboolean  creepTest;
+     0,                     //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qfalse                 //qboolean  reactorTest;
++    qfalse,                //qboolean  reactorTest;
++    qfalse,                //qboolean  replacable;
+   },
+   {
+     BA_H_MEDISTAT,         //int       buildNum;
+@@ -382,7 +391,8 @@
+     qfalse,                //qboolean  creepTest;
+     0,                     //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qfalse                 //qboolean  reactorTest;
++    qfalse,                //qboolean  reactorTest;
++    qtrue,                 //qboolean  replacable;
+   },
+   {
+     BA_H_MGTURRET,         //int       buildNum;
+@@ -419,7 +429,8 @@
+     qfalse,                //qboolean  creepTest;
+     0,                     //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qfalse                 //qboolean  reactorTest;
++    qfalse,                //qboolean  reactorTest;
++    qfalse,                //qboolean  replacable;
+   },
+   {
+     BA_H_TESLAGEN,         //int       buildNum;
+@@ -454,7 +465,8 @@
+     qfalse,                //qboolean  creepTest;
+     0,                     //int       creepSize;
+     qtrue,                 //qboolean  dccTest;
+-    qfalse                 //qboolean  reactorTest;
++    qfalse,                //qboolean  reactorTest;
++    qfalse,                //qboolean  replacable;
+   },
+   {
+     BA_H_DCC,              //int       buildNum;
+@@ -489,7 +501,8 @@
+     qfalse,                //qboolean  creepTest;
+     0,                     //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qfalse                 //qboolean  reactorTest;
++    qfalse,                //qboolean  reactorTest;
++    qtrue,                 //qboolean  replacable;
+   },
+   {
+     BA_H_ARMOURY,          //int       buildNum;
+@@ -524,7 +537,8 @@
+     qfalse,                //qboolean  creepTest;
+     0,                     //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qfalse                 //qboolean  reactorTest;
++    qfalse,                //qboolean  reactorTest;
++    qtrue,                 //qboolean  replacable;
+   },
+   {
+     BA_H_REACTOR,          //int       buildNum;
+@@ -559,7 +573,8 @@
+     qfalse,                //qboolean  creepTest;
+     0,                     //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qtrue                  //qboolean  reactorTest;
++    qtrue,                 //qboolean  reactorTest;
++    qtrue,                 //qboolean  replacable;
+   },
+   {
+     BA_H_REPEATER,         //int       buildNum;
+@@ -594,7 +609,8 @@
+     qfalse,                //qboolean  creepTest;
+     0,                     //int       creepSize;
+     qfalse,                //qboolean  dccTest;
+-    qfalse                 //qboolean  reactorTest;
++    qfalse,                //qboolean  reactorTest;
++    qtrue,                 //qboolean  replacable;
+   }
+ };
+ 
+@@ -1290,6 +1306,25 @@
+ 
+ /*
+ ==============
++BG_FindReplaceableTestForBuildable
++==============
++*/
++qboolean BG_FindReplaceableTestForBuildable( int bclass )
++{
++  int i;
++
++  for( i = 0; i < bg_numBuildables; i++ )
++  {
++    if( bg_buildableList[ i ].buildNum == bclass )
++    {
++      return bg_buildableList[ i ].replaceable;
++    }
++  }
++  return qfalse;
++}
++
++/*
++==============
+ BG_FindOverrideForBuildable
+ ==============
+ */
+Index: src/game/tremulous.h
+===================================================================
+--- src/game/tremulous.h	(revision 823)
++++ src/game/tremulous.h	(working copy)
+@@ -306,8 +306,8 @@
+ 
+ #define ALIENSENSE_RANGE            1000.0f
+ 
+-#define ALIEN_POISON_TIME           10000
+-#define ALIEN_POISON_DMG            30
++#define ALIEN_POISON_TIME           5000
++#define ALIEN_POISON_DMG            5
+ #define ALIEN_POISON_DIVIDER        (1.0f/1.32f) //about 1.0/(time`th root of damage)
+ 
+ #define ALIEN_SPAWN_REPEAT_TIME     10000
+@@ -427,9 +427,11 @@
+  */
+ 
+ #define LIGHTARMOUR_PRICE           70
++#define LIGHTARMOUR_POISON_PROTECTION 1
+ 
+ #define HELMET_PRICE                90
+ #define HELMET_RANGE                1000.0f
++#define HELMET_POISON_PROTECTION    2 
+ 
+ #define MEDKIT_PRICE                0
+ 
+@@ -443,6 +445,7 @@
+ #define JETPACK_DISABLE_CHANCE      0.3f
+ 
+ #define BSUIT_PRICE                 400
++#define BSUIT_POISON_PROTECTION     4
+ 
+ #define MGCLIP_PRICE                0
+ 
+@@ -450,7 +453,7 @@
+ 
+ #define GAS_PRICE                   0
+ 
+-#define MEDKIT_POISON_IMMUNITY_TIME 30000
++#define MEDKIT_POISON_IMMUNITY_TIME 0
+ #define MEDKIT_STARTUP_TIME         4000
+ #define MEDKIT_STARTUP_SPEED        5
+ 
+@@ -588,3 +591,8 @@
+ 
+ #define DAMAGE_FRACTION_FOR_KILL    0.5f //how much damage players (versus structures) need to
+                                          //do to increment the stage kill counters
++
++// g_suddenDeathMode settings
++#define SDMODE_BP                   0 
++#define SDMODE_NO_BUILD             1
++#define SDMODE_SELECTIVE            2
+Index: src/game/g_svcmds.c
+===================================================================
+--- src/game/g_svcmds.c	(revision 823)
++++ src/game/g_svcmds.c	(working copy)
+@@ -600,6 +600,11 @@
+       G_Printf( "cp: %s\n", ConcatArgs( 1 ) );
+       return qtrue;
+     }
++    else if( !Q_stricmp( cmd, "m" ) )
++    {
++      G_PrivateMessage( NULL );
++      return qtrue;
++    }
+ 
+     G_Printf( "unknown command: %s\n", cmd );
+     return qtrue;
+Index: src/game/g_local.h
+===================================================================
+--- src/game/g_local.h	(revision 823)
++++ src/game/g_local.h	(working copy)
+@@ -347,6 +347,14 @@
+   int                 adminLevel;
+ } clientPersistant_t;
+ 
++#define MAX_UNLAGGED_MARKERS 10
++typedef struct unlagged_s {
++  vec3_t      origin;
++  vec3_t      mins;
++  vec3_t      maxs;
++  qboolean    used;
++} unlagged_t;
++
+ // this structure is cleared on each ClientSpawn(),
+ // except for 'client->pers' and 'client->sess'
+ struct gclient_s
+@@ -438,6 +446,12 @@
+ 
+ #define RAM_FRAMES  1                       // number of frames to wait before retriggering
+   int                 retriggerArmouryMenu; // frame number to retrigger the armoury menu
++
++  unlagged_t          unlaggedHist[ MAX_UNLAGGED_MARKERS ];
++  unlagged_t          unlaggedBackup;
++  unlagged_t          unlaggedCalc;
++  int                 unlaggedTime;
++
+ };
+ 
+ 
+@@ -609,6 +623,9 @@
+ 
+   pTeam_t           lastWin;
+ 
++  int               suddenDeathABuildPoints;
++  int               suddenDeathHBuildPoints;
++  qboolean          suddenDeath;
+   timeWarning_t     suddenDeathWarning;
+   timeWarning_t     timelimitWarning;
+ 
+@@ -624,6 +641,9 @@
+   qboolean          uncondHumanWin;
+   qboolean          alienTeamLocked;
+   qboolean          humanTeamLocked;
++
++  int unlaggedIndex;
++  int unlaggedTimes[ MAX_UNLAGGED_MARKERS ];
+ } level_locals_t;
+ 
+ //
+@@ -652,6 +672,7 @@
+ void      G_DecolorString( char *in, char *out );
+ void      G_ChangeTeam( gentity_t *ent, pTeam_t newTeam );
+ void      G_SanitiseName( char *in, char *out );
++void      G_PrivateMessage( gentity_t *ent );
+ 
+ //
+ // g_physics.c
+@@ -908,6 +929,11 @@
+ //
+ // g_active.c
+ //
++void G_UnlaggedStore( void );
++void G_UnlaggedClear( gentity_t *ent );
++void G_UnlaggedCalc( int time, gentity_t *skipEnt );
++void G_UnlaggedOn( vec3_t muzzle, float range );
++void G_UnlaggedOff( void );
+ void ClientThink( int clientNum );
+ void ClientEndFrame( gentity_t *ent );
+ void G_RunClient( gentity_t *ent );
+@@ -1045,6 +1071,7 @@
+ 
+ extern  vmCvar_t  g_timelimit;
+ extern  vmCvar_t  g_suddenDeathTime;
++extern  vmCvar_t  g_suddenDeathMode;
+ extern  vmCvar_t  g_friendlyFire;
+ extern  vmCvar_t  g_friendlyFireHumans;
+ extern  vmCvar_t  g_friendlyFireAliens;
+@@ -1094,6 +1121,8 @@
+ extern  vmCvar_t  g_alienStage2Threshold;
+ extern  vmCvar_t  g_alienStage3Threshold;
+ 
++extern  vmCvar_t  g_unlagged;
++
+ extern  vmCvar_t  g_disabledEquipment;
+ extern  vmCvar_t  g_disabledClasses;
+ extern  vmCvar_t  g_disabledBuildables;
+@@ -1112,6 +1141,9 @@
+ extern  vmCvar_t  g_adminNameProtect;
+ extern  vmCvar_t  g_adminTempBan;
+ 
++extern  vmCvar_t  g_privateMessages;
++extern  vmCvar_t  g_dretchPunt;
++
+ void      trap_Printf( const char *fmt );
+ void      trap_Error( const char *fmt );
+ int       trap_Milliseconds( void );
+Index: src/game/g_combat.c
+===================================================================
+--- src/game/g_combat.c	(revision 823)
++++ src/game/g_combat.c	(working copy)
+@@ -41,9 +41,6 @@
+   if( !ent->client )
+     return;
+ 
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list