Urban Terror Forums: [RESOLVED]ioUrT-server-4.1 - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

[RESOLVED]ioUrT-server-4.1 Rate Topic: -----

The iourtded.i386 binary

#1 User is offline   J.English Icon

  • Account: jenglish
  • Main tag: [SnP]
  • Country:
  • Joined: 03-April 11
  • Posts: 119

Posted 21 November 2011 - 10:22 AM

hey guys. Right

I'm having a little trouble. (just a little).
today ive been trying with rambetter's iourtded file builder thingy (yes i know :D)
at http://daffy.nerius.com/urtserver/
anyway I tried it and came across several problems but I'm only down to one now.
I compiled a iourtded file using it successfully using the prinstalled patches.
I applied them like said in his tutorial (patch -N -p0 < ./file.patch)
and it completely works with the preinstalled patches. eg:

[root@pty12337d ioUrT-server-4.1]# patch -N -p0 < ./extra-patches/reconnectwait.patch
patching file code/server/sv_client.c
Hunk #1 succeeded at 701 (offset 266 lines).
Hunk #2 succeeded at 691 (offset 9 lines).
patching file code/server/server.h
Hunk #1 succeeded at 245 (offset 11 lines).
Hunk #3 succeeded at 353 with fuzz 2 (offset 30 lines).
patching file code/server/sv_init.c
Hunk #1 succeeded at 712 with fuzz 2 (offset 21 lines).
patching file code/server/sv_main.c
Hunk #1 succeeded at 79 with fuzz 2 (offset 18 lines).



However.I wanted to add in my own patch. Thats where I'm not exactly sure what to do.
I thought all I would have to do is add the patch into the extra-patches folder and redo the command with that one and it would work. But no. It doesnt :

[urt@pty12337d ioUrT-server-4.1]$ patch -N -p0 < ./extra-patches/goto.patch
patching file code/server/sv_client.c
Hunk #1 succeeded at 2102 with fuzz 1 (offset 540 lines).
Hunk #2 succeeded at 1885 (offset 23 lines).
Hunk #3 succeeded at 2496 (offset 570 lines).
patching file code/server/server.h
Hunk #1 FAILED at 205.
Hunk #2 FAILED at 316.
2 out of 2 hunks FAILED -- saving rejects to file code/server/server.h.rej
patching file code/server/sv_init.c
Hunk #1 FAILED at 544.
Hunk #2 succeeded at 701 with fuzz 2 (offset 7 lines).
1 out of 2 hunks FAILED -- saving rejects to file code/server/sv_init.c.rej
patching file code/server/sv_main.c
Hunk #1 FAILED at 61.
1 out of 1 hunk FAILED -- saving rejects to file code/server/sv_main.c.rej


I don't know whats wrong. Is there a certain way I have to import a new patch into the extra-patches folder or something. because I can ONLY get the standard ones that come with it to work and nothing I have put in myself. I have researched possible commands and tried including things in svn but nothing worked. Maybe some other command is necessary. (hopefully)

Cheers for help (hopefully rambetter can)

This post has been edited by jenglish: 27 November 2011 - 12:07 PM


#2 User is offline   Nitro Icon

  •   QA member   
  • Account: nitro
  • Main tag: |P|
  • Country:
  • Joined: 15-March 10
  • Posts: 1,133

Posted 21 November 2011 - 11:55 AM

When you say your own patch, do you mean one that you have made? or one you have from someone elses work or the source code?


If you meant someone elses patch you need to make sure that the lines of code that the patch is actually modifying are still correct since rambetters version of the source may be different from someone elses (I know ram likes to add notes through out his version to explain what he is doing) by doing that he is also forcing the code in other sections to start on a different line.

So what you might find is the patch you are trying to use doesn't line up properly. It would also help if you post the patch here, and explain a bit more about what your trying to do.


P.S. perhaps a topic like this should be put in the server section not general support.

This post has been edited by nitro: 21 November 2011 - 11:57 AM

Lian Li pc-o11dw Der 8auer Edition · Gigabyte x570 Aorus Xtreme · AMD Ryzen 9 5950x 16-Core
32GB DDR4 3800MHz CL16 · 2x 1TB Samsung NVMe RAID 0 · 16GB Radeon RX 6900XT Liquid Cooled

#3 User is offline   J.English Icon

  • Account: jenglish
  • Main tag: [SnP]
  • Country:
  • Joined: 03-April 11
  • Posts: 119

Posted 21 November 2011 - 10:09 PM

ok. It's a patch for stamina regain made by Emanuele:

--- ioUrbanTerrorServerSource/code/server/server.h	2011-07-02 12:44:01.000000000 +0200
+++ ioUrbanTerrorServerSource/code/server/server.h	2011-07-03 10:50:20.000000000 +0200
@@ -25,6 +25,7 @@
 #include "../qcommon/qcommon.h"
 #include "../game/g_public.h"
 #include "../game/bg_public.h"
+#include "../qcommon/vm_local.h"
 
 //=============================================================================
 
@@ -220,6 +221,7 @@
 	int		lastLoadPositionTime;
 	qboolean	allowGoto;
 	int		lastGotoTime;
+	int		nospeedCount;           // number of frames since the player has zero velocity
 } client_t;
 
 //=============================================================================
@@ -330,6 +332,7 @@
 extern cvar_t     *sv_gotoWaitTime;
 extern cvar_t     *sv_allowLoadPosition;
 extern cvar_t     *sv_loadPositionWaitTime;
+extern cvar_t     *sv_regainStamina;
 
 //===========================================================
 
--- ioUrbanTerrorServerSource/code/server/sv_init.c	2011-07-02 12:44:01.000000000 +0200
+++ ioUrbanTerrorServerSource/code/server/sv_init.c	2011-07-03 10:39:07.000000000 +0200
@@ -710,7 +710,8 @@
 	sv_gotoWaitTime = Cvar_Get("sv_gotoWaitTime", "180", CVAR_ARCHIVE);
 	sv_allowLoadPosition = Cvar_Get("sv_allowLoadPosition", "0", CVAR_ARCHIVE);
 	sv_loadPositionWaitTime = Cvar_Get("sv_loadPositionWaitTime", "180", CVAR_ARCHIVE);    
-	
+	sv_regainStamina = Cvar_Get("sv_regainStamina", "0", CVAR_ARCHIVE);
+
 	// initialize bot cvars so they are listed and can be set before loading the botlib
 	SV_BotInitCvars();
 
--- ioUrbanTerrorServerSource/code/server/sv_main.c	2011-07-02 12:44:01.000000000 +0200
+++ ioUrbanTerrorServerSource/code/server/sv_main.c	2011-07-03 10:49:08.000000000 +0200
@@ -79,6 +79,7 @@
 cvar_t	*sv_gotoWaitTime;
 cvar_t	*sv_allowLoadPosition;
 cvar_t	*sv_loadPositionWaitTime;
+cvar_t *sv_regainStamina;
 
 guidnode_t  *hashRegs[HASH_MAX/2] = {0};
 ipnode_t    *hashIPs[255] = {0};
@@ -891,6 +892,33 @@
 	return qtrue;
 }
 
+static void SV_ResetStamina(void)
+{
+    int i;
+    client_t *cl;
+    playerState_t *ps;
+
+    for (i = 0, cl = svs.clients; i < sv_maxclients->integer; i++, cl++)
+    {
+        if (cl->state != CS_ACTIVE)
+            continue;
+
+        ps = SV_GameClientNum(i);
+
+        if (!ps->velocity[0] && !ps->velocity[1] && !ps->velocity[2])
+        {
+
+            if (++cl->nospeedCount >= sv_regainStamina->integer)
+            {
+                *((int *) (gvm->dataBase + 0x11194 + i * 4220)) = 30240;
+                cl->nospeedCount = 0;
+            }
+        }
+        else
+            cl->nospeedCount = 0;
+    }
+}
+
 /*
 ==================
 SV_Frame
@@ -1016,6 +1044,10 @@
 	// send messages back to the clients
 	SV_SendClientMessages();
 
+	// reset stamina of players with zero velocity
+	if (sv_regainStamina->integer)
+	SV_ResetStamina();
+
 	// send a heartbeat to the master if needed
 	SV_MasterHeartbeat();
 } 


In there he has his own compiling method for ioUrTded.i386 : http://emanuelebruno.it/?p=81
And as you can see in his code he goes "ioUrbanTerrorServerSource/code/server/server.h"
and with the others as well. I noticed this earlier and changed it to remove the ioUrbanTerrorServerSource to make it the same as Rambetter's all throughout the patch but that is the errors your seeing in my first post. (I did not use this patch for my first one).
That first post error is simply moving the goto patch from rambetters "ioquake3-UrT-server-4.1" to the "ioUrT-server-4.1" and not working. I also tried uploading/copying in other patches (I have a few more from Emanuele) but still the same error.
It seems that it does not like any patch that did not originally come in the folder somehow. Or of course it could be something inside the patch because I have no knowledge on patches and coding etc. I simply found the index links (ioUrbanTerrorServerSource/code/server/server.h" and changed those to correspond with Rambetters but if its in the code I'm clueless.

I am creating a jump server, but will also create another few including a couple other patches that Emanuele is currently cooking up so it would be nice to get this to work.
Just by looking at the errors though, some of it works and some doesnt, but because all of them arent it isnt compiling the .i386 file at all using outside patches.

P.S. I tried his compiling method but encounter virtually same problems, however his doesnt compile a .i386 file at all even if I dont change anything.

Cheers for help

This post has been edited by jenglish: 21 November 2011 - 10:11 PM


#4 User is offline   Nitro Icon

  •   QA member   
  • Account: nitro
  • Main tag: |P|
  • Country:
  • Joined: 15-March 10
  • Posts: 1,133

Posted 22 November 2011 - 12:02 AM

That isn't just one patch, its a combined patch that edits multiple files. and like i said you cannot use other patches from someone elses work based on a different version of the source. you would have to find out which lines in each of the files are to be modify and where they are in rambetters version of the source then manually modify those lines or alter the patch to suit rambetters version of the source.

officially modded servers are not supported and you'll probably find it hard to get support on these forums, especially when you use things like goto/load mods.
Lian Li pc-o11dw Der 8auer Edition · Gigabyte x570 Aorus Xtreme · AMD Ryzen 9 5950x 16-Core
32GB DDR4 3800MHz CL16 · 2x 1TB Samsung NVMe RAID 0 · 16GB Radeon RX 6900XT Liquid Cooled

#5 User is offline   J.English Icon

  • Account: jenglish
  • Main tag: [SnP]
  • Country:
  • Joined: 03-April 11
  • Posts: 119

Posted 22 November 2011 - 12:17 AM

ok. then why doesnt goto.patch in rambetters ioquake3-UrT-server-4.1 work in rambetters ioUrT-server-4.1 when i do the command "patch -N -p0 < ./extra-patches/goto.patch"
because I would assume they would work but clearly not for me

bullet_loaderAdvertisement

#6 User is offline   Nitro Icon

  •   QA member   
  • Account: nitro
  • Main tag: |P|
  • Country:
  • Joined: 15-March 10
  • Posts: 1,133

Posted 22 November 2011 - 12:34 AM

i would hazzard a guess that it is probably cause you have not cleaned out your subversion after the previous failed compile.
Lian Li pc-o11dw Der 8auer Edition · Gigabyte x570 Aorus Xtreme · AMD Ryzen 9 5950x 16-Core
32GB DDR4 3800MHz CL16 · 2x 1TB Samsung NVMe RAID 0 · 16GB Radeon RX 6900XT Liquid Cooled

#7 User is offline   J.English Icon

  • Account: jenglish
  • Main tag: [SnP]
  • Country:
  • Joined: 03-April 11
  • Posts: 119

Posted 22 November 2011 - 01:28 AM

ok thats sounds quite possible to me. I will give it a go when I figure out how to clean it :D

hmm ok. been looking around. not exactly sure how. I'm new to dedicated server/linux :D

This post has been edited by jenglish: 22 November 2011 - 03:12 AM


#8 User is offline   Mission85 Icon

Posted 26 November 2011 - 08:55 PM

just do this:

open server.h and server.rej

you will see code with + at the beginning of the line thats the code the patch adds(sure u know this) the code above n below can be used as reference to where you should place that code. copy the +'d code to your server.h where you have determined it is supposed to go.

save and repeat for others that failed and then you should be ready to build the binary.

i have noticed in like for instance the ip2loc patch seems to count on some comment from a different patches code to determine where to position the ip2loc code. that of course caused a problem for me as i dont want to install every patch just to make the one patch work properly.

anyways hope this helps

#9 User is offline   Nitro Icon

  •   QA member   
  • Account: nitro
  • Main tag: |P|
  • Country:
  • Joined: 15-March 10
  • Posts: 1,133

Posted 27 November 2011 - 12:06 AM

View Postjenglish, on 22 November 2011 - 12:17 AM, said:

ok. then why doesnt goto.patch in rambetters ioquake3-UrT-server-4.1 work in rambetters ioUrT-server-4.1 when i do the command "patch -N -p0 < ./extra-patches/goto.patch"
because I would assume they would work but clearly not for me



just noticed this:


ioquake3-urt-server and ioUrt-server are 2 different source codes there for patches can not be swapped from one to the other because patch work on lines for example.

patch1 may say something like - on line 15 add these 3 extra lines.. however on a different source line 15 might have different code and the patch might overwrite that line messing up the original source..
Lian Li pc-o11dw Der 8auer Edition · Gigabyte x570 Aorus Xtreme · AMD Ryzen 9 5950x 16-Core
32GB DDR4 3800MHz CL16 · 2x 1TB Samsung NVMe RAID 0 · 16GB Radeon RX 6900XT Liquid Cooled

#10 User is offline   J.English Icon

  • Account: jenglish
  • Main tag: [SnP]
  • Country:
  • Joined: 03-April 11
  • Posts: 119

Posted 27 November 2011 - 12:06 PM

thanks guys for your help. I now have a grip on getting these patches going. :D:D:D:D
I managed to get reset stamina working by editing the code files myself :D

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942