mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-23 04:12:39 +00:00
Fix more warnings
This commit is contained in:
parent
6665ea4a49
commit
7277d8d6e7
3 changed files with 8 additions and 4 deletions
|
@ -527,13 +527,13 @@ int BotVoiceChatCommand(bot_state_t *bs, int mode, char *voiceChat) {
|
||||||
|
|
||||||
Q_strncpyz(buf, voiceChat, sizeof(buf));
|
Q_strncpyz(buf, voiceChat, sizeof(buf));
|
||||||
cmd = buf;
|
cmd = buf;
|
||||||
for (ptr = cmd; *cmd && *cmd > ' '; cmd++);
|
for (; *cmd && *cmd > ' '; cmd++);
|
||||||
while (*cmd && *cmd <= ' ') *cmd++ = '\0';
|
while (*cmd && *cmd <= ' ') *cmd++ = '\0';
|
||||||
//voiceOnly = atoi(ptr);
|
//voiceOnly = atoi(ptr);
|
||||||
for (ptr = cmd; *cmd && *cmd > ' '; cmd++);
|
for (ptr = cmd; *cmd && *cmd > ' '; cmd++);
|
||||||
while (*cmd && *cmd <= ' ') *cmd++ = '\0';
|
while (*cmd && *cmd <= ' ') *cmd++ = '\0';
|
||||||
clientNum = atoi(ptr);
|
clientNum = atoi(ptr);
|
||||||
for (ptr = cmd; *cmd && *cmd > ' '; cmd++);
|
for (; *cmd && *cmd > ' '; cmd++);
|
||||||
while (*cmd && *cmd <= ' ') *cmd++ = '\0';
|
while (*cmd && *cmd <= ' ') *cmd++ = '\0';
|
||||||
//color = atoi(ptr);
|
//color = atoi(ptr);
|
||||||
|
|
||||||
|
|
|
@ -368,10 +368,14 @@ void RespawnItem( gentity_t *ent ) {
|
||||||
|
|
||||||
choice = rand() % count;
|
choice = rand() % count;
|
||||||
|
|
||||||
for (count = 0, ent = master; count < choice; ent = ent->teamchain, count++)
|
for (count = 0, ent = master; ent && count < choice; ent = ent->teamchain, count++)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ent) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ent->r.contents = CONTENTS_TRIGGER;
|
ent->r.contents = CONTENTS_TRIGGER;
|
||||||
ent->s.eFlags &= ~EF_NODRAW;
|
ent->s.eFlags &= ~EF_NODRAW;
|
||||||
ent->r.svFlags &= ~SVF_NOCLIENT;
|
ent->r.svFlags &= ~SVF_NOCLIENT;
|
||||||
|
|
|
@ -1614,7 +1614,7 @@ int R_StitchPatches( int grid1num, int grid2num ) {
|
||||||
}
|
}
|
||||||
for (m = 0; m < 2; m++) {
|
for (m = 0; m < 2; m++) {
|
||||||
|
|
||||||
if (grid2->height >= MAX_GRID_SIZE)
|
if (!grid2 || grid2->height >= MAX_GRID_SIZE)
|
||||||
break;
|
break;
|
||||||
if (m) offset2 = grid2->width-1;
|
if (m) offset2 = grid2->width-1;
|
||||||
else offset2 = 0;
|
else offset2 = 0;
|
||||||
|
|
Loading…
Reference in a new issue