[PATCH] server side mods for et 2.55


(forty) #1

I’ve tried this out and so far it works.There may be other things missing that I haven’t caught yet. I figured I would post it here so other may use it if they wish. It’s a good start.


diff -ur etmod/src/game/bg_misc.c fortymod-playable/src/game/bg_misc.c
--- etmod/src/game/bg_misc.c	Thu Aug 28 15:43:22 2003
+++ fortymod-playable/src/game/bg_misc.c	Thu Mar  4 03:27:19 2004
@@ -951,6 +951,31 @@
 		"",					    // sounds
 	},
 
+        /*
+                weapon_lockpick - cjb - 02/08/04
+		these values were guessed they may be wrong.
+		this was in 2.55 but missing in 2.56
+        */
+        {
+                "weapon_lockpick",
+                "",
+                {
+                        "models/multiplayer/lockpick/lockpick.md3",
+                        0,
+                        0
+                },
+
+                "",                                             // icon
+                "",                                             // ammo icon
+                "Lockpick",                                     // pickup
+                0,
+                IT_WEAPON,
+                WP_LOCKPICK,
+                WP_LOCKPICK,
+                WP_LOCKPICK,
+                "",                                             // precache
+                "",                                             // sounds
+        },      
 
 /*QUAKED weapon_sten (.3 .3 1) (-16 -16 -16) (16 16 16) suspended
 -------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY --------
diff -ur etmod/src/game/g_script.c fortymod-playable/src/game/g_script.c
--- etmod/src/game/g_script.c	Mon Jan 26 17:29:42 2004
+++ fortymod-playable/src/game/g_script.c	Thu Mar  4 03:34:03 2004
@@ -467,6 +467,10 @@
 	int			bracketLevel;
 	qboolean	buildScript;
 
+	//we need the mapname
+	vmCvar_t	mapname;
+	trap_Cvar_Register( &mapname, "mapname", "", CVAR_SERVERINFO | CVAR_ROM);
+
 	if (!ent->scriptName)
 		return;
 	if (!level.scriptEntity)
@@ -629,10 +633,73 @@
 					}
 				}
 
-				if (strlen( params ))
-				{	// copy the params into the event
-					curEvent->stack.items[curEvent->stack.numItems].params = G_Alloc( strlen( params ) + 1 );
-					Q_strncpyz( curEvent->stack.items[curEvent->stack.numItems].params, params, strlen(params)+1 );
+				if (strlen( params )) {
+
+				
+					/*
+						the railgun map script for 2.55 has a problem.
+						we add a 'wait 200' before 'trigger self allies_want_depot'
+						in switch_invtrig1 spawn(). the map script for 2.56 already has this
+						fix. there are other ways of doing this. i wanted to keep this
+						server side only, other wise the client needs a pk3 with the same
+						map script in it. - cjb
+					*/
+
+					if (
+						!Q_stricmp(mapname.string, "railgun") &&
+						!Q_stricmp(ent->scriptName, "switch_invtrig1") &&
+						!Q_stricmp(action->actionString, "trigger") &&
+						!Q_stricmp(params, "self allies_want_depot")
+					   ) {
+
+						//put the real action one forward.
+						curEvent->stack.items[curEvent->stack.numItems+1].action = action;
+
+						// copy the params into the event
+						curEvent->stack.items[curEvent->stack.numItems+1].params = 
+							G_Alloc( strlen( params ) + 1 );
+
+						Q_strncpyz( 
+							curEvent->stack.items[curEvent->stack.numItems+1].params, 
+							params, 
+							strlen(params)+1 
+						);
+
+						//prepend a wait onto the stack.
+						action = G_Script_ActionForString( "wait" );
+						if( !action ) {
+							G_Error( "G_Script_ScriptParse(), Error (line %d): unknown action: %s.
", COM_GetCurrentParseLine(), token );
+						}
+						curEvent->stack.items[curEvent->stack.numItems].action = action;
+
+						// and its param.
+						//
+						// copy the params into the event
+
+						curEvent->stack.items[curEvent->stack.numItems].params = 
+							G_Alloc( strlen( "200" ) + 1 );
+
+						Q_strncpyz( 
+							curEvent->stack.items[curEvent->stack.numItems].params, 
+							"200", 
+							strlen("200")+1 
+						);
+
+						curEvent->stack.numItems++;
+					
+					} else {
+
+						// copy the params into the event
+						curEvent->stack.items[curEvent->stack.numItems].params = 
+							G_Alloc( strlen( params ) + 1 );
+
+						Q_strncpyz( 
+							curEvent->stack.items[curEvent->stack.numItems].params, 
+							params, 
+							strlen(params)+1 
+						);
+
+					}
 				}
 
 				curEvent->stack.numItems++;
diff -ur etmod/src/game/q_shared.h fortymod-playable/src/game/q_shared.h
--- etmod/src/game/q_shared.h	Tue Jul 22 17:05:56 2003
+++ fortymod-playable/src/game/q_shared.h	Sun Feb 29 02:06:37 2004
@@ -7,7 +7,7 @@
 //#define PRE_RELEASE_DEMO
 
 #ifndef PRE_RELEASE_DEMO
-#define	Q3_VERSION		"ET 2.56"
+#define	Q3_VERSION		"ET 2.55"
 #else
 #define	Q3_VERSION		"ET 2.32"
 #endif // PRE_RELEASE_DEMO



You can download it here.
http://systats.or8.net/et-255.patch


([DS]-=Pencil=-) #2

what does that mod do?

hope you help

:slight_smile:


(forty) #3

what does that mod do?

hope you help

makes the 2.56 (1.02) mod source work for 2.55 (1.00/1.01)


(fretn) #4

the bg_ files are included in both server and client, so your patch isn’t realy serverside only :wink:


(forty) #5

the bg_ files are included in both server and client, so your patch isn’t realy serverside only

2.55 client expects weapon_lockpick to be there. It does work server side only.