Implemented fromwad in precache_pic as per csqc specification.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2937 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
85c12e3a9c
commit
f82d20e078
1 changed files with 13 additions and 3 deletions
|
@ -297,13 +297,23 @@ void PF_CL_precache_pic (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
mpic_t *pic;
|
mpic_t *pic;
|
||||||
|
float fromwad;
|
||||||
|
|
||||||
str = PR_GetStringOfs(prinst, OFS_PARM0);
|
str = PR_GetStringOfs(prinst, OFS_PARM0);
|
||||||
|
if (*prinst->callargc > 1)
|
||||||
|
fromwad = G_FLOAT(OFS_PARM1);
|
||||||
|
else
|
||||||
|
fromwad = false;
|
||||||
|
|
||||||
if (cls.state && !sv.active)
|
if (fromwad)
|
||||||
CL_CheckOrEnqueDownloadFile(str, str);
|
pic = Draw_SafePicFromWad(str);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (cls.state && !sv.active)
|
||||||
|
CL_CheckOrEnqueDownloadFile(str, str);
|
||||||
|
|
||||||
pic = Draw_SafeCachePic(str);
|
pic = Draw_SafeCachePic(str);
|
||||||
|
}
|
||||||
|
|
||||||
if (pic)
|
if (pic)
|
||||||
G_INT(OFS_RETURN) = G_INT(OFS_PARM0);
|
G_INT(OFS_RETURN) = G_INT(OFS_PARM0);
|
||||||
|
|
Loading…
Reference in a new issue