mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
Added a special skyrotate worldspawn key for q2 style rotating skys.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1471 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
e3e01642bc
commit
0665911e31
1 changed files with 24 additions and 10 deletions
|
@ -466,6 +466,9 @@ void Mod_ParseInfoFromEntityLump(char *data) //actually, this should be in the m
|
|||
{
|
||||
extern model_t *loadmodel;
|
||||
char key[128];
|
||||
char skyname[64];
|
||||
float skyrotate;
|
||||
vec3_t skyaxis;
|
||||
|
||||
wads[0] = '\0';
|
||||
|
||||
|
@ -476,16 +479,13 @@ void Mod_ParseInfoFromEntityLump(char *data) //actually, this should be in the m
|
|||
|
||||
R_SetSky("", 0, r_origin);
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
if (!(data=COM_Parse(data))) //read the map info.
|
||||
return; // error
|
||||
if (com_token[0] != '{')
|
||||
return; // error
|
||||
if (data)
|
||||
if ((data=COM_Parse(data))) //read the map info.
|
||||
if (com_token[0] == '{')
|
||||
while (1)
|
||||
{
|
||||
if (!(data=COM_Parse(data)))
|
||||
return; // error
|
||||
break; // error
|
||||
if (com_token[0] == '}')
|
||||
break; // end of worldspawn
|
||||
if (com_token[0] == '_')
|
||||
|
@ -493,7 +493,7 @@ void Mod_ParseInfoFromEntityLump(char *data) //actually, this should be in the m
|
|||
else
|
||||
strcpy(key, com_token);
|
||||
if (!((data=COM_Parse(data))))
|
||||
return; // error
|
||||
break; // error
|
||||
if (!strcmp("wad", key)) // for HalfLife maps
|
||||
{
|
||||
if (loadmodel->fromgame == fg_halflife)
|
||||
|
@ -504,13 +504,27 @@ void Mod_ParseInfoFromEntityLump(char *data) //actually, this should be in the m
|
|||
}
|
||||
else if (!strcmp("skyname", key)) // for HalfLife maps
|
||||
{
|
||||
R_SetSky(com_token, 0, r_origin);
|
||||
Q_strncpyz(skyname, com_token, sizeof(skyname));
|
||||
}
|
||||
else if (!strcmp("sky", key)) // for Quake2 maps
|
||||
{
|
||||
R_SetSky(com_token, 0, r_origin);
|
||||
Q_strncpyz(skyname, com_token, sizeof(skyname));
|
||||
}
|
||||
else if (!strcmp("skyrotate", key) || !strcmp("skyrotate", key))
|
||||
{
|
||||
char *s;
|
||||
Q_strncpyz(key, com_token, sizeof(key));
|
||||
s = COM_Parse(key);
|
||||
skyaxis[0] = atof(s);
|
||||
s = COM_Parse(s);
|
||||
skyaxis[1] = atof(s);
|
||||
COM_Parse(s);
|
||||
skyaxis[2] = atof(s);
|
||||
}
|
||||
}
|
||||
|
||||
skyrotate = VectorNormalize(skyaxis);
|
||||
R_SetSky(skyname, skyrotate, skyaxis);
|
||||
}
|
||||
|
||||
//textures/fred.wad is the DP standard - I wanna go for that one.
|
||||
|
|
Loading…
Reference in a new issue