]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
More logical cvar names...
authorSamual Lenks <samual@xonotic.org>
Mon, 4 Feb 2013 03:37:55 +0000 (22:37 -0500)
committerSamual Lenks <samual@xonotic.org>
Mon, 4 Feb 2013 03:37:55 +0000 (22:37 -0500)
qcsrc/client/View.qc
qcsrc/common/constants.qh
qcsrc/server/cl_client.qc

index 1323078f22c6e4919fdd9e8e35b2465a4010dd03..8087d6f8da818ebf5e05432f7facd64eae40c8b9 100644 (file)
@@ -454,7 +454,7 @@ void CSQC_UpdateView(float w, float h)
                if(spectatee_status >= 0 && (autocvar_cl_eventchase_death && getstati(STAT_HEALTH) <= 0 && !intermission) || intermission)
                {
                        // make special vector since we can't use view_origin (It is one frame old as of this code, it gets set later with the results this code makes.)
-                       vector current_view_origin = (getpropertyvec(VF_ORIGIN) + autocvar_sv_player_spectate_viewoffset);
+                       vector current_view_origin = (getpropertyvec(VF_ORIGIN) + autocvar_sv_spectator_viewoffset);
 
                        // We must enable chase_active to get a third person view (weapon viewmodel hidden and own player model showing).
                        // Ideally, there should be another way to enable third person cameras, such as through setproperty()
@@ -479,7 +479,7 @@ void CSQC_UpdateView(float w, float h)
                        makevectors(view_angles);
 
                        vector eventchase_target_origin = (current_view_origin - (v_forward * eventchase_current_distance));
-                       WarpZone_TraceBox(current_view_origin, autocvar_sv_player_spectate_mins, autocvar_sv_player_spectate_maxs, eventchase_target_origin, MOVE_WORLDONLY, self);
+                       WarpZone_TraceBox(current_view_origin, autocvar_sv_spectator_mins, autocvar_sv_spectator_maxs, eventchase_target_origin, MOVE_WORLDONLY, self);
                        
                        setproperty(VF_ORIGIN, ((trace_startsolid) ? current_view_origin : trace_endpos)); 
                        setproperty(VF_ANGLES, WarpZone_TransformVAngles(WarpZone_trace_transform, view_angles));
index 9c563fbb9bb67b4d1c7c17f904b9bec1e33d4843..2835240b04aadcb3f8e6120f62d8d0e13da208d4 100644 (file)
@@ -577,11 +577,12 @@ noref var vector autocvar_sv_player_viewoffset = '0 0 20';
 noref var vector autocvar_sv_player_crouch_maxs = '16 16 25';
 noref var vector autocvar_sv_player_crouch_mins = '-16 -16 -24';
 noref var vector autocvar_sv_player_crouch_viewoffset = '0 0 20';
-noref var vector autocvar_sv_player_spectate_maxs = '12 12 8';
-noref var vector autocvar_sv_player_spectate_mins = '-12 -12 -8';
-noref var vector autocvar_sv_player_spectate_viewoffset = '0 0 20';
 noref var vector autocvar_sv_player_headsize = '24 24 12';
 
+noref var vector autocvar_sv_spectator_maxs = '12 12 8';
+noref var vector autocvar_sv_spectator_mins = '-12 -12 -8';
+noref var vector autocvar_sv_spectator_viewoffset = '0 0 20';
+
 #define PL_VIEW_OFS autocvar_sv_player_viewoffset
 #define PL_MIN autocvar_sv_player_mins
 #define PL_MAX autocvar_sv_player_maxs
index 691f8621c6f8b35b14c5f80b0057a248fb720aff..bbb74d73cd42a9d26a658d1343fcafcbb3472946 100644 (file)
@@ -482,7 +482,7 @@ void PutObserverInServer (void)
        self.fixangle = TRUE;
        self.crouch = FALSE;
 
-       setorigin (self, (spot.origin + PL_VIEW_OFS)); // offset it so that the spectator spawns higher off the ground, looks better this way
+       setorigin (self, (spot.origin + autocvar_sv_spectator_viewoffset)); // offset it so that the spectator spawns higher off the ground, looks better this way
        self.prevorigin = self.origin;
        self.items = 0;
        WEPSET_CLEAR_E(self);
@@ -491,7 +491,7 @@ void PutObserverInServer (void)
        setmodel(self, "null");
        self.drawonlytoclient = self;
 
-       setsize (self, PL_CROUCH_MIN, PL_CROUCH_MAX); // give the spectator some space between walls for MOVETYPE_FLY_WORLDONLY
+       setsize (self, autocvar_sv_spectator_mins, autocvar_sv_spectator_maxs); // give the spectator some space between walls for MOVETYPE_FLY_WORLDONLY
        self.view_ofs = '0 0 0'; // so that your view doesn't go into the ceiling with MOVETYPE_FLY_WORLDONLY, previously "PL_VIEW_OFS"
 
        self.weapon = 0;