Jump to content

Cvar_Restart_f being triggered for no reason?


Recommended Posts

Posted

Um, so I've been having this problem. I have no code mods at all on my JASP, no OpenJK, no nothing. But as I've said in this topic (http://jkhub.org/topic/2326-my-jaconfig-hates-me-it-keeps-resetting/), I have this problem:

 

Everytime I exec my initialize.cfg ingame, and load a savegame or devmap (I have to do this or it won't reset), once I exit, on the next session a cvar_restart is triggered upon the game launching and everything is gone, from my user-set cvars to my video settings and my controls. At least I'm almost positive this is what is happening.

 

Here's what the initialize config looks like:

 

 

seta ui_mblockbutton 1
seta ui_meleebutton 1
seta ui_glowintensity "seta r_dynamicglowintensity 1.13f"
vstr ui_glowintensity
seta ui_holsterbutton "bind - weapon0"
vstr ui_holsterbutton
seta ui_cameracontrols "bind p vstr camera"
vstr ui_cameracontrols
seta tipcyclenext 1
vstr tip1
seta ui_saberautoaim "seta g_saberautoaim 1"
vstr ui_saberautoaim
seta ui_saberatkrolling "seta g_sabermovespeed 1"
vstr ui_saberatkrolling
set bob 1
sets bob 1
seta bob 1
setu bob 1

 

 

 

I thought maybe it was an issue with the r_dynamicglowintensity which is a cheat-protected cvar, but after taking that out I still had the same problems.

 

The main things I've found in the code are this cvar_restart_f, and the console command ingame called cvar_restart. Visual Studio was showing that no calls are made to the cvar_restart_f function from nowhere else in the code, so I can't figure out what's causing this.

 

The only thing it checks for in it's declaration/definition or whatever in the cvar.cpp is that it checks for "safe" on the command line to see if it should run (automatically?). I am NOT running the game in safe mode however, so unless the game is adding this to it's command line by itself or something, so that shouldn't be what's happening.

Posted

Type "safe" in the console and see what pops up.

Also I'm pretty sure vstrs don't save. A lot of the stuff you've got in that script is extremely redundant.

Posted

Type "safe" in the console and see what pops up.

Also I'm pretty sure vstrs don't save. A lot of the stuff you've got in that script is extremely redundant.

 

Says unknown command in the main menu, and no response ingame for typing safe.

 

And vstrs do save under certain circumstances. All the stuff in the script is so certain menu items relying on those cvars displays correctly. The bob thing on the end is just a test variable I left in to see if I could figure out what was causing this.

 

Also, in the topic actually, I'm not sure if cvar_restart_f is what the game calls. It's actually in the check for com_safemode in the code where it says about a "cvar_restart" somewhere, which I mixed up. Cvar_restart_f is just the coding for the command I think.

Posted

"safe" only exists on command-line to determine of skipping the relevant game config (ie: jaconfig.cfg / openjk_sp.cfg etc), its not a real command or a real cvar.

 

Also, the dynamic glow cvars have been removed of their cheat status in OJK (and just a few minutes ago also in OJK SP)

 

I really doubt anything is actually calling cvar_restart, rather config just isn't being saved or loaded as per safe-mode as explained.

Posted

Oh, then try com_safemode perhaps. May I ask what this script is for?

 

That's not a cvar; I already tried :P. And like I said it's for mah menu items. A menu item that operates using ui_glowintensity won't work right if ui_glowintensity doesn't exist. I need to set it first.

 

And I've tried everything now just short of using OpenJK. I tried reinstalling the game, setting the jaconfig as read-only (which the game still deleted it and made a new one with all the defaults), and I don't know what else to do.

Posted

How would I do that? I know how to save a .txt as a .bat file but what would I write in it exactly?

 

EDIT: Can I make a .bat file that just runs JASP? I've been using a custom shortcut for adding command line commands to the game but I haven't gotten anywhere.

Posted

So I've isolated the problem to these two lines in my initialize.cfg:

 
seta ui_saberautoaim "seta g_saberautoaim 1"
vstr ui_saberautoaim
 
Everything else works fine. Why? This whole time, it's really been just these two fracking lines of script causing ALL my problems? Heh. Must be some hardcoded cvar value conflict. Either way, it really disturbs me something so small could cause so much trouble.
Posted

Now it's doing it again...

 

EDIT: Seems that I have to remove both the commands pertaining to g_saberautoaim and r_dynamicglowintensity from the config. Part of the reason for the .cfg not working was I left a copy in one of my .pk3s that had those commands and would exec along with the config that didn't?

Posted

So, I think the problem is this simple:

 

JA doesn't like being forced to remember cheat-protected cvars or cvars that aren't loaded by the main menu (g_saberautoaim is loaded ingame) by seta commands and what not under certain circumstances.

Posted

I can with helpusobi 1. I can't control the game wigging out though because I'm trying to save them between sessions.

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...