Skip to content

Commit

Permalink
game: remove unused remote_viewangles
Browse files Browse the repository at this point in the history
  • Loading branch information
0lvin committed Dec 14, 2024
1 parent 2fcfac0 commit 253592e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 26 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ To check:
* [ ] MAX_MODELS/MAX_SOUND define hardcode,
* [ ] no action on button press,
* [x] soft,gl3,vk render has incorrect angles (used same angle in all renders).
* [ ] correctly implement misc_remote_camera.

Minimal file set from Loki release:
```
Expand Down
7 changes: 0 additions & 7 deletions src/client/cl_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,13 +768,6 @@ CL_ParsePlayerstate(frame_t *oldframe, frame_t *newframe)
state->remote_vieworigin[2] = MSG_ReadShort(&net_message);
}

if (flags & PS_REMOTE_VIEWANGLES)
{
state->remote_viewangles[0] = MSG_ReadShort(&net_message);
state->remote_viewangles[1] = MSG_ReadShort(&net_message);
state->remote_viewangles[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_VIEWANGLES (1 << 15)
#define PS_REMOTE_VIEWORIGIN (1 << 16)
#define PS_MINSMAXS (1 << 18)

Expand Down
3 changes: 1 addition & 2 deletions src/common/header/shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -1573,8 +1573,7 @@ typedef struct

/* For remote camera views */

vec3_t remote_vieworigin,
remote_viewangles;
vec3_t remote_vieworigin;

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

Expand Down
6 changes: 4 additions & 2 deletions src/game/g_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2143,7 +2143,7 @@ void misc_remote_camera_think(edict_t *Self)
Self->s.angles[PITCH]=-Self->s.angles[PITCH];

// Update the angles on client(s).

#if 0
if(Self->spawnflags&1)
{
// Just for the activator.
Expand Down Expand Up @@ -2179,6 +2179,7 @@ void misc_remote_camera_think(edict_t *Self)
}
}
}
#endif
}

// Think again or remove myself?
Expand Down Expand Up @@ -2363,7 +2364,7 @@ void Use_misc_remote_camera(edict_t *Self,edict_t *Other,edict_t *Activator)
Self->s.angles[PITCH]=-Self->s.angles[PITCH];

// Update the angles on client(s).

#if 0
if(Self->spawnflags&1)
{
// Just for the activator.
Expand Down Expand Up @@ -2399,6 +2400,7 @@ void Use_misc_remote_camera(edict_t *Self,edict_t *Other,edict_t *Activator)
}
}
}
#endif

// ********************************************************************************************
// Setup next think stuff.
Expand Down
14 changes: 0 additions & 14 deletions src/server/sv_entities.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,6 @@ SV_WritePlayerstateToClient(client_frame_t *from, client_frame_t *to,
pflags |= PS_REMOTE_VIEWORIGIN;
}

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

pflags |= PS_REMOTE_VIEWANGLES;
}

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 @@ -418,13 +411,6 @@ SV_WritePlayerstateToClient(client_frame_t *from, client_frame_t *to,
MSG_WriteShort(msg, ps->remote_vieworigin[2]);
}

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

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

0 comments on commit 253592e

Please sign in to comment.