Skip to content

Commit

Permalink
game: remove unused remote_vieworigin
Browse files Browse the repository at this point in the history
  • Loading branch information
0lvin committed Dec 14, 2024
1 parent 253592e commit b5f1fbe
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 29 deletions.
7 changes: 0 additions & 7 deletions src/client/cl_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,13 +761,6 @@ CL_ParsePlayerstate(frame_t *oldframe, frame_t *newframe)
state->maxs[2] = MSG_ReadFloat(&net_message);
}

if (flags & PS_REMOTE_VIEWORIGIN)
{
state->remote_vieworigin[0] = MSG_ReadShort(&net_message);
state->remote_vieworigin[1] = MSG_ReadShort(&net_message);
state->remote_vieworigin[2] = MSG_ReadShort(&net_message);
}

/* parse stats */
MSG_ReadData(&net_message, (byte*)&state->stats[0], sizeof(state->stats));
}
Expand Down
1 change: 0 additions & 1 deletion src/common/header/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ enum clc_ops_e
#define PS_WEAPONFRAME (1 << 13)
#define PS_RDFLAGS (1 << 14)

#define PS_REMOTE_VIEWORIGIN (1 << 16)
#define PS_MINSMAXS (1 << 18)

/*============================================== */
Expand Down
4 changes: 0 additions & 4 deletions src/common/header/shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -1571,10 +1571,6 @@ typedef struct

short stats[MAX_STATS]; /* fast status bar updates */

/* For remote camera views */

vec3_t remote_vieworigin;

// Deltas added to the player model's client determined angles.

vec3_t offsetangles;
Expand Down
10 changes: 8 additions & 2 deletions src/game/g_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2088,6 +2088,7 @@ void misc_remote_camera_think(edict_t *Self)
VectorCopy(Self->enemy->s.origin,Self->s.origin);
}

#if 0
// Update the position on client(s).

if(Self->spawnflags&1)
Expand Down Expand Up @@ -2125,6 +2126,7 @@ void misc_remote_camera_think(edict_t *Self)
}
}
}
#endif
}

// ********************************************************************************************
Expand Down Expand Up @@ -2276,9 +2278,10 @@ void Use_misc_remote_camera(edict_t *Self,edict_t *Other,edict_t *Activator)
int i;

Self->enemy=NULL;

#if 0
for(i=0;i<3;i++)
Self->activator->client->ps.remote_vieworigin[i]=Self->s.origin[i];
#endif
}
else
{
Expand All @@ -2295,9 +2298,10 @@ void Use_misc_remote_camera(edict_t *Self,edict_t *Other,edict_t *Activator)

if(!cl_ent->inuse)
continue;

#if 0
for(j=0;j<3;j++)
cl_ent->client->ps.remote_vieworigin[j]=Self->s.origin[j];
#endif
}
}
}
Expand All @@ -2314,6 +2318,7 @@ void Use_misc_remote_camera(edict_t *Self,edict_t *Other,edict_t *Activator)
VectorCopy(Self->enemy->s.origin,Self->s.origin);
}

#if 0
// Update the position on client(s).

if(Self->spawnflags&1)
Expand Down Expand Up @@ -2351,6 +2356,7 @@ void Use_misc_remote_camera(edict_t *Self,edict_t *Other,edict_t *Activator)
}
}
}
#endif
}
}
// ********************************************************************************************
Expand Down
15 changes: 0 additions & 15 deletions src/server/sv_entities.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,6 @@ SV_WritePlayerstateToClient(client_frame_t *from, client_frame_t *to,
pflags |= PS_WEAPONFRAME;
}

if (ps->remote_vieworigin[0] != ops->remote_vieworigin[0] ||
ps->remote_vieworigin[1] != ops->remote_vieworigin[1] ||
ps->remote_vieworigin[2] != ops->remote_vieworigin[2])
{

pflags |= PS_REMOTE_VIEWORIGIN;
}

if (ps->mins[0] != ops->mins[0] || ps->mins[1] != ops->mins[1] || ps->mins[2] != ops->mins[2] ||
ps->maxs[0] != ops->maxs[0] || ps->maxs[1] != ops->maxs[1] || ps->maxs[2] != ops->maxs[2])
{
Expand Down Expand Up @@ -404,13 +396,6 @@ SV_WritePlayerstateToClient(client_frame_t *from, client_frame_t *to,
MSG_WriteFloat(msg, ps->maxs[2]);
}

if (pflags & PS_REMOTE_VIEWORIGIN)
{
MSG_WriteShort(msg, ps->remote_vieworigin[0]);
MSG_WriteShort(msg, ps->remote_vieworigin[1]);
MSG_WriteShort(msg, ps->remote_vieworigin[2]);
}

/* send stats */
MSG_WriteData(msg, (byte *)&ps->stats[0], sizeof(ps->stats));
}
Expand Down

0 comments on commit b5f1fbe

Please sign in to comment.