mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-01-18 14:31:52 +00:00
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;
|
||||
mpic_t *pic;
|
||||
float fromwad;
|
||||
|
||||
str = PR_GetStringOfs(prinst, OFS_PARM0);
|
||||
if (*prinst->callargc > 1)
|
||||
fromwad = G_FLOAT(OFS_PARM1);
|
||||
else
|
||||
fromwad = false;
|
||||
|
||||
if (cls.state && !sv.active)
|
||||
CL_CheckOrEnqueDownloadFile(str, str);
|
||||
if (fromwad)
|
||||
pic = Draw_SafePicFromWad(str);
|
||||
else
|
||||
{
|
||||
if (cls.state && !sv.active)
|
||||
CL_CheckOrEnqueDownloadFile(str, str);
|
||||
|
||||
pic = Draw_SafeCachePic(str);
|
||||
pic = Draw_SafeCachePic(str);
|
||||
}
|
||||
|
||||
if (pic)
|
||||
G_INT(OFS_RETURN) = G_INT(OFS_PARM0);
|
||||
|
|
Loading…
Reference in a new issue