mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
Make useractor's <actortype> bit 4 mean 'this actor will not move by itself' to make it possible to have it in a rotating sector with full rounding correction. No token name is provided because the three others come from CON and I don't want to clutter the namespace; fix the editor issue where the box wasn't shown on occasion in the tile selector (8-bit)
git-svn-id: https://svn.eduke32.com/eduke32@1934 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8b6857b360
commit
a9290a0d29
5 changed files with 50 additions and 21 deletions
|
@ -1290,6 +1290,12 @@ int32_t clipmapinfo_load(const char *filename)
|
|||
if (pn<=0 || pn>=MAXTILES || k<0 || k>=numsectors || (sectoidx[k]&CM_OUTER))
|
||||
continue;
|
||||
|
||||
if (numclipmaps >= CM_MAX)
|
||||
{
|
||||
initprintf("warning: reached max clip map number %d, not processing any more\n", CM_MAX);
|
||||
break;
|
||||
}
|
||||
|
||||
// chain
|
||||
if (pictoidx[pn]>=0)
|
||||
{
|
||||
|
@ -9310,6 +9316,8 @@ int32_t loadmaphack(const char *filename)
|
|||
static char fn[BMAX_PATH];
|
||||
|
||||
#ifdef POLYMER
|
||||
int32_t toomanylights = 0;
|
||||
|
||||
for (i=0; i<PR_MAXLIGHTS; i++)
|
||||
maphacklight[i] = -1;
|
||||
#endif
|
||||
|
@ -9492,6 +9500,9 @@ int32_t loadmaphack(const char *filename)
|
|||
#pragma pack(push,1)
|
||||
_prlight light;
|
||||
#pragma pack(pop)
|
||||
if (toomanylights)
|
||||
break; // ignore further light defs
|
||||
|
||||
scriptfile_getnumber(script, &value);
|
||||
light.sector = value;
|
||||
scriptfile_getnumber(script, &value);
|
||||
|
@ -9527,6 +9538,14 @@ int32_t loadmaphack(const char *filename)
|
|||
|
||||
if (rendmode == 4)
|
||||
{
|
||||
if (maphacklightcnt == PR_MAXLIGHTS)
|
||||
{
|
||||
initprintf("warning: max light count %d exceeded, "
|
||||
"ignoring further light defs\n", PR_MAXLIGHTS);
|
||||
toomanylights = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
lightid = polymer_addlight(&light);
|
||||
if (lightid>=0)
|
||||
maphacklight[maphacklightcnt++] = lightid;
|
||||
|
|
|
@ -650,7 +650,9 @@ void Sect_ClearInterpolation(int32_t sectnum)
|
|||
|
||||
static int32_t move_fixed_sprite(int32_t j, int32_t pivotspr, int32_t daang)
|
||||
{
|
||||
if ((FIXSPR_STATNUMP(sprite[j].statnum) || (sprite[j].picnum==SECTOREFFECTOR && (sprite[j].lotag==49||sprite[j].lotag==50)))
|
||||
if ((FIXSPR_STATNUMP(sprite[j].statnum) ||
|
||||
(sprite[j].picnum==SECTOREFFECTOR && (sprite[j].lotag==49||sprite[j].lotag==50)) ||
|
||||
((sprite[j].statnum==1 || sprite[j].statnum==2) && (ActorType[sprite[j].picnum]&4)))
|
||||
&& actor[j].t_data[7]==(0x18190000|pivotspr))
|
||||
{
|
||||
rotatepoint(0,0, actor[j].t_data[8],actor[j].t_data[9], daang&2047, &sprite[j].x,&sprite[j].y);
|
||||
|
|
|
@ -4091,7 +4091,7 @@ static void tilescreen_drawbox(int32_t iTopLeft, int32_t iSelected, int32_t nXTi
|
|||
int32_t x1 = ((iTile-iTopLeft) % nXTiles)*TileDim;
|
||||
int32_t y1 = ((iTile - ((iTile-iTopLeft) % nXTiles) - iTopLeft)/nXTiles)*TileDim + offset;
|
||||
int32_t x2 = x1+TileDim-1;
|
||||
int32_t y2 = y1+TileDim-1;
|
||||
int32_t y2 = y1+TileDim-1, oydim16=ydim16;
|
||||
|
||||
char markedcol = editorcolors[14];
|
||||
|
||||
|
@ -4100,6 +4100,9 @@ static void tilescreen_drawbox(int32_t iTopLeft, int32_t iSelected, int32_t nXTi
|
|||
y1=max(y1, 0);
|
||||
y2=min(y2, ydim-1);
|
||||
|
||||
// plotlines2d uses drawline16, which clips against ydim16...
|
||||
ydim16 = ydim;
|
||||
|
||||
{
|
||||
// box
|
||||
int32_t xx[] = {x1, x1, x2, x2, x1};
|
||||
|
@ -4117,6 +4120,8 @@ static void tilescreen_drawbox(int32_t iTopLeft, int32_t iSelected, int32_t nXTi
|
|||
swaplong(&yy[0], &yy[1]);
|
||||
plotlines2d(xx, yy, 2, markedcol);
|
||||
}
|
||||
|
||||
ydim16 = oydim16;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2648,10 +2648,12 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
{
|
||||
j = *g_scriptPtr;
|
||||
|
||||
if (j > 2)
|
||||
if (j > 6 || (j&3)==3)
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: invalid useractor type.\n",g_szScriptFileName,g_lineNumber);
|
||||
initprintf("%s:%d: warning: invalid useractor type. Must be 0, 1, 2"
|
||||
" (notenemy, enemy, enemystayput) or have 4 added ('doesn't move').\n",
|
||||
g_szScriptFileName,g_lineNumber);
|
||||
g_numCompilerWarnings++;
|
||||
j = 0;
|
||||
}
|
||||
|
|
|
@ -1016,7 +1016,7 @@ static inline void G_SetupBackdrop(int16_t sky)
|
|||
pskybits=3;
|
||||
}
|
||||
|
||||
// tweak moving sectors with these SE lotags (bitmap)
|
||||
// tweak moving sectors with these SE lotags
|
||||
#define FIXSPR_SELOTAGP(k) ((k==0) || (k==6) || (k==14))
|
||||
|
||||
// setup sprites in moving sectors that are to be fixed wrt a certain pivot
|
||||
|
@ -1039,7 +1039,8 @@ static void premap_setup_fixed_sprites(void)
|
|||
// TRIPBOMB uses t_data[7] for its own purposes. Wouldn't be
|
||||
// too useful with moving sectors anyway
|
||||
if ((FIXSPR_STATNUMP(sprite[j].statnum) && sprite[j].picnum!=TRIPBOMB) ||
|
||||
(sprite[j].picnum==SECTOREFFECTOR && (sprite[j].lotag==49||sprite[j].lotag==50)))
|
||||
(sprite[j].picnum==SECTOREFFECTOR && (sprite[j].lotag==49||sprite[j].lotag==50)) ||
|
||||
((sprite[j].statnum==1 || sprite[j].statnum==2) && (ActorType[sprite[j].picnum]&4)))
|
||||
{
|
||||
pivot = i;
|
||||
if (sprite[i].lotag==0)
|
||||
|
|
Loading…
Reference in a new issue