Generic non-descript commit message

git-svn-id: https://svn.eduke32.com/eduke32@1440 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2009-06-24 08:20:10 +00:00
parent 5fcbdf3dd1
commit 3d0c34863d
21 changed files with 2867 additions and 3538 deletions

View file

@ -1522,16 +1522,16 @@ void overheadeditor(void)
drawlinepat = 0xffffffff;
Bsprintf(tempbuf,"(%d,%d)",mousxplc,mousyplc);
/*
i = (Bstrlen(tempbuf)<<3)+6;
if ((searchx+i) < (xdim2d-1))
i = 0;
else i = (searchx+i)-(xdim2d-1);
if ((searchy+16) < (ydim2d-STATUS2DSIZ2-1))
j = 0;
else j = (searchy+16)-(ydim2d-STATUS2DSIZ2-1);
printext16(searchx+6-i,searchy+6-j,editorcolors[11],-1,tempbuf,0);
*/
/*
i = (Bstrlen(tempbuf)<<3)+6;
if ((searchx+i) < (xdim2d-1))
i = 0;
else i = (searchx+i)-(xdim2d-1);
if ((searchy+16) < (ydim2d-STATUS2DSIZ2-1))
j = 0;
else j = (searchy+16)-(ydim2d-STATUS2DSIZ2-1);
printext16(searchx+6-i,searchy+6-j,editorcolors[11],-1,tempbuf,0);
*/
_printmessage16(tempbuf);
}
drawline16(searchx,0,searchx,8,editorcolors[15]);
@ -2115,12 +2115,12 @@ void overheadeditor(void)
// for (i=0; i<numsectors; i++)
// if (inside(mousxplc,mousyplc,i) == 1)
{
ydim16 = STATUS2DSIZ;
ExtShowSectorData((int16_t)0/*i*/);
ydim16 = ydim-STATUS2DSIZ2;
{
ydim16 = STATUS2DSIZ;
ExtShowSectorData((int16_t)0/*i*/);
ydim16 = ydim-STATUS2DSIZ2;
// break;
}
}
}
if (keystatus[0x40]) //F6
{

View file

@ -5946,7 +5946,7 @@ void drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,
// struct s_maskleaf* branch[MAXWALLSB];
// int32_t drawing;
// } _maskleaf;
//
//
// _maskleaf maskleaves[MAXWALLSB];
// returns equation of a line given two points
@ -6826,7 +6826,7 @@ int32_t loadboard(char *filename, char fromwhere, int32_t *daposx, int32_t *dapo
#if defined(POLYMOST) && defined(USE_OPENGL)
Bmemset(spriteext, 0, sizeof(spriteext_t) * MAXSPRITES);
Bmemset(spritesmooth, 0, sizeof(spritesmooth_t) * (MAXSPRITES+MAXUNIQHUDID));
Bmemset(spritesmooth, 0, sizeof(spritesmooth_t) *(MAXSPRITES+MAXUNIQHUDID));
# ifdef POLYMER
if (rendmode == 4)
@ -7309,7 +7309,7 @@ int32_t loadoldboard(char *filename, char fromwhere, int32_t *daposx, int32_t *d
#if defined(POLYMOST) && defined(USE_OPENGL)
memset(spriteext, 0, sizeof(spriteext_t) * MAXSPRITES);
memset(spritesmooth, 0, sizeof(spritesmooth_t) * (MAXSPRITES+MAXUNIQHUDID));
memset(spritesmooth, 0, sizeof(spritesmooth_t) *(MAXSPRITES+MAXUNIQHUDID));
#endif
guniqhudid = 0;
@ -7372,7 +7372,7 @@ int32_t loadmaphack(char *filename)
if (!script) return -1;
memset(spriteext, 0, sizeof(spriteext_t) * MAXSPRITES);
memset(spritesmooth, 0, sizeof(spritesmooth_t) * (MAXSPRITES+MAXUNIQHUDID));
memset(spritesmooth, 0, sizeof(spritesmooth_t) *(MAXSPRITES+MAXUNIQHUDID));
while (1)
{
@ -7776,7 +7776,7 @@ int32_t setgamemode(char davidoption, int32_t daxdim, int32_t daydim, int32_t da
#ifdef POLYMER
&& glrendmode != 4
#endif // POLYMER
)
)
return(0);
strcpy(kensmessage,"!!!! BUILD engine&tools programmed by Ken Silverman of E.G. RI. (c) Copyright 1995 Ken Silverman. Summary: BUILD = Ken. !!!!");

File diff suppressed because it is too large Load diff

View file

@ -85,12 +85,12 @@ void freevbos()
}
}
if (allocvbos)
{
bglDeleteBuffersARB(allocvbos, indexvbos);
bglDeleteBuffersARB(allocvbos, vertvbos);
allocvbos = 0;
}
if (allocvbos)
{
bglDeleteBuffersARB(allocvbos, indexvbos);
bglDeleteBuffersARB(allocvbos, vertvbos);
allocvbos = 0;
}
}
void freeallmodels()
@ -1458,7 +1458,9 @@ static void md3postload(md3model_t* m)
m->head.frames[framei].max.x = frameverts[verti].x;
m->head.frames[framei].max.y = frameverts[verti].y;
m->head.frames[framei].max.z = frameverts[verti].z;
} else {
}
else
{
if (m->head.frames[framei].min.x > frameverts[verti].x)
m->head.frames[framei].min.x = frameverts[verti].x;
if (m->head.frames[framei].max.x < frameverts[verti].x)
@ -2354,11 +2356,11 @@ static void addquad(int32_t x0, int32_t y0, int32_t z0, int32_t x1, int32_t y1,
for (yy=0; yy<VOXBORDWIDTH; yy++)
{
Bmemcpy(&gvox->mytex[(shp[z].y+yy)*gvox->mytexx+shp[z].x],
&gvox->mytex[(shp[z].y+VOXBORDWIDTH)*gvox->mytexx+shp[z].x],
(x+(VOXBORDWIDTH<<1))<<2);
&gvox->mytex[(shp[z].y+VOXBORDWIDTH)*gvox->mytexx+shp[z].x],
(x+(VOXBORDWIDTH<<1))<<2);
Bmemcpy(&gvox->mytex[(shp[z].y+y+yy+VOXBORDWIDTH)*gvox->mytexx+shp[z].x],
&gvox->mytex[(shp[z].y+y-1+VOXBORDWIDTH)*gvox->mytexx+shp[z].x],
(x+(VOXBORDWIDTH<<1))<<2);
&gvox->mytex[(shp[z].y+y-1+VOXBORDWIDTH)*gvox->mytexx+shp[z].x],
(x+(VOXBORDWIDTH<<1))<<2);
}
qptr = &gvox->quad[gvox->qcnt];

File diff suppressed because it is too large Load diff

View file

@ -1876,85 +1876,85 @@ int32_t osdcmd_cvar_set(const osdfuncparm_t *parm)
switch (cvars[i].type&(CVAR_FLOAT|CVAR_DOUBLE|CVAR_INT|CVAR_UINT|CVAR_BOOL|CVAR_STRING))
{
case CVAR_FLOAT:
{
float val;
if (showval)
{
float val;
if (showval)
{
OSD_Printf("\"%s\" is \"%f\"\n%s\n",cvars[i].name,*(float*)cvars[i].var,(char*)cvars[i].helpstr);
return OSDCMD_OK;
}
sscanf(parm->parms[0], "%f", &val);
if (val < cvars[i].min || val > cvars[i].max)
{
OSD_Printf("%s value out of range\n",cvars[i].name);
return OSDCMD_OK;
}
*(float*)cvars[i].var = val;
if (!OSD_ParsingScript())
OSD_Printf("%s %f",cvars[i].name,val);
OSD_Printf("\"%s\" is \"%f\"\n%s\n",cvars[i].name,*(float*)cvars[i].var,(char*)cvars[i].helpstr);
return OSDCMD_OK;
}
break;
sscanf(parm->parms[0], "%f", &val);
if (val < cvars[i].min || val > cvars[i].max)
{
OSD_Printf("%s value out of range\n",cvars[i].name);
return OSDCMD_OK;
}
*(float*)cvars[i].var = val;
if (!OSD_ParsingScript())
OSD_Printf("%s %f",cvars[i].name,val);
}
break;
case CVAR_DOUBLE:
{
double val;
if (showval)
{
double val;
if (showval)
{
OSD_Printf("\"%s\" is \"%f\"\n%s\n",cvars[i].name,*(double*)cvars[i].var,(char*)cvars[i].helpstr);
return OSDCMD_OK;
}
sscanf(parm->parms[0], "%lf", &val);
if (val < cvars[i].min || val > cvars[i].max)
{
OSD_Printf("%s value out of range\n",cvars[i].name);
return OSDCMD_OK;
}
*(double*)cvars[i].var = val;
if (!OSD_ParsingScript())
OSD_Printf("%s %f",cvars[i].name,val);
OSD_Printf("\"%s\" is \"%f\"\n%s\n",cvars[i].name,*(double*)cvars[i].var,(char*)cvars[i].helpstr);
return OSDCMD_OK;
}
break;
sscanf(parm->parms[0], "%lf", &val);
if (val < cvars[i].min || val > cvars[i].max)
{
OSD_Printf("%s value out of range\n",cvars[i].name);
return OSDCMD_OK;
}
*(double*)cvars[i].var = val;
if (!OSD_ParsingScript())
OSD_Printf("%s %f",cvars[i].name,val);
}
break;
case CVAR_INT:
case CVAR_UINT:
case CVAR_BOOL:
{
int32_t val;
if (showval)
{
int32_t val;
if (showval)
{
OSD_Printf("\"%s\" is \"%d\"\n%s\n",cvars[i].name,*(int32_t*)cvars[i].var,(char*)cvars[i].helpstr);
return OSDCMD_OK;
}
val = atoi(parm->parms[0]);
if (cvars[i].type & CVAR_BOOL) val = val != 0;
if (val < cvars[i].min || val > cvars[i].max)
{
OSD_Printf("%s value out of range\n",cvars[i].name);
return OSDCMD_OK;
}
*(int32_t*)cvars[i].var = val;
if (!OSD_ParsingScript())
OSD_Printf("%s %d",cvars[i].name,val);
OSD_Printf("\"%s\" is \"%d\"\n%s\n",cvars[i].name,*(int32_t*)cvars[i].var,(char*)cvars[i].helpstr);
return OSDCMD_OK;
}
break;
val = atoi(parm->parms[0]);
if (cvars[i].type & CVAR_BOOL) val = val != 0;
if (val < cvars[i].min || val > cvars[i].max)
{
OSD_Printf("%s value out of range\n",cvars[i].name);
return OSDCMD_OK;
}
*(int32_t*)cvars[i].var = val;
if (!OSD_ParsingScript())
OSD_Printf("%s %d",cvars[i].name,val);
}
break;
case CVAR_STRING:
{
if (showval)
{
if (showval)
{
OSD_Printf("\"%s\" is \"%s\"\n%s\n",cvars[i].name,(char*)cvars[i].var,(char*)cvars[i].helpstr);
return OSDCMD_OK;
}
Bstrncpy((char*)cvars[i].var, parm->parms[0], cvars[i].extra-1);
((char*)cvars[i].var)[cvars[i].extra-1] = 0;
if (!OSD_ParsingScript())
OSD_Printf("%s %s",cvars[i].name,(char*)cvars[i].var);
OSD_Printf("\"%s\" is \"%s\"\n%s\n",cvars[i].name,(char*)cvars[i].var,(char*)cvars[i].helpstr);
return OSDCMD_OK;
}
break;
Bstrncpy((char*)cvars[i].var, parm->parms[0], cvars[i].extra-1);
((char*)cvars[i].var)[cvars[i].extra-1] = 0;
if (!OSD_ParsingScript())
OSD_Printf("%s %s",cvars[i].name,(char*)cvars[i].var);
}
break;
default:
break;
}

View file

@ -5949,21 +5949,21 @@ void polymost_initosdfuncs(void)
{ "r_downsize","r_downsize: controls downsizing factor for hires textures",(void *)&r_downsizevar, CVAR_INT|CVAR_FUNCPTR, 0, 0, 5 },
{ "r_fullbrights","r_fullbrights: enable/disable fullbright textures",(void *)&r_fullbrights, CVAR_BOOL, 0, 0, 1 },
{ "r_glowmapping","r_glowmapping: enable/disable glow mapping",(void *)&r_glowmapping, CVAR_BOOL, 0, 0, 1 },
/*
{ "r_multisample","r_multisample: sets the number of samples used for antialiasing (0 = off)",(void *)&r_glowmapping, CVAR_BOOL, 0, 0, 1 }
{ "r_nvmultisamplehint","r_nvmultisamplehint: enable/disable Nvidia multisampling hinting",(void *)&glnvmultisamplehint, CVAR_BOOL, 0, 0, 1 }
*/
/*
{ "r_multisample","r_multisample: sets the number of samples used for antialiasing (0 = off)",(void *)&r_glowmapping, CVAR_BOOL, 0, 0, 1 }
{ "r_nvmultisamplehint","r_nvmultisamplehint: enable/disable Nvidia multisampling hinting",(void *)&glnvmultisamplehint, CVAR_BOOL, 0, 0, 1 }
*/
{ "r_parallaxskyclamping","r_parallaxskyclamping: enable/disable parallaxed floor/ceiling sky texture clamping",
(void *)&r_parallaxskyclamping, CVAR_BOOL, 0, 0, 1 },
(void *)&r_parallaxskyclamping, CVAR_BOOL, 0, 0, 1 },
{ "r_parallaxskypanning","r_parallaxskypanning: enable/disable parallaxed floor/ceiling panning when drawing a parallaxed sky",
(void *)&r_parallaxskypanning, CVAR_BOOL, 0, 0, 1 },
(void *)&r_parallaxskypanning, CVAR_BOOL, 0, 0, 1 },
{ "r_polygonmode","r_polygonmode: debugging feature",(void *)&glpolygonmode, CVAR_INT | CVAR_NOSAVE, 0, 0, 3 },
{ "r_redbluemode","r_redbluemode: enable/disable experimental OpenGL red-blue glasses mode",(void *)&glredbluemode, CVAR_BOOL, 0, 0, 1 },
{ "r_shadescale","r_shadescale: multiplier for lighting",(void *)&shadescale, CVAR_FLOAT, 0, 0, 10 },
{ "r_swapinterval","r_swapinterval: sets the GL swap interval (VSync)",(void *)&vsync, CVAR_BOOL|CVAR_FUNCPTR, 0, 0, 1 },
{ "r_texcachecompression","r_texcachecompression: enable/disable compression of files in the OpenGL compressed texture cache",(void *)&glusetexcachecompression, CVAR_BOOL, 0, 0, 1 },
{ "r_texcache","r_texcache: enable/disable OpenGL compressed texture cache",(void *)&glusetexcache, CVAR_BOOL, 0, 0, 1 },
{ "r_texcompr","r_texcompr: enable/disable OpenGL texture compression",(void *)&glusetexcompr, CVAR_BOOL, 0, 0, 1 },
{ "r_texcompr","r_texcompr: enable/disable OpenGL texture compression",(void *)&glusetexcompr, CVAR_BOOL, 0, 0, 1 },
{ "r_textureanisotropy", "r_textureanisotropy: changes the OpenGL texture anisotropy setting", (void *)&glanisotropy, CVAR_INT|CVAR_FUNCPTR, 0, 0, 16 },
{ "r_texturemaxsize","r_texturemaxsize: changes the maximum OpenGL texture size limit",(void *)&gltexmaxsize, CVAR_INT, 0, 0, 4096 },
{ "r_texturemiplevel","r_texturemiplevel: changes the highest OpenGL mipmap level used",(void *)&gltexmiplevel, CVAR_INT, 0, 0, 6 },

View file

@ -2,8 +2,8 @@
char textfont[2048] =
{
0xFF, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xFF, // .
0x7E, 0x81, 0xA5, 0x81, 0xBD, 0x81, 0x7E, 0x00, // .
0xFF, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xFF, // .
0x7E, 0x81, 0xA5, 0x81, 0xBD, 0x81, 0x7E, 0x00, // .
0x7E, 0xFF, 0xDB, 0xFF, 0xC3, 0xFF, 0x7E, 0x00, // .
0x36, 0x7F, 0x7F, 0x7F, 0x3E, 0x1C, 0x08, 0x00, // .
0x08, 0x1C, 0x3E, 0x7F, 0x3E, 0x1C, 0x08, 0x00, // .
@ -33,7 +33,7 @@ char textfont[2048] =
0x00, 0x00, 0x60, 0x60, 0x60, 0x7F, 0x00, 0x00, // .
0x00, 0x24, 0x66, 0xFF, 0x66, 0x24, 0x00, 0x00, // .
0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x00, 0x00, // .
0x00, 0xFF, 0xFF, 0x7E, 0x3C, 0x18, 0x00, 0x00, //
0x00, 0xFF, 0xFF, 0x7E, 0x3C, 0x18, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // !
0x06, 0x0E, 0x0C, 0x18, 0x10, 0x00, 0x20, 0x00, // "
0x6C, 0x6C, 0x24, 0x48, 0x00, 0x00, 0x00, 0x00, // #
@ -257,5 +257,5 @@ char textfont[2048] =
0x78, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, // .
0x38, 0x0C, 0x18, 0x30, 0x3C, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00
};
0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00
};

View file

@ -620,11 +620,11 @@ void initprintf(const char *f, ...)
OSD_Printf(buf);
if ((Bstrlen(dabuf) + Bstrlen(buf) + 2) > sizeof(dabuf))
{
startwin_puts(dabuf);
Bmemset(dabuf, 0, sizeof(dabuf));
}
if ((Bstrlen(dabuf) + Bstrlen(buf) + 2) > sizeof(dabuf))
{
startwin_puts(dabuf);
Bmemset(dabuf, 0, sizeof(dabuf));
}
Bstrcat(dabuf,buf);
@ -3369,39 +3369,39 @@ static int32_t SetupOpenGL(int32_t width, int32_t height, int32_t bitspp)
glinfo.extensions = (char *)bglGetString(GL_EXTENSIONS);
// GL driver blacklist
if (!Bstrcmp(glinfo.vendor,"Microsoft Corporation")) err = 1;
else if (!Bstrcmp(glinfo.vendor,"SiS")) err = 1;
else if (!Bstrcmp(glinfo.vendor,"3Dfx Interactive Inc.")) err = 1;
else if (!Bstrcmp(glinfo.vendor,"Intel"))
{
if (!Bstrcmp(glinfo.renderer,"Intel 865G"))
err = 0;
else if (!Bstrcmp(glinfo.renderer,"Intel 945GM"))
err = 0;
else if (!Bstrcmp(glinfo.renderer,"Intel 965/963 Graphics Media Accelerator"))
err = 0;
else err = 1;
}
if (!Bstrcmp(glinfo.vendor,"Microsoft Corporation")) err = 1;
else if (!Bstrcmp(glinfo.vendor,"SiS")) err = 1;
else if (!Bstrcmp(glinfo.vendor,"3Dfx Interactive Inc.")) err = 1;
else if (!Bstrcmp(glinfo.vendor,"Intel"))
{
if (!Bstrcmp(glinfo.renderer,"Intel 865G"))
err = 0;
else if (!Bstrcmp(glinfo.renderer,"Intel 945GM"))
err = 0;
else if (!Bstrcmp(glinfo.renderer,"Intel 965/963 Graphics Media Accelerator"))
err = 0;
else err = 1;
}
#ifdef POLYMER
else
{
if (!Bstrcmp(glinfo.vendor,"ATI Technologies Inc."))
pr_atiworkaround = 1;
else pr_atiworkaround = 0;
}
else
{
if (!Bstrcmp(glinfo.vendor,"ATI Technologies Inc."))
pr_atiworkaround = 1;
else pr_atiworkaround = 0;
}
#endif
if (!forcegl && err)
{
OSD_Printf("Unsupported OpenGL driver detected. GL modes will be unavailable. Use -forcegl to override.\n");
wm_msgbox("Unsupported OpenGL driver", "Unsupported OpenGL driver detected. GL modes will be unavailable.");
ReleaseOpenGL();
unloadgldriver();
nogl = 1;
modeschecked = 0;
getvalidmodes();
return TRUE;
}
if (!forcegl && err)
{
OSD_Printf("Unsupported OpenGL driver detected. GL modes will be unavailable. Use -forcegl to override.\n");
wm_msgbox("Unsupported OpenGL driver", "Unsupported OpenGL driver detected. GL modes will be unavailable.");
ReleaseOpenGL();
unloadgldriver();
nogl = 1;
modeschecked = 0;
getvalidmodes();
return TRUE;
}
glinfo.maxanisotropy = 1.0;
glinfo.bgra = 0;

View file

@ -622,8 +622,8 @@ inline void G_AddGameLight(int32_t radius, int32_t srcsprite, int32_t zoffset, i
ActorExtra[srcsprite].lightmaxrange = 0;
if (range > ActorExtra[srcsprite].lightmaxrange ||
priority != ActorExtra[srcsprite].lightptr->priority ||
Bmemcmp(&sprite[srcsprite], ActorExtra[srcsprite].lightptr, sizeof(int32_t) * 3))
priority != ActorExtra[srcsprite].lightptr->priority ||
Bmemcmp(&sprite[srcsprite], ActorExtra[srcsprite].lightptr, sizeof(int32_t) * 3))
{
if (range > ActorExtra[srcsprite].lightmaxrange)
ActorExtra[srcsprite].lightmaxrange = range;
@ -2216,9 +2216,9 @@ CLEAR_THE_BOLT:
}
goto BOLT;
case FLOORFLAME__STATIC:
case FIREBARREL__STATIC:
case FIREVASE__STATIC:
case FLOORFLAME__STATIC:
case FIREBARREL__STATIC:
case FIREVASE__STATIC:
case EXPLODINGBARREL__STATIC:
case WOODENHORSE__STATIC:
case HORSEONSIDE__STATIC:
@ -5644,10 +5644,10 @@ static void G_MoveEffectors(void) //STATNUM 3
j = headspritesect[s->sectnum];
while (j >= 0)
{
if (sprite[j].statnum != 10 && sector[sprite[j].sectnum].lotag != 2 &&
(sprite[j].picnum != SECTOREFFECTOR ||
(sprite[j].picnum == SECTOREFFECTOR && (sprite[j].lotag == 49||sprite[j].lotag == 50)) )
&& sprite[j].picnum != LOCATORS)
if (sprite[j].statnum != 10 && sector[sprite[j].sectnum].lotag != 2 &&
(sprite[j].picnum != SECTOREFFECTOR ||
(sprite[j].picnum == SECTOREFFECTOR && (sprite[j].lotag == 49||sprite[j].lotag == 50)))
&& sprite[j].picnum != LOCATORS)
{
rotatepoint(s->x,s->y,sprite[j].x,sprite[j].y,q,&sprite[j].x,&sprite[j].y);
@ -7853,7 +7853,7 @@ void G_MoveWorld(void)
{
spritetype *s = &sprite[i];
if(ActorExtra[i].lightptr != NULL && ActorExtra[i].lightcount)
if (ActorExtra[i].lightptr != NULL && ActorExtra[i].lightcount)
{
if (!(--ActorExtra[i].lightcount))
{
@ -7880,23 +7880,23 @@ void G_MoveWorld(void)
case TECHSWITCH__STATIC:
case ACCESSSWITCH__STATIC:
case ACCESSSWITCH2__STATIC:
{
int32_t x, y;
{
int32_t x, y;
if (s->cstat & 32768 || !inside(s->x+((sintable[(s->ang+512)&2047])>>9), s->y+((sintable[(s->ang)&2047])>>9), s->sectnum))
break;
if (s->cstat & 32768 || !inside(s->x+((sintable[(s->ang+512)&2047])>>9), s->y+((sintable[(s->ang)&2047])>>9), s->sectnum))
break;
x = ((sintable[(s->ang+512)&2047])>>7);
y = ((sintable[(s->ang)&2047])>>7);
x = ((sintable[(s->ang+512)&2047])>>7);
y = ((sintable[(s->ang)&2047])>>7);
s->x += x;
s->y += y;
s->x += x;
s->y += y;
G_AddGameLight(0, i, ((s->yrepeat*tilesizy[s->picnum])<<1), 1024, 48+(255<<8)+(48<<16),PR_LIGHT_PRIO_LOW);
s->x -= x;
s->y -= y;
}
break;
G_AddGameLight(0, i, ((s->yrepeat*tilesizy[s->picnum])<<1), 1024, 48+(255<<8)+(48<<16),PR_LIGHT_PRIO_LOW);
s->x -= x;
s->y -= y;
}
break;
}
switch (DynamicTileMap[sprite[i].picnum])
{
@ -7935,7 +7935,7 @@ void G_MoveWorld(void)
case EXPLOSION2__STATIC:
if (!ActorExtra[i].lightcount)
G_AddGameLight(0, i, ((s->yrepeat*tilesizy[s->picnum])<<1), LIGHTRAD, 255+(95<<8),
s->yrepeat > 32 ? PR_LIGHT_PRIO_HIGH_GAME : PR_LIGHT_PRIO_LOW_GAME);
s->yrepeat > 32 ? PR_LIGHT_PRIO_HIGH_GAME : PR_LIGHT_PRIO_LOW_GAME);
break;
case FORCERIPPLE__STATIC:
// case TRANSPORTERSTAR__STATIC:
@ -7978,23 +7978,23 @@ void G_MoveWorld(void)
case TECHSWITCH__STATIC:
case ACCESSSWITCH__STATIC:
case ACCESSSWITCH2__STATIC:
{
int32_t x, y;
{
int32_t x, y;
if (s->cstat & 32768 || !inside(s->x+((sintable[(s->ang+512)&2047])>>9), s->y+((sintable[(s->ang)&2047])>>9), s->sectnum))
break;
if (s->cstat & 32768 || !inside(s->x+((sintable[(s->ang+512)&2047])>>9), s->y+((sintable[(s->ang)&2047])>>9), s->sectnum))
break;
x = ((sintable[(s->ang+512)&2047])>>7);
y = ((sintable[(s->ang)&2047])>>7);
x = ((sintable[(s->ang+512)&2047])>>7);
y = ((sintable[(s->ang)&2047])>>7);
s->x += x;
s->y += y;
s->x += x;
s->y += y;
G_AddGameLight(0, i, ((s->yrepeat*tilesizy[s->picnum])<<1), 1024, 255+(48<<8)+(48<<16),PR_LIGHT_PRIO_LOW);
s->x -= x;
s->y -= y;
}
break;
G_AddGameLight(0, i, ((s->yrepeat*tilesizy[s->picnum])<<1), 1024, 255+(48<<8)+(48<<16),PR_LIGHT_PRIO_LOW);
s->x -= x;
s->y -= y;
}
break;
}
}
#endif

View file

@ -204,7 +204,7 @@ void create_map_snapshot(void)
{
mapstate->sectors = (sectortype *)Bcalloc(1, sizeof(sectortype) * numsectors);
mapstate->sectsiz = j = lzf_compress(&sector[0], sizeof(sectortype) * numsectors,
&mapstate->sectors[0], sizeof(sectortype) * numsectors);
&mapstate->sectors[0], sizeof(sectortype) * numsectors);
mapstate->sectors = (sectortype *)Brealloc(mapstate->sectors, j);
mapstate->sectcrc = tempcrc;
}
@ -223,7 +223,7 @@ void create_map_snapshot(void)
{
mapstate->walls = (walltype *)Bcalloc(1, sizeof(walltype) * numwalls);
mapstate->wallsiz = j = lzf_compress(&wall[0], sizeof(walltype) * numwalls,
&mapstate->walls[0], sizeof(walltype) * numwalls);
&mapstate->walls[0], sizeof(walltype) * numwalls);
mapstate->walls = (walltype *)Brealloc(mapstate->walls, j);
mapstate->wallcrc = tempcrc;
}
@ -251,7 +251,7 @@ void create_map_snapshot(void)
Bmemcpy(spri++,&sprite[j],sizeof(spritetype));
}
mapstate->spritesiz = j = lzf_compress(&tspri[0], sizeof(spritetype) * numsprites,
&mapstate->sprites[0], sizeof(spritetype) * numsprites);
&mapstate->sprites[0], sizeof(spritetype) * numsprites);
mapstate->sprites = (spritetype *)Brealloc(mapstate->sprites, j);
mapstate->spritecrc = tempcrc;
Bfree(tspri);

View file

@ -667,6 +667,8 @@ extern int32_t g_cameraDistance, g_cameraClock, g_playerFriction,g_showShareware
extern int32_t g_networkBroadcastMode, g_movesPerPacket;
extern int32_t g_gameQuit;
extern int32_t playerswhenstarted;
extern char pus,pub;
extern int32_t g_damageCameras,g_freezerSelfDamage,g_tripbombLaserMode;

View file

@ -192,7 +192,7 @@ extern void G_DrawTXDigiNumZ(int32_t starttile, int32_t x,int32_t y,int32_t n,in
extern void G_DrawTileSmall(int32_t x,int32_t y,int32_t tilenum,int32_t shade,int32_t orientation);
extern void G_DrawTilePalSmall(int32_t x,int32_t y,int32_t tilenum,int32_t shade,int32_t orientation,int32_t p);
extern void Gv_ResetVars(void);
extern void A_ResetVars(int32_t iActor);
extern void __fastcall A_ResetVars(register int32_t iActor);
extern int32_t minitext_(int32_t x,int32_t y,const char *t,int32_t s,int32_t p,int32_t sb);
@ -219,10 +219,10 @@ extern void Gv_Init(void);
extern void Gv_WriteSave(FILE *fil);
extern int32_t Gv_ReadSave(int32_t fil);
extern int32_t __fastcall Gv_GetVar(int32_t id, int32_t iActor, int32_t iPlayer);
extern void __fastcall Gv_SetVar(int32_t id, int32_t lValue, int32_t iActor, int32_t iPlayer);
extern int32_t __fastcall Gv_GetVarX(int32_t id);
extern void __fastcall Gv_SetVarX(int32_t id, int32_t lValue);
extern int32_t __fastcall Gv_GetVar(register int32_t id, register int32_t iActor, register int32_t iPlayer);
extern void __fastcall Gv_SetVar(register int32_t id, register int32_t lValue, register int32_t iActor, register int32_t iPlayer);
extern int32_t __fastcall Gv_GetVarX(register int32_t id);
extern void __fastcall Gv_SetVarX(register int32_t id, register int32_t lValue);
// extern void SetGameArrayID(int32_t id,int32_t index, int32_t lValue);
@ -232,7 +232,7 @@ extern void C_ReportError(int32_t iError);
extern void onvideomodechange(int32_t newmode);
extern void X_OnEvent(int32_t iEventID, int32_t sActor, int32_t sPlayer, int32_t lDist);
extern void X_OnEvent(register int32_t iEventID, register int32_t sActor, register int32_t sPlayer, register int32_t lDist);
extern int32_t A_CheckSoundPlaying(int32_t i, int32_t num);
extern int32_t S_CheckSoundPlaying(int32_t i, int32_t num);

View file

@ -63,7 +63,6 @@ int32_t g_scriptSanityChecks = 1;
#define TIMERUPDATESIZ 32
int32_t g_cameraDistance = 0, g_cameraClock = 0;
static int32_t playerswhenstarted;
static int32_t qe,cp;
static int32_t g_commandSetup = 0;
int32_t g_noSetup = 0;
@ -8892,7 +8891,7 @@ static void G_ShowDebugHelp(void)
"-q#\t\tFake multiplayer with # (2-8) players\n"
"-rmnet\t\tUse network config file (OBSOLETE, see -net)\n"
"-stun\t\tUse UDP hole punching for multiplayer connections\n"
"-unstable \tForce EDuke32 to execute unsafe CON commands (and crash)\n"
/*"-unstable \tForce EDuke32 to execute unsafe CON commands (and crash)\n"*/
"-w\t\tShow coordinates\n"
"-z#/-condebug\tEnable line-by-line CON compile debugging at level #\n"
;
@ -9685,20 +9684,20 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
continue;
}
#endif
/*
if (!Bstrcasecmp(c+1,"unstable"))
{
initprintf("WARNING WARNING WARNING WARNING\n"
"EDuke32's runtime script error detection has been disabled via "
"the '-unstable' command line parameter. Bug reports from this "
"mode are NOT welcome and you should expect crashes in certain "
"mods. Please run EDuke32 without '-unstable' before sending "
"any bug reports.\n");
g_scriptSanityChecks = 0;
i++;
continue;
}
*/
/*
if (!Bstrcasecmp(c+1,"unstable"))
{
initprintf("WARNING WARNING WARNING WARNING\n"
"EDuke32's runtime script error detection has been disabled via "
"the '-unstable' command line parameter. Bug reports from this "
"mode are NOT welcome and you should expect crashes in certain "
"mods. Please run EDuke32 without '-unstable' before sending "
"any bug reports.\n");
g_scriptSanityChecks = 0;
i++;
continue;
}
*/
if (!Bstrcasecmp(c+1,"cachesize"))
{
if (argc > i+1)
@ -10379,7 +10378,8 @@ static void G_LoadExtraPalettes(void)
#if defined(__APPLE__) && B_BIG_ENDIAN != 0
// this is almost as bad as just setting the value to 25 :P
g_numRealPalettes = (g_numRealPalettes * (uint64)0x0202020202 & (uint64)0x010884422010) % 1023;
g_numRealPalettes = ((g_numRealPalettes * 0x80200802ULL) & 0x0884422110ULL) * 0x0101010101ULL >> 32;
#endif
for (j = 0; j < 256; j++)
@ -11135,9 +11135,22 @@ void app_main(int32_t argc,const char **argv)
if (mod_dir[0] != '/')
{
char cwd[BMAX_PATH];
Bstrcat(root,mod_dir);
addsearchpath(root);
// addsearchpath(mod_dir);
if (getcwd(cwd,BMAX_PATH))
{
Bsprintf(cwd,"%s/%s",cwd,mod_dir);
if (!Bstrcmp(root, cwd))
{
if (addsearchpath(cwd) == -2)
if (Bmkdir(cwd,S_IRWXU) == 0) addsearchpath(cwd);
}
}
#if defined(POLYMOST) && defined(USE_OPENGL)
Bsprintf(tempbuf,"%s/%s",mod_dir,TEXCACHEFILE);
Bstrcpy(TEXCACHEFILE,tempbuf);
@ -11390,8 +11403,6 @@ CLEAN_DIRECTORY:
if (ud.multimode > 1)
{
playerswhenstarted = ud.multimode;
if (ud.warp_on == 0)
{
ud.m_monsters_off = 1;
@ -11399,6 +11410,7 @@ CLEAN_DIRECTORY:
}
}
playerswhenstarted = ud.multimode;
ud.last_level = -1;
if (Bstrcasecmp(ud.rtsname,"DUKE.RTS") == 0 ||

View file

@ -1899,20 +1899,21 @@ static int32_t C_GetNextValue(int32_t type)
static inline int32_t C_IntPow2(int32_t v)
{
return ((v!=0) && (v&(v-1))==0);
return ((v!=0) && (v&(v-1))==0);
}
static inline uint32_t C_Pow2IntLogBase2(int32_t v)
{
static const uint32_t b[] = {0xAAAAAAAA, 0xCCCCCCCC, 0xF0F0F0F0,
0xFF00FF00, 0xFFFF0000};
register uint32_t r = (v & b[0]) != 0;
int32_t i = 4;
for (; i > 0; i--)
r |= ((v & b[i]) != 0) << i;
return r;
static const uint32_t b[] = {0xAAAAAAAA, 0xCCCCCCCC, 0xF0F0F0F0,
0xFF00FF00, 0xFFFF0000
};
register uint32_t r = (v & b[0]) != 0;
int32_t i = 4;
for (; i > 0; i--)
r |= ((v & b[i]) != 0) << i;
return r;
}
static int32_t C_CheckMalformedBranch(intptr_t lastScriptPtr)
@ -1929,7 +1930,7 @@ static int32_t C_CheckMalformedBranch(intptr_t lastScriptPtr)
C_ReportError(-1);
g_numCompilerWarnings++;
initprintf("%s:%d: warning: malformed `%s' branch\n",g_szScriptFileName,g_lineNumber,
keyw[*(g_scriptPtr) & 0xFFF]);
keyw[*(g_scriptPtr) & 0xFFF]);
return 1;
}
return 0;
@ -3904,45 +3905,52 @@ static int32_t C_ParseCommand(void)
case CON_SHIFTVARL:
case CON_SHIFTVARR:
{
intptr_t *inst = g_scriptPtr-1;
char *tptr = textptr;
// syntax: [rand|add|set]var <var1> <const1>
// sets var1 to const1
// adds const1 to var1 (const1 can be negative...)
//printf("Found [add|set]var at line= %d\n",g_lineNumber);
// get the ID of the DEF
if (tw != CON_ZSHOOT && tw != CON_EZSHOOT)
C_GetNextVarType(GAMEVAR_READONLY);
else C_GetNextVar();
C_GetNextValue(LABEL_DEFINE); // the number to check against...
if (tw == CON_MULVAR && *(g_scriptPtr-1) == -1)
{
intptr_t *inst = g_scriptPtr-1;
char *tptr = textptr;
// syntax: [rand|add|set]var <var1> <const1>
// sets var1 to const1
// adds const1 to var1 (const1 can be negative...)
//printf("Found [add|set]var at line= %d\n",g_lineNumber);
*inst = CON_INV;
g_scriptPtr--;
return 0;
}
// get the ID of the DEF
if (tw != CON_ZSHOOT && tw != CON_EZSHOOT)
C_GetNextVarType(GAMEVAR_READONLY);
else C_GetNextVar();
if (tw == CON_DIVVAR || (tw == CON_MULVAR && *(g_scriptPtr-1) > 0))
{
int32_t i = *(g_scriptPtr-1);
j = klabs(*(g_scriptPtr-1));
C_GetNextValue(LABEL_DEFINE); // the number to check against...
if (tw == CON_DIVVAR || (tw == CON_MULVAR && *(g_scriptPtr-1) > 0))
if (C_IntPow2(j))
{
int32_t i = *(g_scriptPtr-1);
j = klabs(*(g_scriptPtr-1));
if (C_IntPow2(j))
{
*inst = ((tw == CON_DIVVAR) ? CON_SHIFTVARR : CON_SHIFTVARL);
*(g_scriptPtr-1) = C_Pow2IntLogBase2(j);
*inst = ((tw == CON_DIVVAR) ? CON_SHIFTVARR : CON_SHIFTVARL);
*(g_scriptPtr-1) = C_Pow2IntLogBase2(j);
// initprintf("%s:%d: replacing multiply/divide with shift\n",g_szScriptFileName,g_lineNumber);
if (i == j)
return 0;
if (i == j)
return 0;
*g_scriptPtr++ = CON_INV + (g_lineNumber<<12);
textptr = tptr;
C_GetNextVarType(GAMEVAR_READONLY);
C_GetNextValue(LABEL_DEFINE);
g_scriptPtr--;
*g_scriptPtr++ = CON_INV + (g_lineNumber<<12);
textptr = tptr;
C_GetNextVarType(GAMEVAR_READONLY);
C_GetNextValue(LABEL_DEFINE);
g_scriptPtr--;
// initprintf("%s:%d: adding inversion\n",g_szScriptFileName,g_lineNumber);
}
}
}
return 0;
}
return 0;
case CON_WRITEARRAYTOFILE:
case CON_READARRAYFROMFILE:
C_GetNextLabelName();

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -298,7 +298,7 @@ void Gv_WriteSave(FILE *fil)
}
Bsprintf(g_szBuf,"EOF: EDuke32");
l=strlen(g_szBuf);
l=Bstrlen(g_szBuf);
dfwrite(&l,sizeof(l),1,fil);
dfwrite(g_szBuf,l,1,fil);
}
@ -503,12 +503,15 @@ int32_t Gv_NewVar(const char *pszLabel, int32_t lValue, uint32_t dwFlags)
return 1;
}
void A_ResetVars(int32_t iActor)
void __fastcall A_ResetVars(register int32_t iActor)
{
int32_t i=(MAXGAMEVARS-1);
for (; i>=0; i--)
if ((aGameVars[i].dwFlags & GAMEVAR_PERACTOR) && !(aGameVars[i].dwFlags & GAMEVAR_NODEFAULT))
register int32_t i=(MAXGAMEVARS-1);
do
{
if ((aGameVars[i].dwFlags & (GAMEVAR_PERACTOR|GAMEVAR_NODEFAULT)) == GAMEVAR_PERACTOR)
aGameVars[i].val.plValues[iActor]=aGameVars[i].lDefault;
}
while (i--);
}
static int32_t Gv_GetVarIndex(const char *szGameLabel)
@ -522,25 +525,22 @@ static int32_t Gv_GetVarIndex(const char *szGameLabel)
return i;
}
int32_t __fastcall Gv_GetVar(int32_t id, int32_t iActor, int32_t iPlayer)
int32_t __fastcall Gv_GetVar(register int32_t id, register int32_t iActor, register int32_t iPlayer)
{
if (id == MAXGAMEVARS)
return(*insptr++);
if (id == g_iThisActorID)
return iActor;
if (id == MAXGAMEVARS)
return(*insptr++);
{
int32_t negateResult = 0;
register intptr_t negateResult = id&(MAXGAMEVARS<<1);
if (id >= g_gameVarCount || id < 0)
{
if (id&(MAXGAMEVARS<<2)) // array
{
int32_t index=Gv_GetVar(*insptr++,iActor,iPlayer);
if (id&(MAXGAMEVARS<<1)) // negative array access
negateResult = 1;
register int32_t index=Gv_GetVar(*insptr++,iActor,iPlayer);
id &= (MAXGAMEVARS-1);// ~((MAXGAMEVARS<<2)|(MAXGAMEVARS<<1));
@ -549,174 +549,102 @@ int32_t __fastcall Gv_GetVar(int32_t id, int32_t iActor, int32_t iPlayer)
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid array index (%s[%d])\n",g_errorLineNum,keyw[g_tw],aGameArrays[id].szLabel,index);
return -1;
}
if (negateResult) return (-aGameArrays[id].plValues[index]);
return (aGameArrays[id].plValues[index]);
return ((aGameArrays[id].plValues[index] ^ -negateResult) + negateResult);
}
if (id&(MAXGAMEVARS<<3)) // struct shortcut vars
{
int32_t index=Gv_GetVar(*insptr++, iActor, iPlayer), label;
register int32_t index=Gv_GetVar(*insptr++, iActor, iPlayer);
if (id == g_iActorVarID)
switch ((id&(MAXGAMEVARS-1)) - g_iSpriteVarID)
{
if (index >= MAXSPRITES || index < 0)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid array index\n",g_errorLineNum,keyw[g_tw]);
return -1;
}
label = Gv_GetVar(*insptr++, index, iPlayer);
// OSD_Printf("actorvar returned %d\n",label);
}
else label = *insptr++;
if (id&(MAXGAMEVARS<<1)) // negative array access
negateResult = 1;
id &= (MAXGAMEVARS-1); //~((MAXGAMEVARS<<3)|(MAXGAMEVARS<<1));
if (id == g_iSpriteVarID)
case 0: //if (id == g_iSpriteVarID)
{
int32_t parm2 = 0;
int32_t parm2 = 0, label = *insptr++;
/*OSD_Printf("%d %d %d\n",__LINE__,index,label);*/
if (ActorLabels[label].flags & LABEL_HASPARM2)
parm2 = Gv_GetVar(*insptr++, iActor, iPlayer);
if (index >= MAXSPRITES || index < 0)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid array index\n",g_errorLineNum,keyw[g_tw]);
return -1;
}
if (negateResult) return (-X_AccessSpriteX(index, label, parm2));
return (X_AccessSpriteX(index, label, parm2));
return ((X_AccessSpriteX(index, label, parm2) ^ -negateResult) + negateResult);
}
else if (id == g_iPlayerVarID)
case 3: //else if (id == g_iPlayerVarID)
{
int32_t parm2 = 0;
int32_t parm2 = 0, label = *insptr++;
if (PlayerLabels[label].flags & LABEL_HASPARM2)
parm2 = Gv_GetVar(*insptr++, iActor, iPlayer);
if (index == vm.g_i) index = vm.g_p;
if (index >= MAXPLAYERS || index < 0)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid array index\n",g_errorLineNum,keyw[g_tw]);
return -1;
}
if (negateResult) return (-X_AccessPlayerX(index, label, parm2));
return (X_AccessPlayerX(index, label, parm2));
return ((X_AccessPlayerX(index, label, parm2) ^ -negateResult) + negateResult);
}
else if (id == g_iActorVarID)
{
if (index >= MAXSPRITES || index < 0)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid array index\n",g_errorLineNum,keyw[g_tw]);
return -1;
}
if (negateResult) return -label;
return label;
}
else if (id == g_iSectorVarID)
{
case 4: //else if (id == g_iActorVarID)
return ((Gv_GetVar(*insptr++, index, iPlayer) ^ -negateResult) + negateResult);
case 1: //else if (id == g_iSectorVarID)
if (index == vm.g_i) index = sprite[vm.g_i].sectnum;
if (index >= MAXSECTORS || index < 0)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid array index\n",g_errorLineNum,keyw[g_tw]);
return -1;
}
if (negateResult) return (-X_AccessSectorX(index, label));
return (X_AccessSectorX(index, label));
}
else if (id == g_iWallVarID)
{
if (index >= MAXWALLS || index < 0)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid array index\n",g_errorLineNum,keyw[g_tw]);
return -1;
}
if (negateResult) return (-X_AccessWallX(index, label));
return (X_AccessWallX(index, label));
return ((X_AccessSectorX(index, *insptr++) ^ -negateResult) + negateResult);
case 2: //else if (id == g_iWallVarID)
return ((X_AccessWallX(index, *insptr++) ^ -negateResult) + negateResult);
default:
OSD_Printf(CON_ERROR "Gv_GetVar(): WTF??\n",g_errorLineNum,keyw[g_tw]);
return -1;
}
}
if ((id&(MAXGAMEVARS<<1)) == 0)
id &= (MAXGAMEVARS-1);
if (!negateResult)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid gamevar ID (%d)\n",g_errorLineNum,keyw[g_tw],id);
return -1;
}
negateResult = 1;
id &= ~(MAXGAMEVARS<<1);
}
switch (aGameVars[id].dwFlags & (GAMEVAR_USER_MASK|GAMEVAR_INTPTR|
GAMEVAR_SHORTPTR|GAMEVAR_CHARPTR))
switch (aGameVars[id].dwFlags &
(GAMEVAR_USER_MASK|GAMEVAR_INTPTR|GAMEVAR_SHORTPTR|GAMEVAR_CHARPTR))
{
default:
if (negateResult) return (-aGameVars[id].val.lValue);
return (aGameVars[id].val.lValue);
return ((aGameVars[id].val.lValue ^ -negateResult) + negateResult);
case GAMEVAR_PERPLAYER:
if (iPlayer < 0 || iPlayer >= MAXPLAYERS)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid player ID (%d)\n",g_errorLineNum,keyw[g_tw],iPlayer);
return -1;
}
if (negateResult) return (-aGameVars[id].val.plValues[iPlayer]);
return (aGameVars[id].val.plValues[iPlayer]);
if (iPlayer < 0 || iPlayer >= MAXPLAYERS) goto bad_id;
return ((aGameVars[id].val.plValues[iPlayer] ^ -negateResult) + negateResult);
case GAMEVAR_PERACTOR:
if (iActor < 0 || iActor >= MAXSPRITES)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid sprite ID (%d)\n",g_errorLineNum,keyw[g_tw],iActor);
return -1;
}
if (negateResult) return (-aGameVars[id].val.plValues[iActor]);
return (aGameVars[id].val.plValues[iActor]);
if (iActor < 0 || iActor >= MAXSPRITES) goto bad_id;
return ((aGameVars[id].val.plValues[iActor] ^ -negateResult) + negateResult);
case GAMEVAR_INTPTR:
if (negateResult) return (-(*((int32_t*)aGameVars[id].val.lValue)));
return ((*((int32_t*)aGameVars[id].val.lValue)));
return (((*((int32_t*)aGameVars[id].val.lValue)) ^ -negateResult) + negateResult);
case GAMEVAR_SHORTPTR:
if (negateResult) return (-(*((int16_t*)aGameVars[id].val.lValue)));
return ((*((int16_t*)aGameVars[id].val.lValue)));
return (((*((int16_t*)aGameVars[id].val.lValue)) ^ -negateResult) + negateResult);
case GAMEVAR_CHARPTR:
if (negateResult) return (-(*((char*)aGameVars[id].val.lValue)));
return ((*((char*)aGameVars[id].val.lValue)));
return (((*((char*)aGameVars[id].val.lValue)) ^ -negateResult) + negateResult);
}
}
bad_id:
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid sprite/player ID %d/%d\n",g_errorLineNum,keyw[g_tw],iActor,iPlayer);
return -1;
}
void __fastcall Gv_SetVar(int32_t id, int32_t lValue, int32_t iActor, int32_t iPlayer)
void __fastcall Gv_SetVar(register int32_t id, register int32_t lValue, register int32_t iActor, register int32_t iPlayer)
{
if (id<0 || id >= g_gameVarCount)
{
OSD_Printf(CON_ERROR "Gv_SetVar(): tried to set invalid gamevar ID (%d) from sprite %d (%d), player %d\n",g_errorLineNum,keyw[g_tw],id,vm.g_i,sprite[vm.g_i].picnum,vm.g_p);
return;
}
if (id<0 || id >= g_gameVarCount) goto badvarid;
//Bsprintf(g_szBuf,"SGVI: %d ('%s') to %d for %d %d",id,aGameVars[id].szLabel,lValue,iActor,iPlayer);
//AddLog(g_szBuf);
switch (aGameVars[id].dwFlags & (GAMEVAR_USER_MASK|GAMEVAR_INTPTR|
GAMEVAR_SHORTPTR|GAMEVAR_CHARPTR))
switch (aGameVars[id].dwFlags &
(GAMEVAR_USER_MASK|GAMEVAR_INTPTR|GAMEVAR_SHORTPTR|GAMEVAR_CHARPTR))
{
default:
aGameVars[id].val.lValue=lValue;
return;
case GAMEVAR_PERPLAYER:
if (iPlayer < 0 || iPlayer > MAXPLAYERS-1)
{
OSD_Printf(CON_ERROR "Gv_SetVar(): invalid player (%d) for per-player gamevar %s from sprite %d, player %d\n",g_errorLineNum,keyw[g_tw],iPlayer,aGameVars[id].szLabel,vm.g_i,vm.g_p);
return;
}
if (iPlayer < 0 || iPlayer > MAXPLAYERS-1) goto badplayer;
// for the current player
aGameVars[id].val.plValues[iPlayer]=lValue;
return;
case GAMEVAR_PERACTOR:
if (iActor < 0 || iActor > MAXSPRITES-1)
{
OSD_Printf(CON_ERROR "Gv_SetVar(): invalid sprite (%d) for per-actor gamevar %s from sprite %d (%d), player %d\n",g_errorLineNum,keyw[g_tw],iActor,aGameVars[id].szLabel,vm.g_i,sprite[vm.g_i].picnum,vm.g_p);
return;
}
// for the current actor
if (iActor < 0 || iActor > MAXSPRITES-1) goto badactor;
aGameVars[id].val.plValues[iActor]=lValue;
return;
case GAMEVAR_INTPTR:
@ -726,30 +654,39 @@ void __fastcall Gv_SetVar(int32_t id, int32_t lValue, int32_t iActor, int32_t iP
*((int16_t*)aGameVars[id].val.lValue)=(int16_t)lValue;
return;
case GAMEVAR_CHARPTR:
*((char*)aGameVars[id].val.lValue)=(uint8_t)lValue;
*((uint8_t*)aGameVars[id].val.lValue)=(uint8_t)lValue;
return;
}
badvarid:
OSD_Printf(CON_ERROR "Gv_SetVar(): tried to set invalid gamevar ID (%d) from sprite %d (%d), player %d\n",g_errorLineNum,keyw[g_tw],id,vm.g_i,sprite[vm.g_i].picnum,vm.g_p);
return;
badplayer:
OSD_Printf(CON_ERROR "Gv_SetVar(): invalid player (%d) for per-player gamevar %s from sprite %d, player %d\n",g_errorLineNum,keyw[g_tw],iPlayer,aGameVars[id].szLabel,vm.g_i,vm.g_p);
return;
badactor:
OSD_Printf(CON_ERROR "Gv_SetVar(): invalid sprite (%d) for per-actor gamevar %s from sprite %d (%d), player %d\n",g_errorLineNum,keyw[g_tw],iActor,aGameVars[id].szLabel,vm.g_i,sprite[vm.g_i].picnum,vm.g_p);
return;
}
int32_t __fastcall Gv_GetVarX(int32_t id)
int32_t __fastcall Gv_GetVarX(register int32_t id)
{
if (id == MAXGAMEVARS)
return(*insptr++);
if (id == g_iThisActorID)
return vm.g_i;
if (id == MAXGAMEVARS)
return(*insptr++);
{
int32_t negateResult = 0;
register intptr_t negateResult = id&(MAXGAMEVARS<<1);
if (id >= g_gameVarCount || id < 0)
{
if (id&(MAXGAMEVARS<<2)) // array
{
int32_t index=Gv_GetVarX(*insptr++);
if (id&(MAXGAMEVARS<<1)) // negative array access
negateResult = 1;
register int32_t index=Gv_GetVarX(*insptr++);
id &= (MAXGAMEVARS-1);// ~((MAXGAMEVARS<<2)|(MAXGAMEVARS<<1));
@ -758,134 +695,80 @@ int32_t __fastcall Gv_GetVarX(int32_t id)
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid array index (%s[%d])\n",g_errorLineNum,keyw[g_tw],aGameArrays[id].szLabel,index);
return -1;
}
if (negateResult) return (-aGameArrays[id].plValues[index]);
return (aGameArrays[id].plValues[index]);
return ((aGameArrays[id].plValues[index] ^ -negateResult) + negateResult);
}
if (id&(MAXGAMEVARS<<3)) // struct shortcut vars
{
int32_t index=Gv_GetVarX(*insptr++), label;
register int32_t index=Gv_GetVarX(*insptr++);
if (id&(MAXGAMEVARS<<1)) // negative array access
negateResult = 1;
id &= (MAXGAMEVARS-1);// ~((MAXGAMEVARS<<3)|(MAXGAMEVARS<<1));
if (id == g_iActorVarID)
switch ((id&(MAXGAMEVARS-1)) - g_iSpriteVarID)
{
if (index >= MAXSPRITES || index < 0)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid array index\n",g_errorLineNum,keyw[g_tw]);
return -1;
}
label = Gv_GetVar(*insptr++, index, vm.g_p);
}
else label = *insptr++;
if (id == g_iSpriteVarID)
case 0: //if (id == g_iSpriteVarID)
{
int32_t parm2 = 0;
int32_t parm2 = 0, label = *insptr++;
/*OSD_Printf("%d %d %d\n",__LINE__,index,label);*/
if (ActorLabels[label].flags & LABEL_HASPARM2)
parm2 = Gv_GetVarX(*insptr++);
if (index >= MAXSPRITES || index < 0)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid array index\n",g_errorLineNum,keyw[g_tw]);
return -1;
}
if (negateResult) return (-X_AccessSpriteX(index, label, parm2));
return (X_AccessSpriteX(index, label, parm2));
return ((X_AccessSpriteX(index, label, parm2) ^ -negateResult) + negateResult);
}
else if (id == g_iPlayerVarID)
case 3: //else if (id == g_iPlayerVarID)
{
int32_t parm2 = 0;
int32_t parm2 = 0, label = *insptr++;
if (PlayerLabels[label].flags & LABEL_HASPARM2)
parm2 = Gv_GetVarX(*insptr++);
if (index == vm.g_i) index = vm.g_p;
if (index >= MAXPLAYERS || index < 0)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid array index\n",g_errorLineNum,keyw[g_tw]);
return -1;
}
if (negateResult) return (-X_AccessPlayerX(index, label, parm2));
return (X_AccessPlayerX(index, label, parm2));
return ((X_AccessPlayerX(index, label, parm2) ^ -negateResult) + negateResult);
}
else if (id == g_iActorVarID)
{
if (index >= MAXSPRITES || index < 0)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid array index\n",g_errorLineNum,keyw[g_tw]);
return -1;
}
if (negateResult) return -label;
return label;
}
else if (id == g_iSectorVarID)
{
case 4: //else if (id == g_iActorVarID)
return ((Gv_GetVar(*insptr++, index, vm.g_p) ^ -negateResult) + negateResult);
case 1: //else if (id == g_iSectorVarID)
if (index == vm.g_i) index = sprite[vm.g_i].sectnum;
if (index >= MAXSECTORS || index < 0)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid array index\n",g_errorLineNum,keyw[g_tw]);
return -1;
}
if (negateResult) return (-X_AccessSectorX(index, label));
return (X_AccessSectorX(index, label));
}
else if (id == g_iWallVarID)
{
if (index >= MAXWALLS || index < 0)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid array index\n",g_errorLineNum,keyw[g_tw]);
return -1;
}
if (negateResult) return (-X_AccessWallX(index, label));
return (X_AccessWallX(index, label));
return ((X_AccessSectorX(index, *insptr++) ^ -negateResult) + negateResult);
case 2: //else if (id == g_iWallVarID)
return ((X_AccessWallX(index, *insptr++) ^ -negateResult) + negateResult);
default:
OSD_Printf(CON_ERROR "Gv_GetVar(): WTF??\n",g_errorLineNum,keyw[g_tw]);
return -1;
}
}
if ((id&(MAXGAMEVARS<<1)) == 0)
id &= (MAXGAMEVARS-1);
if (!negateResult)
{
OSD_Printf(CON_ERROR "Gv_GetVar(): invalid gamevar ID (%d)\n",g_errorLineNum,keyw[g_tw],id);
return -1;
}
negateResult = 1;
id &= ~(MAXGAMEVARS<<1);
}
switch (aGameVars[id].dwFlags & (GAMEVAR_USER_MASK|GAMEVAR_INTPTR|
GAMEVAR_SHORTPTR|GAMEVAR_CHARPTR))
switch (aGameVars[id].dwFlags &
(GAMEVAR_USER_MASK|GAMEVAR_INTPTR|GAMEVAR_SHORTPTR|GAMEVAR_CHARPTR))
{
default:
if (negateResult) return (-aGameVars[id].val.lValue);
return (aGameVars[id].val.lValue);
return ((aGameVars[id].val.lValue ^ -negateResult) + negateResult);
case GAMEVAR_PERPLAYER:
if (negateResult) return (-aGameVars[id].val.plValues[vm.g_p]);
return (aGameVars[id].val.plValues[vm.g_p]);
return ((aGameVars[id].val.plValues[vm.g_p] ^ -negateResult) + negateResult);
case GAMEVAR_PERACTOR:
if (negateResult) return (-aGameVars[id].val.plValues[vm.g_i]);
return (aGameVars[id].val.plValues[vm.g_i]);
return ((aGameVars[id].val.plValues[vm.g_i] ^ -negateResult) + negateResult);
case GAMEVAR_INTPTR:
if (negateResult) return (-(*((int32_t*)aGameVars[id].val.lValue)));
return (*((int32_t*)aGameVars[id].val.lValue));
return (((*((int32_t*)aGameVars[id].val.lValue)) ^ -negateResult) + negateResult);
case GAMEVAR_SHORTPTR:
if (negateResult) return (-(*((int16_t*)aGameVars[id].val.lValue)));
return (*((int16_t*)aGameVars[id].val.lValue));
return (((*((int16_t*)aGameVars[id].val.lValue)) ^ -negateResult) + negateResult);
case GAMEVAR_CHARPTR:
if (negateResult) return (-(*((char*)aGameVars[id].val.lValue)));
return (*((char*)aGameVars[id].val.lValue));
return (((*((uint8_t*)aGameVars[id].val.lValue)) ^ -negateResult) + negateResult);
}
}
}
void __fastcall Gv_SetVarX(int32_t id, int32_t lValue)
void __fastcall Gv_SetVarX(register int32_t id, register int32_t lValue)
{
switch (aGameVars[id].dwFlags & (GAMEVAR_USER_MASK|GAMEVAR_INTPTR|
GAMEVAR_SHORTPTR|GAMEVAR_CHARPTR))
switch (aGameVars[id].dwFlags &
(GAMEVAR_USER_MASK|GAMEVAR_INTPTR|GAMEVAR_SHORTPTR|GAMEVAR_CHARPTR))
{
default:
aGameVars[id].val.lValue=lValue;
@ -903,7 +786,7 @@ void __fastcall Gv_SetVarX(int32_t id, int32_t lValue)
*((int16_t*)aGameVars[id].val.lValue)=(int16_t)lValue;
return;
case GAMEVAR_CHARPTR:
*((char*)aGameVars[id].val.lValue)=(uint8_t)lValue;
*((uint8_t*)aGameVars[id].val.lValue)=(uint8_t)lValue;
return;
}
}

View file

@ -84,6 +84,8 @@ sound_t g_sounds[ MAXSOUNDS ];
char g_numPlayerSprites,g_loadFromGroupOnly=0,g_earthquakeTime;
int32_t playerswhenstarted;
int32_t fricxv,fricyv;
playerdata_t g_player[MAXPLAYERS];
input_t inputfifo[MOVEFIFOSIZ][MAXPLAYERS];

View file

@ -353,39 +353,39 @@ int32_t A_Shoot(int32_t i,int32_t atwith)
case CHAINGUN__STATIC:
case RPG__STATIC:
case MORTER__STATIC:
{
int32_t x = ((sintable[(s->ang+512)&2047])>>7), y = ((sintable[(s->ang)&2047])>>7);
s-> x += x;
s-> y += y;
G_AddGameLight(0, i, PHEIGHT, 8192, 255+(95<<8),PR_LIGHT_PRIO_MAX_GAME);
ActorExtra[i].lightcount = 2;
s-> x -= x;
s-> y -= y;
}
{
int32_t x = ((sintable[(s->ang+512)&2047])>>7), y = ((sintable[(s->ang)&2047])>>7);
s-> x += x;
s-> y += y;
G_AddGameLight(0, i, PHEIGHT, 8192, 255+(95<<8),PR_LIGHT_PRIO_MAX_GAME);
ActorExtra[i].lightcount = 2;
s-> x -= x;
s-> y -= y;
}
/*
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(s->ang+512)&2047])>>4);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = s->y+((sintable[(s->ang)&2047])>>4);
/*
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(s->ang+512)&2047])>>4);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = s->y+((sintable[(s->ang)&2047])>>4);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].z = s->z-PHEIGHT;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].range = 8192;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].z = s->z-PHEIGHT;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].range = 8192;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = (s->ang+1024)&2047;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = 100;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 256;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = 200;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = (s->ang+1024)&2047;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = 100;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 256;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = 200;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = 255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = 80;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = 0;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = 255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = 80;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = 0;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_MAX_GAME;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_MAX_GAME;
if (gamelightcount < PR_MAXLIGHTS)
gamelightcount++;
*/
break;
if (gamelightcount < PR_MAXLIGHTS)
gamelightcount++;
*/
break;
}
#endif // POLYMER
}
@ -406,28 +406,28 @@ int32_t A_Shoot(int32_t i,int32_t atwith)
s-> x -= x;
s-> y -= y;
/*
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(s->ang+512)&2047])>>4);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = s->y+((sintable[(s->ang)&2047])>>4);
/*
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(s->ang+512)&2047])>>4);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = s->y+((sintable[(s->ang)&2047])>>4);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].z = s->z-PHEIGHT;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].range = 8192;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].z = s->z-PHEIGHT;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].range = 8192;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = (s->ang+1024)&2047;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = 100;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 256;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = 200;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = (s->ang+1024)&2047;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = 100;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 256;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = 200;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = ProjectileData[atwith].flashcolor&255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = (ProjectileData[atwith].flashcolor>>8)&255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = (ProjectileData[atwith].flashcolor>>16)&255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = ProjectileData[atwith].flashcolor&255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = (ProjectileData[atwith].flashcolor>>8)&255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = (ProjectileData[atwith].flashcolor>>16)&255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_MAX_GAME;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_MAX_GAME;
if (gamelightcount < PR_MAXLIGHTS)
gamelightcount++;
*/
if (gamelightcount < PR_MAXLIGHTS)
gamelightcount++;
*/
}
#endif // POLYMER
@ -2202,28 +2202,28 @@ void P_FireWeapon(DukePlayer_t *p)
ActorExtra[p->i].lightcount = 2;
s->x -= x;
s->y -= y;
/*
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(p->ang+512)&2047])>>4);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = s->y+((sintable[(p->ang)&2047])>>4);
/*
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(p->ang+512)&2047])>>4);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = s->y+((sintable[(p->ang)&2047])>>4);
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].z = s->z-PHEIGHT;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].range = 8192;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].z = s->z-PHEIGHT;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].range = 8192;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = (s->ang+1024)&2047;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = 100;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 256;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = 200;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = (s->ang+1024)&2047;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = 100;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 256;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = 200;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = aplWeaponFlashColor[p->curr_weapon][snum]&255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = (aplWeaponFlashColor[p->curr_weapon][snum]>>8)&255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = (aplWeaponFlashColor[p->curr_weapon][snum]>>16)&255;;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = aplWeaponFlashColor[p->curr_weapon][snum]&255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = (aplWeaponFlashColor[p->curr_weapon][snum]>>8)&255;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = (aplWeaponFlashColor[p->curr_weapon][snum]>>16)&255;;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_MAX_GAME;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_MAX_GAME;
if (gamelightcount < PR_MAXLIGHTS)
gamelightcount++;
*/
if (gamelightcount < PR_MAXLIGHTS)
gamelightcount++;
*/
#endif // POLYMER
lastvisinc = totalclock+32;
p->visibility = 0;

View file

@ -1868,7 +1868,10 @@ int32_t G_EnterLevel(int32_t g)
}
if ((g&MODE_GAME) || (g&MODE_EOL))
g_player[myconnectindex].ps->gm = MODE_GAME;
{
TRAVERSE_CONNECT(i)
g_player[i].ps->gm = MODE_GAME;
}
else if (g&MODE_RESTART)
{
if (ud.recstat == 2)