mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2025-02-20 18:42:34 +00:00
A '&' before an array variable is at best ignored, at worst it could do
weird stuff.
This commit is contained in:
parent
c11b3873ff
commit
19fd8a6816
7 changed files with 12 additions and 12 deletions
|
@ -84,7 +84,7 @@ typedef struct
|
|||
} glpic_t;
|
||||
|
||||
byte conback_buffer[sizeof(qpic_t) + sizeof(glpic_t)];
|
||||
qpic_t *conback = (qpic_t *)&conback_buffer;
|
||||
qpic_t *conback = (qpic_t *)conback_buffer;
|
||||
|
||||
int gl_lightmap_format = 4;
|
||||
int gl_solid_format = 3;
|
||||
|
|
|
@ -307,8 +307,8 @@ void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr)
|
|||
{
|
||||
fread (&numcommands, 4, 1, f);
|
||||
fread (&numorder, 4, 1, f);
|
||||
fread (&commands, numcommands * sizeof(commands[0]), 1, f);
|
||||
fread (&vertexorder, numorder * sizeof(vertexorder[0]), 1, f);
|
||||
fread (commands, numcommands * sizeof(commands[0]), 1, f);
|
||||
fread (vertexorder, numorder * sizeof(vertexorder[0]), 1, f);
|
||||
fclose (f);
|
||||
}
|
||||
else
|
||||
|
@ -339,8 +339,8 @@ void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr)
|
|||
{
|
||||
fwrite (&numcommands, 4, 1, f);
|
||||
fwrite (&numorder, 4, 1, f);
|
||||
fwrite (&commands, numcommands * sizeof(commands[0]), 1, f);
|
||||
fwrite (&vertexorder, numorder * sizeof(vertexorder[0]), 1, f);
|
||||
fwrite (commands, numcommands * sizeof(commands[0]), 1, f);
|
||||
fwrite (vertexorder, numorder * sizeof(vertexorder[0]), 1, f);
|
||||
fclose (f);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -360,7 +360,7 @@ void Cam_Track(usercmd_t *cmd)
|
|||
|
||||
VectorCopy(player->viewangles, cl.viewangles);
|
||||
VectorCopy(player->origin, desired_position);
|
||||
if (memcmp(&desired_position, &self->origin, sizeof(desired_position)) != 0) {
|
||||
if (memcmp(desired_position, self->origin, sizeof(desired_position)) != 0) {
|
||||
MSG_WriteByte (&cls.netchan.message, clc_tmove);
|
||||
MSG_WriteCoord (&cls.netchan.message, desired_position[0]);
|
||||
MSG_WriteCoord (&cls.netchan.message, desired_position[1]);
|
||||
|
|
|
@ -922,7 +922,7 @@ void CL_ConnectionlessPacket (void)
|
|||
data[4] = A2A_ACK;
|
||||
data[5] = 0;
|
||||
|
||||
NET_SendPacket (6, &data, net_from);
|
||||
NET_SendPacket (6, data, net_from);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,8 +75,8 @@ CL_ClearTEnts
|
|||
*/
|
||||
void CL_ClearTEnts (void)
|
||||
{
|
||||
memset (&cl_beams, 0, sizeof(cl_beams));
|
||||
memset (&cl_explosions, 0, sizeof(cl_explosions));
|
||||
memset (cl_beams, 0, sizeof(cl_beams));
|
||||
memset (cl_explosions, 0, sizeof(cl_explosions));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1587,7 +1587,7 @@ pack_t *COM_LoadPackFile (char *packfile)
|
|||
newfiles = Z_Malloc (numpackfiles * sizeof(packfile_t));
|
||||
|
||||
fseek (packhandle, header.dirofs, SEEK_SET);
|
||||
fread (&info, 1, header.dirlen, packhandle);
|
||||
fread (info, 1, header.dirlen, packhandle);
|
||||
|
||||
// crc the directory to check for modifications
|
||||
crc = CRC_Block((byte *)info, header.dirlen);
|
||||
|
|
|
@ -87,13 +87,13 @@ void NetadrToSockadr (netadr_t *a, struct sockaddr_in *s)
|
|||
memset (s, 0, sizeof(*s));
|
||||
s->sin_family = AF_INET;
|
||||
|
||||
*(int *)&s->sin_addr = *(int *)&a->ip;
|
||||
*(int *)&s->sin_addr = *(int *)a->ip;
|
||||
s->sin_port = a->port;
|
||||
}
|
||||
|
||||
void SockadrToNetadr (struct sockaddr_in *s, netadr_t *a)
|
||||
{
|
||||
*(int *)&a->ip = *(int *)&s->sin_addr;
|
||||
*(int *)a->ip = *(int *)&s->sin_addr;
|
||||
a->port = s->sin_port;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue