mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- Duke: added two more flags to eliminate the references to the crane's tile numbers.
This commit is contained in:
parent
e3103fff02
commit
5bc8b1c2d3
14 changed files with 23 additions and 9 deletions
|
@ -4379,7 +4379,7 @@ void handle_se27(DDukeActor* actor)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void handle_se24(DDukeActor *actor, const int16_t *list1, const int16_t *list2, bool scroll, int TRIPBOMB, int LASERLINE, int CRANE, int shift)
|
void handle_se24(DDukeActor *actor, const int16_t *list1, const int16_t *list2, bool scroll, int TRIPBOMB, int LASERLINE, int shift)
|
||||||
{
|
{
|
||||||
auto testlist = [](const int16_t* list, int val) { for (int i = 0; list[i] > 0; i++) if (list[i] == val) return true; return false; };
|
auto testlist = [](const int16_t* list, int val) { for (int i = 0; list[i] > 0; i++) if (list[i] == val) return true; return false; };
|
||||||
|
|
||||||
|
@ -4416,7 +4416,7 @@ void handle_se24(DDukeActor *actor, const int16_t *list1, const int16_t *list2,
|
||||||
wallswitchcheck(a2))
|
wallswitchcheck(a2))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (!(a2->spr.picnum >= CRANE && a2->spr.picnum <= (CRANE + 3)))
|
if (!(gs.actorinfo[a2->spr.picnum].flags & SFLAG_SE24_NOFLOORCHECK))
|
||||||
{
|
{
|
||||||
if (a2->spr.pos.Z > (a2->floorz - (16 << 8)))
|
if (a2->spr.pos.Z > (a2->floorz - (16 << 8)))
|
||||||
{
|
{
|
||||||
|
@ -4426,7 +4426,7 @@ void handle_se24(DDukeActor *actor, const int16_t *list1, const int16_t *list2,
|
||||||
SetActor(a2, a2->spr.pos);
|
SetActor(a2, a2->spr.pos);
|
||||||
|
|
||||||
if (a2->sector()->floorstat & CSTAT_SECTOR_SLOPE)
|
if (a2->sector()->floorstat & CSTAT_SECTOR_SLOPE)
|
||||||
if (a2->spr.statnum == 2)
|
if (a2->spr.statnum == STAT_ZOMBIEACTOR)
|
||||||
makeitfall(a2);
|
makeitfall(a2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3446,7 +3446,7 @@ void moveeffectors_d(void) //STATNUM 3
|
||||||
{
|
{
|
||||||
static const int16_t list1[] = { BLOODPOOL, PUKE, FOOTPRINTS, FOOTPRINTS2, FOOTPRINTS3, FOOTPRINTS4, BULLETHOLE, BLOODSPLAT1, BLOODSPLAT2, BLOODSPLAT3, BLOODSPLAT4, -1 };
|
static const int16_t list1[] = { BLOODPOOL, PUKE, FOOTPRINTS, FOOTPRINTS2, FOOTPRINTS3, FOOTPRINTS4, BULLETHOLE, BLOODSPLAT1, BLOODSPLAT2, BLOODSPLAT3, BLOODSPLAT4, -1 };
|
||||||
static const int16_t list2[] = { BOLT1, BOLT1 + 1,BOLT1 + 2, BOLT1 + 3, SIDEBOLT1, SIDEBOLT1 + 1, SIDEBOLT1 + 2, SIDEBOLT1 + 3, -1 };
|
static const int16_t list2[] = { BOLT1, BOLT1 + 1,BOLT1 + 2, BOLT1 + 3, SIDEBOLT1, SIDEBOLT1 + 1, SIDEBOLT1 + 2, SIDEBOLT1 + 3, -1 };
|
||||||
handle_se24(act, list1, list2, true, TRIPBOMB, LASERLINE, CRANE, 2);
|
handle_se24(act, list1, list2, true, TRIPBOMB, LASERLINE, 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SE_35:
|
case SE_35:
|
||||||
|
|
|
@ -3401,7 +3401,7 @@ void moveeffectors_r(void) //STATNUM 3
|
||||||
{
|
{
|
||||||
static const int16_t list1[] = { BLOODPOOL, PUKE, FOOTPRINTS, FOOTPRINTS2, FOOTPRINTS3, -1 };
|
static const int16_t list1[] = { BLOODPOOL, PUKE, FOOTPRINTS, FOOTPRINTS2, FOOTPRINTS3, -1 };
|
||||||
static const int16_t list2[] = { BOLT1, BOLT1 + 1,BOLT1 + 2, BOLT1 + 3, -1 };
|
static const int16_t list2[] = { BOLT1, BOLT1 + 1,BOLT1 + 2, BOLT1 + 3, -1 };
|
||||||
handle_se24(act, list1, list2, st != 156, BULLETHOLE, -1, CRANE, 1);
|
handle_se24(act, list1, list2, st != 156, BULLETHOLE, -1, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@ void animatesprites_d(tspritetype* tsprite, int& spritesortcnt, int x, int y, in
|
||||||
t->pos.Z = interpolatedvalue(ps[h->spr.yvel].opos.Z, ps[h->spr.yvel].pos.Z, smoothratio);
|
t->pos.Z = interpolatedvalue(ps[h->spr.yvel].opos.Z, ps[h->spr.yvel].pos.Z, smoothratio);
|
||||||
t->pos.Z += PHEIGHT_DUKE;
|
t->pos.Z += PHEIGHT_DUKE;
|
||||||
}
|
}
|
||||||
else if (h->spr.picnum != CRANEPOLE)
|
else if (!(gs.actorinfo[h->spr.picnum].flags & SFLAG_NOINTERPOLATE))
|
||||||
{
|
{
|
||||||
t->pos = h->interpolatedvec3(smoothratio);
|
t->pos = h->interpolatedvec3(smoothratio);
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,7 +154,7 @@ void animatesprites_r(tspritetype* tsprite, int& spritesortcnt, int x, int y, in
|
||||||
h->spr.xrepeat = 24;
|
h->spr.xrepeat = 24;
|
||||||
h->spr.yrepeat = 17;
|
h->spr.yrepeat = 17;
|
||||||
}
|
}
|
||||||
else if (h->spr.picnum != CRANEPOLE)
|
else if (!(gs.actorinfo[h->spr.picnum].flags & SFLAG_NOINTERPOLATE))
|
||||||
{
|
{
|
||||||
t->pos = h->interpolatedvec3(smoothratio);
|
t->pos = h->interpolatedvec3(smoothratio);
|
||||||
}
|
}
|
||||||
|
|
|
@ -313,6 +313,8 @@ enum sflags_t
|
||||||
SFLAG_MOVEFTA_WAKEUPCHECK = 0x00010000,
|
SFLAG_MOVEFTA_WAKEUPCHECK = 0x00010000,
|
||||||
SFLAG_MOVEFTA_CHECKSEEWITHPAL8 = 0x00020000, // let's hope this can be done better later. For now this was what blocked merging the Duke and RR variants of movefta
|
SFLAG_MOVEFTA_CHECKSEEWITHPAL8 = 0x00020000, // let's hope this can be done better later. For now this was what blocked merging the Duke and RR variants of movefta
|
||||||
SFLAG_NOSHADOW = 0x00040000,
|
SFLAG_NOSHADOW = 0x00040000,
|
||||||
|
SFLAG_SE24_NOFLOORCHECK = 0x00080000,
|
||||||
|
SFLAG_NOINTERPOLATE = 0x00100000,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -198,6 +198,8 @@ void initactorflags_d()
|
||||||
if (isWorldTour()) setflag(SFLAG_BOSS, { BOSS2STAYPUT, BOSS3STAYPUT, BOSS5, BOSS5STAYPUT });
|
if (isWorldTour()) setflag(SFLAG_BOSS, { BOSS2STAYPUT, BOSS3STAYPUT, BOSS5, BOSS5STAYPUT });
|
||||||
setflag(SFLAG_NOWATERDIP, { OCTABRAIN, COMMANDER, DRONE });
|
setflag(SFLAG_NOWATERDIP, { OCTABRAIN, COMMANDER, DRONE });
|
||||||
setflag(SFLAG_GREENSLIMEFOOD, { LIZTROOP, LIZMAN, PIGCOP, NEWBEAST });
|
setflag(SFLAG_GREENSLIMEFOOD, { LIZTROOP, LIZMAN, PIGCOP, NEWBEAST });
|
||||||
|
setflag(SFLAG_SE24_NOFLOORCHECK, { CRANE, CRANE1, CRANE2, BARBROKE });
|
||||||
|
setflag(SFLAG_NOINTERPOLATE, { CRANEPOLE });
|
||||||
|
|
||||||
if (isWorldTour())
|
if (isWorldTour())
|
||||||
{
|
{
|
||||||
|
|
|
@ -228,6 +228,9 @@ void initactorflags_r()
|
||||||
NUKEBARRELLEAKED
|
NUKEBARRELLEAKED
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setflag(SFLAG_SE24_NOFLOORCHECK, { CRANE, CRANE1, CRANE2, BARBROKE });
|
||||||
|
setflag(SFLAG_NOINTERPOLATE, { CRANEPOLE });
|
||||||
|
|
||||||
// Animals were not supposed to have this, but due to a coding bug the logic was unconditional for everything in the game.
|
// Animals were not supposed to have this, but due to a coding bug the logic was unconditional for everything in the game.
|
||||||
for (auto& ainf : gs.actorinfo)
|
for (auto& ainf : gs.actorinfo)
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,7 +85,7 @@ void handle_se19(DDukeActor* i, int BIGFORCE);
|
||||||
void handle_se20(DDukeActor* i);
|
void handle_se20(DDukeActor* i);
|
||||||
void handle_se21(DDukeActor* i);
|
void handle_se21(DDukeActor* i);
|
||||||
void handle_se22(DDukeActor* i);
|
void handle_se22(DDukeActor* i);
|
||||||
void handle_se24(DDukeActor* actor, const int16_t* list1, const int16_t* list2, bool scroll, int TRIPBOMB, int LASERLINE, int CRANE, int shift);
|
void handle_se24(DDukeActor* actor, const int16_t* list1, const int16_t* list2, bool scroll, int TRIPBOMB, int LASERLINE, int shift);
|
||||||
void handle_se25(DDukeActor* a, int t_index, int snd1, int snd2);
|
void handle_se25(DDukeActor* a, int t_index, int snd1, int snd2);
|
||||||
void handle_se26(DDukeActor* i);
|
void handle_se26(DDukeActor* i);
|
||||||
void handle_se27(DDukeActor* i);
|
void handle_se27(DDukeActor* i);
|
||||||
|
|
|
@ -323,6 +323,8 @@ x(COLAMACHINE, 1215)
|
||||||
x(COLAMACHINEBROKE, 1217)
|
x(COLAMACHINEBROKE, 1217)
|
||||||
x(CRANEPOLE, 1221)
|
x(CRANEPOLE, 1221)
|
||||||
x(CRANE, 1222)
|
x(CRANE, 1222)
|
||||||
|
x(CRANE1, 1223)
|
||||||
|
x(CRANE2, 1224)
|
||||||
x(BARBROKE, 1225)
|
x(BARBROKE, 1225)
|
||||||
x(BLOODPOOL, 1226)
|
x(BLOODPOOL, 1226)
|
||||||
x(NUKEBARREL, 1227)
|
x(NUKEBARREL, 1227)
|
||||||
|
|
|
@ -390,6 +390,8 @@ x(COLAMACHINE, 1294)
|
||||||
x(COLAMACHINEBROKE, 1296)
|
x(COLAMACHINEBROKE, 1296)
|
||||||
x(CRANEPOLE, 1298)
|
x(CRANEPOLE, 1298)
|
||||||
x(CRANE, 1299)
|
x(CRANE, 1299)
|
||||||
|
x(CRANE1, 1300)
|
||||||
|
x(CRANE2, 1301)
|
||||||
x(BARBROKE, 1302)
|
x(BARBROKE, 1302)
|
||||||
x(BLOODPOOL, 1303)
|
x(BLOODPOOL, 1303)
|
||||||
x(NUKEBARREL, 1304)
|
x(NUKEBARREL, 1304)
|
||||||
|
|
|
@ -305,6 +305,7 @@ void DDukeActor::Serialize(FSerializer& arc)
|
||||||
("tempang", tempang)
|
("tempang", tempang)
|
||||||
("actorstayput", actorstayput)
|
("actorstayput", actorstayput)
|
||||||
("dispicnum", dispicnum)
|
("dispicnum", dispicnum)
|
||||||
|
("basepicnum", basepicnum)
|
||||||
("timetosleep", timetosleep)
|
("timetosleep", timetosleep)
|
||||||
("floorz", floorz)
|
("floorz", floorz)
|
||||||
("ceilingz", ceilingz)
|
("ceilingz", ceilingz)
|
||||||
|
|
|
@ -36,7 +36,7 @@ public:
|
||||||
uint8_t cgg;
|
uint8_t cgg;
|
||||||
uint8_t spriteextra; // moved here for easier maintenance. This was originally a hacked in field in the sprite structure called 'filler'.
|
uint8_t spriteextra; // moved here for easier maintenance. This was originally a hacked in field in the sprite structure called 'filler'.
|
||||||
short attackertype, hitang, hitextra, movflag;
|
short attackertype, hitang, hitextra, movflag;
|
||||||
short tempang, dispicnum;
|
short tempang, dispicnum, basepicnum;
|
||||||
short timetosleep;
|
short timetosleep;
|
||||||
vec2_t ovel;
|
vec2_t ovel;
|
||||||
int floorz, ceilingz;
|
int floorz, ceilingz;
|
||||||
|
|
|
@ -36,5 +36,7 @@ class DukeActor : CoreActor native
|
||||||
//flagdef MoveFTA_WakeupCheck: flags1, 16; // this one needs to be auto-set for RR, not for Duke, should not be exposed unless the feature becomes generally available.
|
//flagdef MoveFTA_WakeupCheck: flags1, 16; // this one needs to be auto-set for RR, not for Duke, should not be exposed unless the feature becomes generally available.
|
||||||
flagdef CheckSeeWithPal8: flags1, 17;
|
flagdef CheckSeeWithPal8: flags1, 17;
|
||||||
flagdef NoShadow: flags1, 18;
|
flagdef NoShadow: flags1, 18;
|
||||||
|
flagdef SE24_NoFloorCheck: flags1, 19;
|
||||||
|
flagdef NoInterpolate: flags1, 20;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue