mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-06-01 17:42:30 +00:00
Misc cleanups.
This commit is contained in:
parent
d8dc00f29b
commit
b9c0c95729
5 changed files with 10 additions and 12 deletions
|
@ -36,8 +36,8 @@
|
||||||
char *Info_ValueForKey (char *s, char *key);
|
char *Info_ValueForKey (char *s, char *key);
|
||||||
void Info_RemoveKey (char *s, char *key);
|
void Info_RemoveKey (char *s, char *key);
|
||||||
void Info_RemovePrefixedKeys (char *start, char prefix);
|
void Info_RemovePrefixedKeys (char *start, char prefix);
|
||||||
void Info_SetValueForKey (char *s, char *key, char *value, int maxsize);
|
void Info_SetValueForKey (char *s, char *key, char *value, size_t maxsize);
|
||||||
void Info_SetValueForStarKey (char *s, char *key, char *value, int maxsize);
|
void Info_SetValueForStarKey (char *s, char *key, char *value, size_t maxsize);
|
||||||
void Info_Print (char *s);
|
void Info_Print (char *s);
|
||||||
|
|
||||||
#endif // _INFO_H
|
#endif // _INFO_H
|
||||||
|
|
|
@ -152,5 +152,5 @@ byte COM_BlockSequenceCRCByte (byte *base, int length, int sequence)
|
||||||
|
|
||||||
crc &= 0xff;
|
crc &= 0xff;
|
||||||
|
|
||||||
return crc;
|
return (byte) crc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,7 +190,7 @@ void Info_RemovePrefixedKeys (char *start, char prefix)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Info_SetValueForStarKey (char *s, char *key, char *value, int maxsize)
|
void Info_SetValueForStarKey (char *s, char *key, char *value, size_t maxsize)
|
||||||
{
|
{
|
||||||
char newstr[1024], *v;
|
char newstr[1024], *v;
|
||||||
int c, is_name, is_team;
|
int c, is_name, is_team;
|
||||||
|
@ -257,7 +257,7 @@ void Info_SetValueForStarKey (char *s, char *key, char *value, int maxsize)
|
||||||
*s = 0;
|
*s = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Info_SetValueForKey (char *s, char *key, char *value, int maxsize)
|
void Info_SetValueForKey (char *s, char *key, char *value, size_t maxsize)
|
||||||
{
|
{
|
||||||
if (key[0] == '*')
|
if (key[0] == '*')
|
||||||
{
|
{
|
||||||
|
|
|
@ -135,9 +135,9 @@ void locs_reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
free(locations);
|
free(locations);
|
||||||
locations=0;
|
|
||||||
locations_alloced = 0;
|
locations_alloced = 0;
|
||||||
locations_count = 0;
|
locations_count = 0;
|
||||||
|
locations = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void locs_more()
|
void locs_more()
|
||||||
|
|
|
@ -160,8 +160,7 @@ char *Team_ParseSay (char *s)
|
||||||
location = locs_find(death_location);
|
location = locs_find(death_location);
|
||||||
if (location) {
|
if (location) {
|
||||||
recorded_location = true;
|
recorded_location = true;
|
||||||
memcpy(last_recorded_location, death_location,
|
VectorCopy(death_location, last_recorded_location);
|
||||||
sizeof(last_recorded_location));
|
|
||||||
t1 = location->name;
|
t1 = location->name;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -180,11 +179,10 @@ char *Team_ParseSay (char *s)
|
||||||
case 'l':
|
case 'l':
|
||||||
location:
|
location:
|
||||||
bracket = 0;
|
bracket = 0;
|
||||||
location = locs_find(r_origin);
|
location = locs_find(cl.simorg);
|
||||||
if (location) {
|
if (location) {
|
||||||
recorded_location = true;
|
recorded_location = true;
|
||||||
memcpy(last_recorded_location, r_origin,
|
VectorCopy(cl.simorg, last_recorded_location);
|
||||||
sizeof(last_recorded_location));
|
|
||||||
t1 = location->name;
|
t1 = location->name;
|
||||||
} else
|
} else
|
||||||
snprintf(t2, sizeof(t2), "Unknown!\n");
|
snprintf(t2, sizeof(t2), "Unknown!\n");
|
||||||
|
@ -276,7 +274,7 @@ location:
|
||||||
void Team_Dead ()
|
void Team_Dead ()
|
||||||
{
|
{
|
||||||
died = true;
|
died = true;
|
||||||
memcpy(death_location, r_origin, sizeof(death_location));
|
VectorCopy(cl.simorg, death_location);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Team_NewMap ()
|
void Team_NewMap ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue