Page 1 of 1

Team Switching in DS ONLINE

Posted: 17 Mar 2016, 00:44
by shady
Hey everyone, ive been working on a mod using ds online 1.32 as a base. im very close to finishing something but ive ran into an issue with forcing team switching when dying.

in player_die i have expections set that when a player is on the blue team and he dies he is switched to red team. What happens is sort of weird, because you will respawn on the red team with the HUD showing in red but the clientskin is still blue and you still show up in blue on the scoreboard. When you press Escape and pull up your character options it fixes the issue right away without you having to actually do anything besides pull up that menu.
Any ideas?

Re: Team Switching in DS ONLINE

Posted: 17 Mar 2016, 00:56
by fau
You need to recalculate ranks and resend userinfo:
https://github.com/aufau/SaberMod/blob/ ... L992-L1028

You will run into a problem described here:
viewtopic.php?f=32&t=441
Let me know if you code a working solution.

Re: Team Switching in DS ONLINE

Posted: 31 Mar 2016, 21:05
by shady
awesome im gonna go try it thanks a lot!

Re: Team Switching in DS ONLINE

Posted: 31 Mar 2016, 22:01
by shady
that worked! great idea! I had no issue with the original code when i was using twimod but DS was not working with it and you helped me out i appreciate it!

Re: Team Switching in DS ONLINE

Posted: 01 Apr 2016, 12:43
by Tr!Force
this is a basejk bug or ds online bug?

:o

Re: Team Switching in DS ONLINE

Posted: 01 Apr 2016, 23:06
by fau
It's not a bug, this is how game changes your team when you eg. type "team red" in the console. It isn't very intuitive, but this is due to a messy architecture of jk2/q3 modules. Every time I do something with a global/external variable I check all it's concurrences in source code. Fortunately it's small enough to make this feasible, so maybe architecture isn't wrong at all? There are many positives in avoiding unnecessary abstraction.

Re: Team Switching in DS ONLINE

Posted: 18 Apr 2016, 03:17
by shady
yeah im not sure i was able to force teams in twimod by just forcing it on the client