Saving cg_gunxyz


(TNR360) #1

I just figured out how to line up the sights properly :shock: :lol:

now how can I save the position? or where can I set it?

thanks


(xro) #2

go to cgame/cg_main.c

and then find


	{ &cg_gun_x, "cg_gunX", "0", CVAR_CHEAT },
	{ &cg_gun_y, "cg_gunY", "0", CVAR_CHEAT },
	{ &cg_gun_z, "cg_gunZ", "0", CVAR_CHEAT },

then change it to ur values. But this will make the player have the “iron sight view” all the time.

or you just can make it CVAR_ARCHIVE instead of CVAR_CHEAT and then make a script to toggle it, like:


set ironsight    		"vstr ironsight0"
set ironsight0   		"cg_gunx 1; cg_guny 1; cg_gunz 1; set ironsight vstr ironsight1" // ironsight view
set ironsight1   		"cg_gunx 0; cg_guny 0; cg_gunz 0; set ironsight vstr ironsight0" // normal view

bind c "vstr ironsight"

this is the crappy way to do it, but it works. hope u find a better way to do it : )

Also changing cg_gunxyz just changes in 1st person view in third person it doesnt changes anything…


(TNR360) #3

in efmod/falckonet there is a /zoom in and /zoom out

Im wondering if its in the cfg where I specify it?


(kamikazee) #4

Sorry that I haven’t looked into it yet, but you could try to use NPherno’s MD3 Viewer to see what tags were used in the FalckonET models. I believe there was one tag to define how you should look down the sights, similar to how you zoom to the sniper scope.


(TNR360) #5

we looked there was no “apparent” new tag

TCE uses a taag that isnt animated to tell the game where the sight is, I believe FET models sights are lined up with the position of the sniper scope, so the game knows where to line it up but without going into 2d


(TNR360) #6

xro the problem there is that it affects all guns

I believe FET sights are lined up with the last position of the sniper scope when aiming


(moonShield) #7

And why gun position cvars have to be cheat protected?


(TNR360) #8

good question I dont see how this can be used to someones advantage


(ShadowAgent) #9

maybe because someone could make this ironsight view for himself and be much more accurate (just a tought)


(TNR360) #10

but if the weapon he is using were scoped, it’d get in the way plus stock weapons dont have real sights or sights at all


(ShadowAgent) #11

hmm… i dont know.


(kamikazee) #12

Say, still have this problem?

EDIT: Yes, I know I :bump:'ed a silent thread.


(ShadowAgent) #13

afaik no…


(TNR360) #14

yep still got it