mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 07:11:41 +00:00
Handle quest format brushes.
Bah, I forgot I needed to fix the vertex count parsing when I did the script lexing change.
This commit is contained in:
parent
ea541b325d
commit
db25d5597d
2 changed files with 22 additions and 6 deletions
|
@ -643,11 +643,19 @@ ParseVerts (script_t *script, int *n_verts)
|
|||
{
|
||||
vec3_t *verts;
|
||||
int i;
|
||||
const char *token;
|
||||
|
||||
if (strcmp (Script_Token (script), ":"))
|
||||
token = Script_Token (script);
|
||||
if (token[0] != ':')
|
||||
Sys_Error ("parsing map file");
|
||||
Script_GetToken (script, false);
|
||||
*n_verts = atoi (Script_Token (script));
|
||||
// It's normally ":count", but somebody might have done ": count"
|
||||
if (!token[1]) {
|
||||
Script_GetToken (script, false);
|
||||
token = Script_Token (script);
|
||||
} else {
|
||||
token++;
|
||||
}
|
||||
*n_verts = atoi (token);
|
||||
verts = malloc (sizeof (vec3_t) * *n_verts);
|
||||
|
||||
for (i = 0; i < *n_verts; i++) {
|
||||
|
|
|
@ -207,11 +207,19 @@ ParseVerts (int *n_verts)
|
|||
{
|
||||
vec3_t *verts;
|
||||
int i;
|
||||
const char *token;
|
||||
|
||||
if (map_script->token->str[0] != ':')
|
||||
token = Script_Token (map_script);
|
||||
if (token[0] != ':')
|
||||
map_error ("parsing brush");
|
||||
Script_GetToken (map_script, false);
|
||||
*n_verts = atoi (map_script->token->str);
|
||||
// It's normally ":count", but somebody might have done ": count"
|
||||
if (!token[1]) {
|
||||
Script_GetToken (map_script, false);
|
||||
token = Script_Token (map_script);
|
||||
} else {
|
||||
token++;
|
||||
}
|
||||
*n_verts = atoi (token);
|
||||
verts = malloc (sizeof (vec3_t) * *n_verts);
|
||||
|
||||
for (i = 0; i < *n_verts; i++) {
|
||||
|
|
Loading…
Reference in a new issue