mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
* Make destructable ceilings and floors (SE 13 pointing down) behave well with TROR; also carry sprites and players on the roof of a subway. The latter uses t_data[9] on the pivot sprite.
* Make the minimum resolution possible 640x480. Sometimes you'd accidentally enter something like 'vidmode 800 60' and crashes would ensue... * fix a warning git-svn-id: https://svn.eduke32.com/eduke32@1921 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
3bc56d267c
commit
83ab50d66e
4 changed files with 119 additions and 25 deletions
|
@ -3411,10 +3411,9 @@ void overheadeditor(void)
|
||||||
ulz[0] &= ~255;
|
ulz[0] &= ~255;
|
||||||
ulz[1] = ulz[0] + swsecheight;
|
ulz[1] = ulz[0] + swsecheight;
|
||||||
|
|
||||||
if (maxceilz >= ulz[0] || ulz[0] >= ulz[1] || ulz[1] >= minfloorz)
|
if (maxceilz >= ulz[0] || ulz[1] >= minfloorz)
|
||||||
{
|
{
|
||||||
message("Too little z headroom for sandwiching");
|
message("Too little z headroom for sandwiching");
|
||||||
// message("Internal error while sandwiching: z values wrong");
|
|
||||||
goto end_yax;
|
goto end_yax;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9740,6 +9740,9 @@ int32_t setgamemode(char davidoption, int32_t daxdim, int32_t daydim, int32_t da
|
||||||
{
|
{
|
||||||
int32_t i, j;
|
int32_t i, j;
|
||||||
|
|
||||||
|
daxdim = max(640, daxdim);
|
||||||
|
daydim = max(480, daydim);
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
extern char nogl;
|
extern char nogl;
|
||||||
|
|
||||||
|
|
|
@ -5696,6 +5696,9 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
|
|
||||||
if (s->xvel)
|
if (s->xvel)
|
||||||
{
|
{
|
||||||
|
#ifdef YAX_ENABLE
|
||||||
|
int32_t firstrun = 1;
|
||||||
|
#endif
|
||||||
x = getangle(sprite[s->owner].x-s->x,sprite[s->owner].y-s->y);
|
x = getangle(sprite[s->owner].x-s->x,sprite[s->owner].y-s->y);
|
||||||
q = G_GetAngleDelta(s->ang,x)>>3;
|
q = G_GetAngleDelta(s->ang,x)>>3;
|
||||||
|
|
||||||
|
@ -5749,38 +5752,52 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
x = (s->xvel*sintable[s->ang&2047])>>14;
|
x = (s->xvel*sintable[s->ang&2047])>>14;
|
||||||
|
|
||||||
TRAVERSE_CONNECT(p)
|
TRAVERSE_CONNECT(p)
|
||||||
if (sector[g_player[p].ps->cursectnum].lotag != 2)
|
|
||||||
{
|
{
|
||||||
if (g_playerSpawnPoints[p].os == s->sectnum)
|
if (g_player[p].ps->cursectnum < 0)
|
||||||
{
|
{
|
||||||
g_playerSpawnPoints[p].ox += m;
|
// might happen when squished into void space
|
||||||
g_playerSpawnPoints[p].oy += x;
|
// initprintf("cursectnum < 0!\n");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->sectnum == sprite[g_player[p].ps->i].sectnum)
|
if (sector[g_player[p].ps->cursectnum].lotag != 2)
|
||||||
{
|
{
|
||||||
rotatepoint(s->x,s->y,g_player[p].ps->pos.x,g_player[p].ps->pos.y,q,&g_player[p].ps->pos.x,&g_player[p].ps->pos.y);
|
if (g_playerSpawnPoints[p].os == s->sectnum)
|
||||||
|
|
||||||
g_player[p].ps->pos.x += m;
|
|
||||||
g_player[p].ps->pos.y += x;
|
|
||||||
|
|
||||||
g_player[p].ps->bobposx += m;
|
|
||||||
g_player[p].ps->bobposy += x;
|
|
||||||
|
|
||||||
g_player[p].ps->ang += q;
|
|
||||||
|
|
||||||
if (g_netServer || numplayers > 1)
|
|
||||||
{
|
{
|
||||||
g_player[p].ps->opos.x = g_player[p].ps->pos.x;
|
g_playerSpawnPoints[p].ox += m;
|
||||||
g_player[p].ps->opos.y = g_player[p].ps->pos.y;
|
g_playerSpawnPoints[p].oy += x;
|
||||||
}
|
}
|
||||||
if (sprite[g_player[p].ps->i].extra <= 0)
|
|
||||||
|
if (s->sectnum == sprite[g_player[p].ps->i].sectnum
|
||||||
|
#ifdef YAX_ENABLE
|
||||||
|
|| (t[9]>=0 && t[9] == sprite[g_player[p].ps->i].sectnum)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
sprite[g_player[p].ps->i].x = g_player[p].ps->pos.x;
|
rotatepoint(s->x,s->y,g_player[p].ps->pos.x,g_player[p].ps->pos.y,q,&g_player[p].ps->pos.x,&g_player[p].ps->pos.y);
|
||||||
sprite[g_player[p].ps->i].y = g_player[p].ps->pos.y;
|
|
||||||
|
g_player[p].ps->pos.x += m;
|
||||||
|
g_player[p].ps->pos.y += x;
|
||||||
|
|
||||||
|
g_player[p].ps->bobposx += m;
|
||||||
|
g_player[p].ps->bobposy += x;
|
||||||
|
|
||||||
|
g_player[p].ps->ang += q;
|
||||||
|
|
||||||
|
if (g_netServer || numplayers > 1)
|
||||||
|
{
|
||||||
|
g_player[p].ps->opos.x = g_player[p].ps->pos.x;
|
||||||
|
g_player[p].ps->opos.y = g_player[p].ps->pos.y;
|
||||||
|
}
|
||||||
|
if (sprite[g_player[p].ps->i].extra <= 0)
|
||||||
|
{
|
||||||
|
sprite[g_player[p].ps->i].x = g_player[p].ps->pos.x;
|
||||||
|
sprite[g_player[p].ps->i].y = g_player[p].ps->pos.y;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
j = headspritesect[s->sectnum];
|
j = headspritesect[s->sectnum];
|
||||||
while (j >= 0)
|
while (j >= 0)
|
||||||
{
|
{
|
||||||
|
@ -5811,6 +5828,16 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j = nextspritesect[j];
|
j = nextspritesect[j];
|
||||||
|
#ifdef YAX_ENABLE
|
||||||
|
if (j < 0)
|
||||||
|
{
|
||||||
|
if (t[9]>=0 && firstrun)
|
||||||
|
{
|
||||||
|
firstrun = 0;
|
||||||
|
j = headspritesect[t[9]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
A_MoveSector(i);
|
A_MoveSector(i);
|
||||||
|
@ -6526,6 +6553,11 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
case 13:
|
case 13:
|
||||||
if (t[2])
|
if (t[2])
|
||||||
{
|
{
|
||||||
|
// t[0]: ceiling z
|
||||||
|
// t[1]: floor z
|
||||||
|
// s->owner: 1 if affect ceiling, 0 if affect floor
|
||||||
|
// t[3]: 1 if ceiling was parallaxed at premap, 0 else
|
||||||
|
|
||||||
j = (SP<<5)|1;
|
j = (SP<<5)|1;
|
||||||
|
|
||||||
if (s->ang == 512)
|
if (s->ang == 512)
|
||||||
|
@ -6552,7 +6584,27 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
sc->ceilingz += ksgn(t[0]-sc->ceilingz)*j;
|
sc->ceilingz += ksgn(t[0]-sc->ceilingz)*j;
|
||||||
sc->ceilingz = t[0];
|
sc->ceilingz = t[0];
|
||||||
}
|
}
|
||||||
|
#ifdef YAX_ENABLE
|
||||||
|
if (s->ang == 512)
|
||||||
|
{
|
||||||
|
int16_t cf=!s->owner, bn=yax_getbunch(sc-sector, cf);
|
||||||
|
int32_t jj, daz=SECTORFLD(sc-sector,z, cf);
|
||||||
|
|
||||||
|
if (bn >= 0)
|
||||||
|
{
|
||||||
|
for (SECTORS_OF_BUNCH(bn, cf, jj))
|
||||||
|
{
|
||||||
|
SECTORFLD(jj,z, cf) = daz;
|
||||||
|
SECTORFLD(jj,stat, cf) &= ~(128+256 + 512+2048);
|
||||||
|
}
|
||||||
|
for (SECTORS_OF_BUNCH(bn, !cf, jj))
|
||||||
|
{
|
||||||
|
SECTORFLD(jj,z, !cf) = daz;
|
||||||
|
SECTORFLD(jj,stat, !cf) &= ~(128+256 + 512+2048);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (t[3] == 1)
|
if (t[3] == 1)
|
||||||
{
|
{
|
||||||
//Change the shades
|
//Change the shades
|
||||||
|
|
|
@ -5212,6 +5212,28 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
sector[sect].ceilingz = sp->z;
|
sector[sect].ceilingz = sp->z;
|
||||||
else
|
else
|
||||||
sector[sect].floorz = sp->z;
|
sector[sect].floorz = sp->z;
|
||||||
|
#ifdef YAX_ENABLE
|
||||||
|
{
|
||||||
|
int16_t cf=!sp->owner, bn=yax_getbunch(sect, cf);
|
||||||
|
int32_t jj, daz=SECTORFLD(sect,z, cf);
|
||||||
|
|
||||||
|
if (bn >= 0)
|
||||||
|
{
|
||||||
|
for (SECTORS_OF_BUNCH(bn, cf, jj))
|
||||||
|
{
|
||||||
|
SECTORFLD(jj,z, cf) = daz;
|
||||||
|
SECTORFLD(jj,stat, cf) &= ~256;
|
||||||
|
SECTORFLD(jj,stat, cf) |= 128 + 512+2048;
|
||||||
|
}
|
||||||
|
for (SECTORS_OF_BUNCH(bn, !cf, jj))
|
||||||
|
{
|
||||||
|
SECTORFLD(jj,z, !cf) = daz;
|
||||||
|
SECTORFLD(jj,stat, !cf) &= ~256;
|
||||||
|
SECTORFLD(jj,stat, !cf) |= 128 + 512+2048;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sector[sect].ceilingz = sector[sect].floorz = sp->z;
|
sector[sect].ceilingz = sector[sect].floorz = sp->z;
|
||||||
|
@ -5422,7 +5444,6 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
case 16://That rotating blocker reactor thing
|
case 16://That rotating blocker reactor thing
|
||||||
case 26://ESCELATOR
|
case 26://ESCELATOR
|
||||||
case 30://No rotational subways
|
case 30://No rotational subways
|
||||||
|
|
||||||
if (sp->lotag == 0)
|
if (sp->lotag == 0)
|
||||||
{
|
{
|
||||||
if (sector[sect].lotag == 30)
|
if (sector[sect].lotag == 30)
|
||||||
|
@ -5477,9 +5498,12 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
G_GameExit(tempbuf);
|
G_GameExit(tempbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sp->lotag == 30 || sp->lotag == 6 || sp->lotag == 14 || sp->lotag == 5)
|
if (sp->lotag == 30 || sp->lotag == 6 || sp->lotag == 14 || sp->lotag == 5)
|
||||||
{
|
{
|
||||||
|
#ifdef YAX_ENABLE
|
||||||
|
int32_t outerwall=-1;
|
||||||
|
#endif
|
||||||
startwall = sector[sect].wallptr;
|
startwall = sector[sect].wallptr;
|
||||||
endwall = startwall+sector[sect].wallnum;
|
endwall = startwall+sector[sect].wallnum;
|
||||||
|
|
||||||
|
@ -5497,12 +5521,28 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
sector[ wall[ s ].nextsector].hitag == 0 &&
|
sector[ wall[ s ].nextsector].hitag == 0 &&
|
||||||
sector[ wall[ s ].nextsector].lotag < 3)
|
sector[ wall[ s ].nextsector].lotag < 3)
|
||||||
{
|
{
|
||||||
|
#ifdef YAX_ENABLE
|
||||||
|
outerwall = wall[s].nextwall;
|
||||||
|
#endif
|
||||||
s = wall[s].nextsector;
|
s = wall[s].nextsector;
|
||||||
j = 1;
|
j = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef YAX_ENABLE
|
||||||
|
actor[i].t_data[9] = -1;
|
||||||
|
|
||||||
|
if (outerwall >= 0)
|
||||||
|
{
|
||||||
|
int32_t upperwall = yax_getnextwall(outerwall, YAX_CEILING);
|
||||||
|
|
||||||
|
if (upperwall>=0 && wall[upperwall].nextsector>=0)
|
||||||
|
{
|
||||||
|
Sect_SetInterpolation(wall[upperwall].nextsector);
|
||||||
|
actor[i].t_data[9] = wall[upperwall].nextsector;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (j == 0)
|
if (j == 0)
|
||||||
{
|
{
|
||||||
Bsprintf(tempbuf,"Subway found no zero'd sectors with locators\nat (%d,%d).\n",sp->x,sp->y);
|
Bsprintf(tempbuf,"Subway found no zero'd sectors with locators\nat (%d,%d).\n",sp->x,sp->y);
|
||||||
|
|
Loading…
Reference in a new issue