[qw] Rename view_message to view_state

Makes more sense to me.
This commit is contained in:
Bill Currie 2021-03-11 12:47:08 +09:00
parent abaccbec53
commit c9bbc2971a

View file

@ -82,7 +82,7 @@ cvar_t *v_idlescale;
float v_dmg_time, v_dmg_roll, v_dmg_pitch;
frame_t *view_frame;
player_state_t *view_message;
player_state_t *view_state;
cshift_t cshift_empty = { {130, 80, 50}, 0};
cshift_t cshift_water = { {130, 80, 50}, 128};
@ -189,7 +189,7 @@ V_DriftPitch (void)
int frameno = (cls.netchan.outgoing_sequence - 1) & UPDATE_MASK;
usercmd_t *cmd = &cl.frames[frameno].cmd;
if (view_message->onground == -1 || cls.demoplayback) {
if (view_state->onground == -1 || cls.demoplayback) {
cl.driftmove = 0;
cl.pitchvel = 0;
return;
@ -600,7 +600,7 @@ V_CalcViewRoll (void)
v_dmg_time -= host_frametime;
}
if (view_message->pls.flags & PF_DEAD) // PF_GIB will also set PF_DEAD
if (view_state->pls.flags & PF_DEAD) // PF_GIB will also set PF_DEAD
r_data->refdef->viewangles[ROLL] = 80; // dead view angle
}
@ -700,12 +700,12 @@ V_CalcRefdef (void)
else if (r_data->scr_viewsize->int_val == 80)
view->origin[2] += 0.5;
if (view_message->pls.flags & (PF_GIB | PF_DEAD)) {
if (view_state->pls.flags & (PF_GIB | PF_DEAD)) {
view->renderer.model = NULL;
} else {
view->renderer.model = cl.model_precache[cl.stats[STAT_WEAPON]];
}
view->animation.frame = view_message->pls.weaponframe;
view->animation.frame = view_state->pls.weaponframe;
view->renderer.skin = 0;
// set up the refresh position
@ -755,11 +755,11 @@ V_RenderView (void)
return;
view_frame = &cl.frames[cls.netchan.incoming_sequence & UPDATE_MASK];
view_message = &view_frame->playerstate[cl.playernum];
view_state = &view_frame->playerstate[cl.playernum];
if (view_message->pls.flags & PF_GIB)
if (view_state->pls.flags & PF_GIB)
cl.viewheight = 8; // gib view height
else if (view_message->pls.flags & PF_DEAD)
else if (view_state->pls.flags & PF_DEAD)
cl.viewheight = -16; // corpse view height
else {
cl.viewheight = DEFAULT_VIEWHEIGHT; // view height