From: Samual Lenks Date: Mon, 4 Feb 2013 03:37:55 +0000 (-0500) Subject: More logical cvar names... X-Git-Tag: xonotic-v0.7.0~102^2~6 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5b3eab87a3606cbaccfed97870a1e8041afebbb8;p=xonotic%2Fxonotic-data.pk3dir.git More logical cvar names... --- diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 1323078f2..8087d6f8d 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -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)); diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 9c563fbb9..2835240b0 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -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 diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 691f8621c..bbb74d73c 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -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;