Team Switching in DS ONLINE

Discussions about modding, questions, mod requests or just show off what you're working on.
Post Reply
shady
Posts: 10
Joined: 01 Feb 2016, 14:01

Team Switching in DS ONLINE

Post by shady » 17 Mar 2016, 00:44

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?

User avatar
fau
Staff
Posts: 414
Joined: 16 Aug 2015, 01:01
Location: Warsaw / Poland
Contact:

Re: Team Switching in DS ONLINE

Post by fau » 17 Mar 2016, 00:56

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.

shady
Posts: 10
Joined: 01 Feb 2016, 14:01

Re: Team Switching in DS ONLINE

Post by shady » 31 Mar 2016, 21:05

awesome im gonna go try it thanks a lot!

shady
Posts: 10
Joined: 01 Feb 2016, 14:01

Re: Team Switching in DS ONLINE

Post by shady » 31 Mar 2016, 22:01

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!

User avatar
Tr!Force
Posts: 425
Joined: 26 Feb 2015, 12:25
Location: Chile
Contact:

Re: Team Switching in DS ONLINE

Post by Tr!Force » 01 Apr 2016, 12:43

this is a basejk bug or ds online bug?

:o
Image
"The dark side? I've been there. Do your worst." - Kyle Katarn
  • In-Game Nick Name: Tr!Force
  • JK2 & JK3 Code-Mod Developer
  • Jedi Knight Plus Mod Project: Click Here
  • E-Mail: triforce@gznetwork.com

User avatar
fau
Staff
Posts: 414
Joined: 16 Aug 2015, 01:01
Location: Warsaw / Poland
Contact:

Re: Team Switching in DS ONLINE

Post by fau » 01 Apr 2016, 23:06

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.

shady
Posts: 10
Joined: 01 Feb 2016, 14:01

Re: Team Switching in DS ONLINE

Post by shady » 18 Apr 2016, 03:17

yeah im not sure i was able to force teams in twimod by just forcing it on the client

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest

Created by Matti from StylesFactory.pl and Warlords of Draenor (modified by jk2.info)
Powered by phpBB® Forum Software © phpBB Limited
GZIP: On
 

 

cron