Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with Q2pro: Misc fixes & tweaks #423

Merged
merged 3 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/common/pmove.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ typedef struct {
vec3_t forward, right, up;
float frametime;


csurface_t *groundsurface;
cplane_t groundplane;
int groundcontents;

vec3_t previous_origin;
short previous_origin[3];
bool ladder;
} pml_t;

Expand Down Expand Up @@ -981,9 +980,7 @@ static void PM_InitialSnapPosition(void)
for (x = 0; x < 3; x++) {
pm->s.origin[0] = base[0] + offset[x];
if (PM_GoodPosition()) {
pml.origin[0] = pm->s.origin[0] * 0.125f;
pml.origin[1] = pm->s.origin[1] * 0.125f;
pml.origin[2] = pm->s.origin[2] * 0.125f;
VectorScale(pm->s.origin, 0.125f, pml.origin);
VectorCopy(pm->s.origin, pml.previous_origin);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/server/mvd/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1539,11 +1539,11 @@ static bool check_reconnect(gtv_t *gtv)
gtv->last_sent = gtv->last_rcvd = svs.realtime;

if (!NET_StringToAdr(gtv->address, &adr, PORT_SERVER)) {
gtv_dropf(gtv, "Unable to lookup %s\n", gtv->address);
gtv_dropf(gtv, "Unable to lookup %s", gtv->address);
}

if (NET_Connect(&adr, &gtv->stream)) {
gtv_dropf(gtv, "Unable to connect to %s\n",
gtv_dropf(gtv, "Unable to connect to %s",
NET_AdrToString(&adr));
}

Expand Down
8 changes: 4 additions & 4 deletions src/server/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -1403,8 +1403,8 @@ void SV_AlignKeyFrames(client_t *client)
int frameofs = framenum % framediv;
int newnum = frameofs + Q_align(client->framenum, framediv);

Com_DPrintf("[%d] align %d --> %d (num = %d, div = %d, ofs = %d)\n",
sv.framenum, client->framenum, newnum, framenum, framediv, frameofs);
Com_DDPrintf("[%d] align %d --> %d (num = %d, div = %d, ofs = %d)\n",
sv.framenum, client->framenum, newnum, framenum, framediv, frameofs);
client->framenum = newnum;
}

Expand All @@ -1423,8 +1423,8 @@ static void set_client_fps(int value)
framediv = sv.framediv / Q_gcd(sv.framediv, framediv);
framerate = sv.framerate / framediv;

Com_DPrintf("[%d] client div=%d, server div=%d, rate=%d\n",
sv.framenum, framediv, sv.framediv, framerate);
Com_DDPrintf("[%d] client div=%d, server div=%d, rate=%d\n",
sv.framenum, framediv, sv.framediv, framerate);

sv_client->framediv = framediv;

Expand Down
Loading