Mercury: thanks for pointing out that the player entity number /is/ cl.playernum+1. I've undone my +1 removals.

This commit is contained in:
Bill Currie 2000-04-12 08:49:37 +00:00
parent 6cf291e970
commit 1603855e58
5 changed files with 10 additions and 9 deletions

View file

@ -1318,7 +1318,7 @@ void CL_RelinkEntities (void)
ent->forcelink = false; ent->forcelink = false;
if (i == cl.playernum && !cl_chasecam->value) if (i == cl.playernum + 1 && !cl_chasecam->value)
continue; continue;
#ifdef QUAKE2 #ifdef QUAKE2

View file

@ -453,11 +453,11 @@ CL_UpdateBeams (void)
continue; continue;
// if coming from the player, update the start position // if coming from the player, update the start position
if (b->entity == cl.playernum) { if (b->entity == cl.playernum + 1) {
#ifdef QUAKEWORLD #ifdef QUAKEWORLD
VectorCopy (cl.simorg, b->start); VectorCopy (cl.simorg, b->start);
#elif UQUAKE #elif UQUAKE
VectorCopy (cl_entities[cl.playernum].origin, VectorCopy (cl_entities[cl.playernum + 1].origin,
b->start); b->start);
#endif #endif
} }

View file

@ -619,7 +619,7 @@ void R_DrawEntitiesOnList (void)
{ {
currententity = &cl_visedicts[i]; currententity = &cl_visedicts[i];
#ifdef UQUAKE #ifdef UQUAKE
if (currententity == &cl_entities[cl.playernum]) if (currententity == &cl_entities[cl.playernum + 1])
continue; // don't draw the player continue; // don't draw the player
#endif // QUAKEWORLD #endif // QUAKEWORLD

View file

@ -383,7 +383,7 @@ V_ParseDamage ( void )
#ifdef QUAKEWORLD #ifdef QUAKEWORLD
VectorSubtract (from, cl.simorg, from); VectorSubtract (from, cl.simorg, from);
#else #else
ent = &cl_entities[cl.playernum]; ent = &cl_entities[cl.playernum + 1];
VectorSubtract (from, ent->origin, from); VectorSubtract (from, ent->origin, from);
#endif #endif
@ -615,7 +615,7 @@ V_BoundOffsets ( void )
#ifdef UQUAKE #ifdef UQUAKE
entity_t *ent; entity_t *ent;
ent = &cl_entities[cl.playernum]; ent = &cl_entities[cl.playernum + 1];
#endif #endif
#ifdef QUAKEWORLD #ifdef QUAKEWORLD
@ -679,7 +679,7 @@ V_CalcViewRoll (void)
#ifdef QUAKEWORLD #ifdef QUAKEWORLD
side = V_CalcRoll (cl.simangles, cl.simvel); side = V_CalcRoll (cl.simangles, cl.simvel);
#else #else
side = V_CalcRoll (cl_entities[cl.playernum].angles, cl.velocity); side = V_CalcRoll (cl_entities[cl.playernum + 1].angles, cl.velocity);
#endif #endif
r_refdef.viewangles[ROLL] += side; r_refdef.viewangles[ROLL] += side;
@ -716,7 +716,7 @@ V_CalcIntermissionRefdef ( void )
// view is the weapon model // view is the weapon model
#ifdef UQUAKE #ifdef UQUAKE
// ent is the player model (visible when out of body) // ent is the player model (visible when out of body)
ent = &cl_entities[cl.playernum]; ent = &cl_entities[cl.playernum + 1];
// view is the weapon model (only visible from inside body) // view is the weapon model (only visible from inside body)
#endif #endif
view = &cl.viewent; view = &cl.viewent;
@ -761,7 +761,7 @@ V_CalcRefdef ( void )
#ifdef UQUAKE #ifdef UQUAKE
// ent is the player model (visible when out of body) // ent is the player model (visible when out of body)
ent = &cl_entities[cl.playernum]; ent = &cl_entities[cl.playernum + 1];
#endif #endif
// view is the weapon model (only visible from inside body) // view is the weapon model (only visible from inside body)
view = &cl.viewent; view = &cl.viewent;

View file

@ -642,6 +642,7 @@ void CL_ParseServerMessage (void)
case svc_setview: case svc_setview:
cl.playernum = MSG_ReadShort (); cl.playernum = MSG_ReadShort ();
cl.playernum--;
break; break;
case svc_lightstyle: case svc_lightstyle: