mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- added a few new actor flags.
This commit is contained in:
parent
7db953e0ea
commit
2ab5e63386
9 changed files with 35 additions and 12 deletions
|
@ -193,6 +193,8 @@ enum ETSprFlags
|
|||
TSPR_FLAGS_DRAW_LAST = 2, // Currently unused: checked by Polymost but never set.
|
||||
TSPR_MDLROTATE = 4, // rotate if this is a model or voxel.
|
||||
TSPR_SLOPESPRITE = 8, // render as sloped sprite
|
||||
TSPR_ROTATE8FRAMES = 16, // do an 8 frame rotation
|
||||
TSPR_ROTATE12FRAMES = 32, // do an 12 frame rotation
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -369,6 +369,12 @@ enum sflags2_t
|
|||
SFLAG2_NORADIUSPUSH = 0x00008000,
|
||||
SFLAG2_FREEZEDAMAGE = 0x00010000,
|
||||
SFLAG2_REFLECTIVE = 0x00020000,
|
||||
SFLAG2_ALWAYSROTATE2 = 0x00040000,
|
||||
SFLAG2_SPECIALAUTOAIM = 0x00080000,
|
||||
SFLAG2_NODAMAGEPUSH = 0x00100000,
|
||||
SFLAG2_IGNOREHITOWNER = 0x00200000,
|
||||
SFLAG2_DONTDIVE = 0x00400000,
|
||||
SFLAG2_FLOATING = 0x00800000,
|
||||
};
|
||||
|
||||
using EDukeFlags2 = TFlags<sflags2_t, uint32_t>;
|
||||
|
|
|
@ -123,6 +123,11 @@ void initactorflags_d()
|
|||
setflag(SFLAG2_TRANFERPALTOJIBS, { LIZTROOP });
|
||||
setflag(SFLAG2_NORADIUSPUSH, { TANK, ROTATEGUN, RECON });
|
||||
setflag(SFLAG2_FREEZEDAMAGE | SFLAG2_REFLECTIVE, { FREEZEBLAST });
|
||||
setflag(SFLAG2_ALWAYSROTATE2, { RECON });
|
||||
setflag(SFLAG2_SPECIALAUTOAIM, { RECON });
|
||||
setflag(SFLAG2_IGNOREHITOWNER, { RECON });
|
||||
setflag(SFLAG2_NODAMAGEPUSH, { RECON, TANK, ROTATEGUN });
|
||||
setflag(SFLAG2_FLOATING, { DRONE, SHARK, COMMANDER });
|
||||
|
||||
if (isWorldTour())
|
||||
{
|
||||
|
|
|
@ -180,6 +180,10 @@ void initactorflags_r()
|
|||
setflag(SFLAG2_DIENOW, { RADIUSEXPLOSION });
|
||||
setflag(SFLAG2_NORADIUSPUSH, { HULK });
|
||||
setflag(SFLAG2_FREEZEDAMAGE | SFLAG2_REFLECTIVE, { FREEZEBLAST });
|
||||
setflag(SFLAG2_ALWAYSROTATE2, { RECON });
|
||||
setflag(SFLAG2_SPECIALAUTOAIM, { RECON });
|
||||
setflag(SFLAG2_IGNOREHITOWNER, { RECON });
|
||||
setflag(SFLAG2_FLOATING, { DRONE });
|
||||
|
||||
|
||||
// Animals were not supposed to have this, but due to a coding bug the logic was unconditional for everything in the game.
|
||||
|
@ -188,15 +192,20 @@ void initactorflags_r()
|
|||
ainf.flags |= SFLAG_MOVEFTA_WAKEUPCHECK;
|
||||
}
|
||||
|
||||
|
||||
if (isRRRA())
|
||||
{
|
||||
setflag(SFLAG_MOVEFTA_CHECKSEEWITHPAL8, { MINION });
|
||||
setflag(SFLAG2_TRANFERPALTOJIBS, { MINION });
|
||||
setflag(SFLAG2_NORADIUSPUSH, { MAMA, BILLYPLAY, COOTPLAY, MAMACLOUD });
|
||||
setflag(SFLAG2_DONTDIVE, { CHEERBOAT, HULKBOAT, MINIONBOAT, UFO1_RRRA });
|
||||
setflag(SFLAG2_FLOATING, { UFO1_RRRA });
|
||||
}
|
||||
else
|
||||
{
|
||||
setflag(SFLAG2_NORADIUSPUSH, { SBMOVE });
|
||||
setflag(SFLAG2_DONTDIVE, { UFO1_RR, UFO2, UFO3, UFO4, UFO5 });
|
||||
setflag(SFLAG2_FLOATING, { UFO1_RR, UFO2, UFO3, UFO4, UFO5 });
|
||||
}
|
||||
|
||||
gs.actorinfo[RPG2].flags |= SFLAG_FORCEAUTOAIM;
|
||||
|
|
|
@ -681,7 +681,7 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw
|
|||
double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5) + 8;
|
||||
double dist = (ps[p].GetActor()->spr.pos.XY() - aimed->spr.pos.XY()).Length();
|
||||
zvel = ((aimed->spr.pos.Z - pos.Z - dal) * vel) / dist;
|
||||
if (aimed->spr.picnum != RECON)
|
||||
if (!actorflag(aimed, SFLAG2_SPECIALAUTOAIM))
|
||||
ang = (aimed->spr.pos.XY() - pos.XY()).Angle();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -592,7 +592,7 @@ static void shootrpg(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int atw
|
|||
double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5) + 8;
|
||||
double dist = (ps[p].GetActor()->spr.pos.XY() - aimed->spr.pos.XY()).Length();
|
||||
zvel = ((aimed->spr.pos.Z - pos.Z - dal) * vel) / dist;
|
||||
if (aimed->spr.picnum != RECON)
|
||||
if (!actorflag(aimed, SFLAG2_SPECIALAUTOAIM))
|
||||
ang = (aimed->spr.pos.XY() - pos.XY()).Angle();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -975,7 +975,7 @@ void checkhitdefault_d(DDukeActor* targ, DDukeActor* proj)
|
|||
fi.shoot(targ, BLOODSPLAT4);
|
||||
}
|
||||
|
||||
if (targ->spr.picnum != TANK && !bossguy(targ) && targ->spr.picnum != RECON && targ->spr.picnum != ROTATEGUN)
|
||||
if (!actorflag(targ, SFLAG2_NODAMAGEPUSH) && !bossguy(targ)) // RR does not have this.
|
||||
{
|
||||
if ((targ->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == 0)
|
||||
targ->spr.Angles.Yaw = proj->spr.Angles.Yaw + DAngle180;
|
||||
|
@ -987,9 +987,9 @@ void checkhitdefault_d(DDukeActor* targ, DDukeActor* proj)
|
|||
ChangeActorSect(targ, sp);
|
||||
}
|
||||
|
||||
if (targ->spr.statnum == 2)
|
||||
if (targ->spr.statnum == STAT_ZOMBIEACTOR)
|
||||
{
|
||||
ChangeActorStat(targ, 1);
|
||||
ChangeActorStat(targ, STAT_ACTOR);
|
||||
targ->timetosleep = SLEEPTIME;
|
||||
}
|
||||
if ((targ->spr.scale.X < 0.375 || targ->spr.picnum == SHARK) && proj->spr.picnum == SHRINKSPARK) return;
|
||||
|
|
|
@ -1339,9 +1339,9 @@ void checkhitdefault_r(DDukeActor* targ, DDukeActor* proj)
|
|||
fi.shoot(targ, BLOODSPLAT4);
|
||||
}
|
||||
|
||||
if (targ->spr.statnum == 2)
|
||||
if (targ->spr.statnum == STAT_ZOMBIEACTOR)
|
||||
{
|
||||
ChangeActorStat(targ, 1);
|
||||
ChangeActorStat(targ, STAT_ACTOR);
|
||||
targ->timetosleep = SLEEPTIME;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -318,9 +318,10 @@ enum sflags2_t
|
|||
SFLAG2_NORADIUSPUSH = 0x00008000,
|
||||
SFLAG2_FREEZEDAMAGE = 0x00010000,
|
||||
SFLAG2_REFLECTIVE = 0x00020000,
|
||||
SFLAG2_SPAWNRABBITGUTS = 0x00040000, // this depends on the shooter, not the projectile so it has to be done with a flag.
|
||||
SFLAG2_NONSMOKYROCKET = 0x00080000, // same with this one. Flags should later be copied to the projectile once posible.
|
||||
SFLAG2_MIRRORREFLECT = 0x00100000,
|
||||
SFLAG2_NOCIRCLEREFLECT = 0x00200000, // yet another shooter flag. :(
|
||||
SFLAG2_UNDERWATERSLOWDOWN = 0x00400000,
|
||||
SFLAG2_ALWAYSROTATE2 = 0x00040000,
|
||||
SFLAG2_SPECIALAUTOAIM = 0x00080000,
|
||||
SFLAG2_NODAMAGEPUSH = 0x00100000,
|
||||
SFLAG2_IGNOREHITOWNER = 0x00200000,
|
||||
SFLAG2_DONTDIVE = 0x00400000,
|
||||
SFLAG2_FLOATING = 0x00800000,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue