Autojoin

Get support for anything JK2 related, find tutorials for in-game and modding topics, and post any suggestions for the site here.
Post Reply
User avatar
jozuf
Posts: 57
Joined: 14 Aug 2015, 10:24

Autojoin

Post by jozuf »

Hi,

I got the problem on my server, that when someone is in spec and clicks on "change force settings" he will insta join the game rather than stay spec.
Now I heard from some1 that there's a pk3 which will prevent that.

Does any1 have this pk3 or knows another way to prevent it?

Thx!
User avatar
ouned
Administrator
Posts: 596
Joined: 23 Feb 2015, 13:03
Location: Gliese581c

Re: Autojoin

Post by ouned »

not entirely sure but I think it is a serverside, 1.02 problem.
If I remember correctly people removed the forcechanged command to prevent that.
User avatar
Boothand
Administrator
Posts: 986
Joined: 24 Feb 2015, 08:21
Contact:

Re: Autojoin

Post by Boothand »

I thought the removal of the forcechanged command was a workaround to prevent the old forcechanged crash
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: Autojoin

Post by Daggolin »

As far as I know the problem is that clicking in the 1.02 menu sends "forcechanged none" to server and forcechanged with a parameter triggers a team-change on the serverside. The way I solved it on [DARK] was by adding the following line to the server's mod in "void Cmd_ForceChanged_f( gentity_t *ent )" (g_cmds.c), right before the team change:

Code: Select all

if ( !Q_stricmp(arg, "none") || !Q_stricmp(arg, "same") || !Q_stricmp(arg, ";") ) return; // Daggolin: 1.02 clients send those and trigger team-changes...
I hope this help you. ;)

//Edit: As Boothand just mentioned the forcechanged command getting removed, patching that out of the game is probably what the pk3 you mentioned did (probably containing a patched jk2mpgame.qvm).
User avatar
jozuf
Posts: 57
Joined: 14 Aug 2015, 10:24

Re: Autojoin

Post by jozuf »

Boothand wrote:I thought the removal of the forcechanged command was a workaround to prevent the old forcechanged crash
Yeah that's what I thought too. Maybe the autojoin fix was a side effect of that ^-^.
User avatar
jozuf
Posts: 57
Joined: 14 Aug 2015, 10:24

Re: Autojoin

Post by jozuf »

Daggolin wrote:As far as I know the problem is that clicking in the 1.02 menu sends "forcechanged none" to server and forcechanged with a parameter triggers a team-change on the serverside. The way I solved it on [DARK] was by adding the following line to the server's mod in "void Cmd_ForceChanged_f( gentity_t *ent )" (g_cmds.c), right before the team change:

Code: Select all

if ( !Q_stricmp(arg, "none") || !Q_stricmp(arg, "same") || !Q_stricmp(arg, ";") ) return; // Daggolin: 1.02 clients send those and trigger team-changes...
I hope this help you. ;)
Thx, but I wanted to stay vanilla basejk :-D
User avatar
ouned
Administrator
Posts: 596
Joined: 23 Feb 2015, 13:03
Location: Gliese581c

Re: Autojoin

Post by ouned »

why?
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: Autojoin

Post by Daggolin »

jozuf wrote:
Daggolin wrote:As far as I know the problem is that clicking in the 1.02 menu sends "forcechanged none" to server and forcechanged with a parameter triggers a team-change on the serverside. The way I solved it on [DARK] was by adding the following line to the server's mod in "void Cmd_ForceChanged_f( gentity_t *ent )" (g_cmds.c), right before the team change:

Code: Select all

if ( !Q_stricmp(arg, "none") || !Q_stricmp(arg, "same") || !Q_stricmp(arg, ";") ) return; // Daggolin: 1.02 clients send those and trigger team-changes...
I hope this help you. ;)
Thx, but I wanted to stay vanilla basejk :-D
Daggolin wrote://Edit: As Boothand just mentioned the forcechanged command getting removed, patching that out of the game is probably what the pk3 you mentioned did (probably containing a patched jk2mpgame.qvm).
Vanilla isn't exactly what I would call a modifed jk2mpgame.qvm in a pk3. :mrgreen:
User avatar
jozuf
Posts: 57
Joined: 14 Aug 2015, 10:24

Re: Autojoin

Post by jozuf »

ouned wrote:why?
Hoped for a quickfix. 2 lazy to compile :(
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: Autojoin

Post by Daggolin »

jozuf wrote:
ouned wrote:why?
Hoped for a quickfix. 2 lazy to compile :(
The pk3 probably contained a HEX-edited qvm. :P
Anyway, compiling a fix should only take you 5 minutes with the above codepiece. Faster than replying here. :P
User avatar
jozuf
Posts: 57
Joined: 14 Aug 2015, 10:24

Re: Autojoin

Post by jozuf »

Daggolin wrote:
jozuf wrote:
ouned wrote:why?
Hoped for a quickfix. 2 lazy to compile :(
The pk3 probably contained a HEX-edited qvm. :P
Anyway, compiling a fix should only take you 5 minutes with the above codepiece. Faster than replying here. :P
Yes you're right, but I need that qvm compiler for Linux first. Meh
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: Autojoin

Post by Daggolin »

I think I only have that on my laptop. :/
You could clone ioq3 and compile the required tools for linux, but that's a bit more than 5 minutes. :lol:
User avatar
jozuf
Posts: 57
Joined: 14 Aug 2015, 10:24

Re: Autojoin

Post by jozuf »

Eventually I'm going to investigate further sometime, maybe.

Thx for the help guys.

Also: Speedthread.
User avatar
fau
Staff
Posts: 433
Joined: 16 Aug 2015, 01:01
Location: Warsaw / Poland
Contact:

Re: Autojoin

Post by fau »

jozuf wrote:Yes you're right, but I need that qvm compiler for Linux first. Meh
https://github.com/aufau/jk2sdk-gpl/tree/vanilla

`make tools'

edit: code is for 1.04 though.
User avatar
jozuf
Posts: 57
Joined: 14 Aug 2015, 10:24

Re: Autojoin

Post by jozuf »

Thx, I used the ioq3 stuff for now, I suppose it's the same?
User avatar
fau
Staff
Posts: 433
Joined: 16 Aug 2015, 01:01
Location: Warsaw / Poland
Contact:

Re: Autojoin

Post by fau »

Tools (q3asm, lcc) are the same.
Post Reply
Created by Matti from StylesFactory.pl and Warlords of Draenor (modified by jk2.info)
Powered by phpBB® Forum Software © phpBB Limited
 

 

cron