Finish the "merge" of V_CalcBob.

qw now uses cl.onground instead of pmove's onground (d'oh). nq now has a
dummy spectator flag.
This commit is contained in:
Bill Currie 2012-06-02 14:14:07 +09:00
parent 84b5869b30
commit c8e3cf05d0
3 changed files with 9 additions and 2 deletions

View file

@ -227,6 +227,8 @@ typedef struct {
// frag scoreboard
scoreboard_t *scores; // [cl.maxclients]
int spectator;
int sv_cshifts;
int chase;
int fpd;

View file

@ -114,6 +114,12 @@ V_CalcBob (void)
static double bobtime;
static float bob;
if (cl.spectator)
return 0;
if (cl.onground == -1)
return bob; // just use old value
bobtime += host_frametime;
cycle = bobtime - (int) (bobtime / cl_bobcycle->value) *
cl_bobcycle->value;

View file

@ -41,7 +41,6 @@
#include "client.h"
#include "compat.h"
#include "host.h"
#include "qw/pmove.h"
#include "clview.h"
/*
@ -123,7 +122,7 @@ V_CalcBob (void)
if (cl.spectator)
return 0;
if (onground == -1)
if (cl.onground == -1)
return bob; // just use old value
bobtime += host_frametime;