fix a few casting issues allowing maps such as warpa, etc. to load (probably not done here)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3028 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
8af647d7d4
commit
828b3e99ab
5 changed files with 16 additions and 16 deletions
|
@ -1660,14 +1660,14 @@ qboolean CMod_LoadLeafs (lump_t *l)
|
|||
}
|
||||
|
||||
out->contents = LittleLong (in->contents);
|
||||
out->cluster = LittleShort (in->cluster);
|
||||
out->cluster = (unsigned short)LittleShort (in->cluster);
|
||||
out->area = LittleShort (in->area);
|
||||
out->firstleafbrush = LittleShort (in->firstleafbrush);
|
||||
out->numleafbrushes = LittleShort (in->numleafbrushes);
|
||||
out->firstleafbrush = (unsigned short)LittleShort (in->firstleafbrush);
|
||||
out->numleafbrushes = (unsigned short)LittleShort (in->numleafbrushes);
|
||||
|
||||
out->firstmarksurface = loadmodel->marksurfaces +
|
||||
LittleShort(in->firstleafface);
|
||||
out->nummarksurfaces = LittleShort(in->numleaffaces);
|
||||
(unsigned short)LittleShort(in->firstleafface);
|
||||
out->nummarksurfaces = (unsigned short)LittleShort(in->numleaffaces);
|
||||
|
||||
if (out->cluster >= numclusters)
|
||||
numclusters = out->cluster + 1;
|
||||
|
|
|
@ -2032,8 +2032,8 @@ qboolean GLMod_LoadLeafs (lump_t *l)
|
|||
out->contents = p;
|
||||
|
||||
out->firstmarksurface = loadmodel->marksurfaces +
|
||||
LittleShort(in->firstmarksurface);
|
||||
out->nummarksurfaces = LittleShort(in->nummarksurfaces);
|
||||
(unsigned short)LittleShort(in->firstmarksurface);
|
||||
out->nummarksurfaces = (unsigned short)LittleShort(in->nummarksurfaces);
|
||||
|
||||
p = LittleLong(in->visofs);
|
||||
if (p == -1)
|
||||
|
@ -2416,8 +2416,8 @@ qboolean GLMod_LoadMarksurfaces (lump_t *l)
|
|||
|
||||
for ( i=0 ; i<count ; i++)
|
||||
{
|
||||
j = LittleShort(in[i]);
|
||||
if (j < 0 || j >= loadmodel->numsurfaces)
|
||||
j = (unsigned short)LittleShort(in[i]);
|
||||
if (j >= loadmodel->numsurfaces)
|
||||
{
|
||||
Con_Printf (CON_ERROR "Mod_ParseMarksurfaces: bad surface number\n");
|
||||
return false;
|
||||
|
|
|
@ -10737,7 +10737,7 @@ BuiltinList_t BuiltinList[] = { //nq qw h2 ebfs
|
|||
{"sqlerror", PF_sqlerror, 0, 0, 0, 255}, // #255 string(float serveridx, [float queryidx]) sqlerror (FTE_SQL)
|
||||
{"sqlescape", PF_sqlescape, 0, 0, 0, 256}, // #256 string(float serveridx, string data) sqlescape (FTE_SQL)
|
||||
{"sqlversion", PF_sqlversion, 0, 0, 0, 257}, // #257 string(float serveridx) sqlversion (FTE_SQL)
|
||||
{"sqlreadfloat", PF_sqlreadfloat, 0, 0, 0, 258}, // #258 float(float serveridx, float queryidx, float row, float column) sqlreadfield (FTE_SQL)
|
||||
{"sqlreadfloat", PF_sqlreadfloat, 0, 0, 0, 258}, // #258 float(float serveridx, float queryidx, float row, float column) sqlreadfloat (FTE_SQL)
|
||||
#endif
|
||||
|
||||
//EXT_CSQC
|
||||
|
|
|
@ -1193,8 +1193,8 @@ qboolean Mod_LoadLeafs (lump_t *l)
|
|||
out->contents = p;
|
||||
|
||||
out->firstmarksurface = loadmodel->marksurfaces +
|
||||
LittleShort(in->firstmarksurface);
|
||||
out->nummarksurfaces = LittleShort(in->nummarksurfaces);
|
||||
(unsigned short)LittleShort(in->firstmarksurface);
|
||||
out->nummarksurfaces = (unsigned short)LittleShort(in->nummarksurfaces);
|
||||
|
||||
p = LittleLong(in->visofs);
|
||||
if (p == -1)
|
||||
|
@ -1387,7 +1387,7 @@ void Mod_LoadMarksurfaces (lump_t *l)
|
|||
|
||||
for ( i=0 ; i<count ; i++)
|
||||
{
|
||||
j = LittleShort(in[i]);
|
||||
j = (unsigned short)LittleShort(in[i]);
|
||||
if (j >= loadmodel->numsurfaces)
|
||||
SV_Error ("Mod_ParseMarksurfaces: bad surface number");
|
||||
out[i] = loadmodel->surfaces + j;
|
||||
|
|
|
@ -1509,8 +1509,8 @@ qboolean SWMod_LoadLeafs (lump_t *l)
|
|||
out->contents = p;
|
||||
|
||||
out->firstmarksurface = loadmodel->marksurfaces +
|
||||
LittleShort(in->firstmarksurface);
|
||||
out->nummarksurfaces = LittleShort(in->nummarksurfaces);
|
||||
(unsigned short)LittleShort(in->firstmarksurface);
|
||||
out->nummarksurfaces = (unsigned short)LittleShort(in->nummarksurfaces);
|
||||
|
||||
p = LittleLong(in->visofs);
|
||||
if (p == -1)
|
||||
|
@ -1845,7 +1845,7 @@ qboolean SWMod_LoadMarksurfaces (lump_t *l)
|
|||
|
||||
for ( i=0 ; i<count ; i++)
|
||||
{
|
||||
j = LittleShort(in[i]);
|
||||
j = (unsigned short)LittleShort(in[i]);
|
||||
if (j >= loadmodel->numsurfaces)
|
||||
{
|
||||
Con_Printf (CON_ERROR "Mod_ParseMarksurfaces: bad surface number\n");
|
||||
|
|
Loading…
Reference in a new issue