From: Rudolf Polzer Date: Fri, 27 May 2011 18:49:46 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/samual/no_dead_airshots' X-Git-Tag: xonotic-v0.5.0~215^2~8 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=7f2227f07a84c570ba8e289d313c7da3453fb55f;hp=c414b7f0f3e2297640d07576e5cc258bc22e756b Merge remote-tracking branch 'origin/samual/no_dead_airshots' --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 0781bfddb0..29d71ce9bd 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -320,7 +320,6 @@ seta cl_hitsound 1 "play a hit notifier sound when you have hit an enemy" set cl_hitsound_antispam_time 0.05 "don't play the hitsound more often than this" seta cl_eventchase_death 0 "camera goes into 3rd person mode when the player is dead" -seta cl_eventchase_intermission 0 "camera goes into 3rd person mode when the match ends" seta cl_eventchase_distance 140 "final camera distance" seta cl_eventchase_speed 1.3 "how fast the camera slides back, 0 is instant" diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index c39daf22ec..8988129904 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -342,7 +342,6 @@ void CSQC_common_hud(void); void PostInit(void); void CSQC_Demo_Camera(); float HUD_WouldDrawScoreboard(); -float view_set; float camera_mode; float reticle_type; string NextFrameCommand; @@ -430,7 +429,7 @@ void CSQC_UpdateView(float w, float h) // event chase camera if(autocvar_chase_active <= 0) // greater than 0 means it's enabled manually, and this code is skipped { - if(spectatee_status >= 0 && (autocvar_cl_eventchase_death && getstati(STAT_HEALTH) <= 0 && !intermission) || (autocvar_cl_eventchase_intermission && intermission)) + if(spectatee_status >= 0 && (autocvar_cl_eventchase_death && getstati(STAT_HEALTH) <= 0 && !intermission) || intermission) { // 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 R_SetView() @@ -464,16 +463,12 @@ void CSQC_UpdateView(float w, float h) } // Render the Scene - if(!intermission || !view_set || (intermission && autocvar_cl_eventchase_intermission)) - { - view_origin = pmove_org + vo; - view_angles = input_angles; - makevectors(view_angles); - view_forward = v_forward; - view_right = v_right; - view_up = v_up; - view_set = 1; - } + view_origin = pmove_org + vo; + view_angles = input_angles; + makevectors(view_angles); + view_forward = v_forward; + view_right = v_right; + view_up = v_up; #ifdef BLURTEST if(time > blurtest_time0 && time < blurtest_time1) @@ -773,7 +768,7 @@ void CSQC_UpdateView(float w, float h) drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, liquidcolor_prev, contentavgalpha * liquidalpha_prev, DRAWFLAG_NORMAL); } - if(autocvar_hud_damage) + if(autocvar_hud_damage && !autocvar_chase_active) { splash_size_x = max(vid_conwidth, vid_conheight); splash_size_y = max(vid_conwidth, vid_conheight); diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index b2a1602686..bf9924a927 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -331,6 +331,5 @@ float autocvar_crosshair_color_by_health; float autocvar_cl_hitsound; float autocvar_cl_hitsound_antispam_time; var float autocvar_cl_eventchase_death = 1; -var float autocvar_cl_eventchase_intermission = 1; var float autocvar_cl_eventchase_distance = 140; var float autocvar_cl_eventchase_speed = 1.3; diff --git a/qcsrc/server/arena.qc b/qcsrc/server/arena.qc index a58ccb2a54..1e9b837d8c 100644 --- a/qcsrc/server/arena.qc +++ b/qcsrc/server/arena.qc @@ -257,7 +257,6 @@ void Arena_Warmup() self.velocity = '0 0 0'; self.avelocity = '0 0 0'; self.movement = '0 0 0'; - //self.fixangle = TRUE; } } diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index ffeba55eb2..51f8cf2c15 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -2674,6 +2674,7 @@ void PlayerPreThink (void) //don't allow the player to turn around while game is paused! if(timeoutStatus == 2) { + // FIXME turn this into CSQC stuff self.v_angle = self.lastV_angle; self.angles = self.lastV_angle; self.fixangle = TRUE; diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index e986341cd0..bba558769e 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -780,7 +780,7 @@ void SV_PlayerPhysics() self.angles_x = random() * 360; self.angles_y = random() * 360; // at least I'm not forcing retardedview by also assigning to angles_z - self.fixangle = 1; + self.fixangle = TRUE; } } diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index 8589a88067..15894f6df0 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -828,33 +828,36 @@ void CL_ExteriorWeaponentity_Think() else self.alpha = 1; - ang_x = bound(sv_pitch_min, self.owner.v_angle_x, sv_pitch_max); - ang_y = 0; - ang_z = 0; - - if(sv_pitch_fixyaw) // workaround for stupid player models that don't aim forward - { - ang_y = self.owner.v_angle_y; - makevectors(ang); - var vector v = v_forward; - var float t = self.tag_entity.frame1time; - var float f = self.tag_entity.frame; - self.tag_entity.frame1time = time; - self.tag_entity.frame = self.tag_entity.anim_idle_x; - gettaginfo(self.tag_entity, self.tag_index); - self.tag_entity.frame1time = t; - self.tag_entity.frame = f; - // untransform v according to this coordinate space - vector w; - w_x = v_forward * v; - w_y = -v_right * v; - w_z = v_up * v; - self.angles = vectoangles(w); - } - else + if (!intermission_running) { - ang_x = -/* don't ask */ang_x; - self.angles = ang; + ang_x = bound(sv_pitch_min, self.owner.v_angle_x, sv_pitch_max); + ang_y = 0; + ang_z = 0; + + if(sv_pitch_fixyaw) // workaround for stupid player models that don't aim forward + { + ang_y = self.owner.v_angle_y; + makevectors(ang); + var vector v = v_forward; + var float t = self.tag_entity.frame1time; + var float f = self.tag_entity.frame; + self.tag_entity.frame1time = time; + self.tag_entity.frame = self.tag_entity.anim_idle_x; + gettaginfo(self.tag_entity, self.tag_index); + self.tag_entity.frame1time = t; + self.tag_entity.frame = f; + // untransform v according to this coordinate space + vector w; + w_x = v_forward * v; + w_y = -v_right * v; + w_z = v_up * v; + self.angles = vectoangles(w); + } + else + { + ang_x = -/* don't ask */ang_x; + self.angles = ang; + } } self.glowmod = self.owner.weaponentity_glowmod; @@ -1257,18 +1260,19 @@ void weapon_thinkf(float fr, float t, void() func) self.weapon_think = func; //dprint("next ", ftos(self.weapon_nextthink), "\n"); - // The shoot animation looks TERRIBLE without animation blending! Yay for moonwalking while shooting! + // The shoot animation looks TERRIBLE without animation blending! Yay for moonwalking while shooting! + //anim = self.anim_shoot; if (restartanim) if (t) if (!self.crouch) // shoot anim stands up, this looks bad { - local vector anim; + vector anim; if(self.weapon == WEP_SHOTGUN && self.BUTTON_ATCK2) + { anim = self.anim_melee; - /*else - anim = self.anim_shoot;*/ - anim_z = anim_y / (t + sys_frametime); - setanim(self, anim, FALSE, TRUE, TRUE); + anim_z = anim_y / (t + sys_frametime); + setanim(self, anim, FALSE, TRUE, TRUE); + } } }; diff --git a/qcsrc/server/g_subs.qc b/qcsrc/server/g_subs.qc index 22c8931bef..c311f3774f 100644 --- a/qcsrc/server/g_subs.qc +++ b/qcsrc/server/g_subs.qc @@ -16,6 +16,9 @@ void spawnfunc_info_null (void) void setanim(entity e, vector anim, float looping, float override, float restart) { + if (!anim) + return; // no animation was given to us! We can't use this. + if (anim_x == e.animstate_startframe) if (anim_y == e.animstate_numframes) if (anim_z == e.animstate_framerate) diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 6ee4e11796..12a15f4f43 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -1529,8 +1529,6 @@ void FixIntermissionClient(entity e) string s; if(!e.autoscreenshot) // initial call { - e.angles = e.v_angle; - e.angles_x = -e.angles_x; e.autoscreenshot = time + 0.8; // used for autoscreenshot e.health = -2342; // first intermission phase; voting phase has positive health (used to decide whether to send SVC_FINALE or not) @@ -1553,11 +1551,6 @@ void FixIntermissionClient(entity e) WriteByte(MSG_ONE, SVC_INTERMISSION); } } - - //e.velocity = '0 0 0'; - //e.fixangle = TRUE; - - // TODO halt weapon animation }