Client: Make sure we're respecting .viewzoom of a target that we spectate in first-person.
This commit is contained in:
parent
7560bc12b8
commit
24c869d9aa
4 changed files with 10 additions and 0 deletions
|
@ -263,10 +263,17 @@ CSQC_UpdateView(float w, float h, float focus)
|
|||
spec = (NSClientSpectator)self;
|
||||
|
||||
if (spec.spec_mode == SPECMODE_FIRSTPERSON || spec.spec_mode == SPECMODE_THIRDPERSON) {
|
||||
NSClientPlayer spec_target;
|
||||
c = findfloat(world, ::entnum, spec.spec_ent);
|
||||
spec_target = (NSClientPlayer)c;
|
||||
pSeat->m_vecPredictedOrigin = c.origin;
|
||||
pSeat->m_vecPredictedVelocity = c.velocity;
|
||||
pSeat->m_flPredictedFlags = c.flags;
|
||||
|
||||
if (spec.spec_mode == SPECMODE_FIRSTPERSON)
|
||||
setproperty(VF_AFOV, cvar("fov") * spec_target.viewzoom);
|
||||
else
|
||||
setproperty(VF_AFOV, cvar("fov"));
|
||||
} else {
|
||||
pSeat->m_vecPredictedOrigin = spec.origin;
|
||||
pSeat->m_vecPredictedVelocity = spec.velocity;
|
||||
|
|
|
@ -85,6 +85,7 @@ NSClient::predraw(void)
|
|||
void
|
||||
NSClient::NSClient(void)
|
||||
{
|
||||
flags |= FL_CLIENT;
|
||||
XR_Init(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -980,5 +980,6 @@ NSClientPlayer::InputUse_Up(void)
|
|||
void
|
||||
NSClientPlayer::NSClientPlayer(void)
|
||||
{
|
||||
flags |= FL_CLIENT;
|
||||
vehicle = __NULL__;
|
||||
}
|
||||
|
|
|
@ -450,6 +450,7 @@ NSClientSpectator::PostFrame(void)
|
|||
void
|
||||
NSClientSpectator::NSClientSpectator(void)
|
||||
{
|
||||
flags |= FL_CLIENT;
|
||||
}
|
||||
|
||||
#ifdef CLIENT
|
||||
|
|
Loading…
Reference in a new issue