Jump to content

Changing sabers without rejoining


Recommended Posts

Posted

Hi guys! I wonder whether such a thing is even possible - if it is, I have literally no idea where should I start. In the source code there are way too many functions involving sabers settings and I can't figure out which one is actually responsible for setting my saber. I'm really bored with necessity of rejoining the game to make my saber change...

TIA for your answers  :) !
 

Posted

i think u need take look for the function ClientUserinfoChanged in g_client.c for most of user info, so if u want "update" settings everytime when you set a command i think u need play with that :P

eezstreet likes this
Posted

Type /saber in the console once you've selected a new hilt in MP and it will force your client to reload the saber to the new hilt instantly without rejoining. Providing I understood what you were asking.

MB2 Beta Tester / MB2 FA Assistant Dev

Posted

i think u need take look for the function ClientUserinfoChanged in g_client.c for most of user info, so if u want "update" settings everytime when you set a command i think u need play with that :P

Thanks, I will look forward into these :D !

 

Type /saber in the console once you've selected a new hilt in MP and it will force your client to reload the saber to the new hilt instantly without rejoining. Providing I understood what you were asking.

Apparently this command doesn't work for me as intented. I'm playing on Legacy RP - I forgot to mention -_- .

Posted

I've worked a bit with OJP 1.2 source code and if I remember correctly, Legacy RP is somehow based on Open Jedi Project, so my tips may be useful for you.

 

From my experience a lot depends on changedSaber qboolean - it is originally located in ClientSpawn function, which contains the whole saber assign system. What I did was just copying all that saber-related stuff into ClientUserinfoChanged function and changing one of two changedSaber variables to qfalse (although I don't remember which one exactly should be changed). This solution worked perfectly fine in my case but only for single sabers - unfortunately changing saber_single for saber_staff and going into spectator was crashing the server. Why? Oh God, I'd like to know :P

Posted

EWWW OJP Legacy jk I used to use OJP for a time but stopped rp'in on it cos I was so bad with the mod.

MB2 Beta Tester / MB2 FA Assistant Dev

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...