mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
- fix the camera.
- camera flag added
This commit is contained in:
parent
8e89bc29e4
commit
82898e42a6
13 changed files with 11 additions and 15 deletions
|
@ -211,7 +211,7 @@ void clearcamera(player_struct* ps)
|
|||
DukeStatIterator it(STAT_ACTOR);
|
||||
while (auto k = it.Next())
|
||||
{
|
||||
if (k->spr.picnum == TILE_CAMERA1)
|
||||
if (actorflag(k, SFLAG2_CAMERA))
|
||||
k->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2203,7 +2203,7 @@ static void greenslime(DDukeActor *actor)
|
|||
DukeStatIterator it(STAT_ACTOR);
|
||||
while (auto ac = it.Next())
|
||||
{
|
||||
if (ac->spr.picnum == CAMERA1) ac->spr.yvel = 0;
|
||||
if (actorflag(ac, SFLAG2_CAMERA)) ac->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -341,6 +341,7 @@ enum sflags2_t
|
|||
SFLAG2_BRIGHTEXPLODE = 0x00000020,
|
||||
SFLAG2_DOUBLEDMGTHRUST = 0x00000040,
|
||||
SFLAG2_BREAKMIRRORS = 0x00000080,
|
||||
SFLAG2_CAMERA = 0x00000100,
|
||||
};
|
||||
|
||||
using EDukeFlags2 = TFlags<sflags2_t, uint32_t>;
|
||||
|
|
|
@ -198,7 +198,6 @@ int TILE_TREE2;
|
|||
int TILE_TIRE;
|
||||
int TILE_CONE;
|
||||
int TILE_W_FORCEFIELD;
|
||||
int TILE_CAMERA1;
|
||||
int TILE_SCRAP6;
|
||||
int TILE_APLAYER;
|
||||
int TILE_DRONE;
|
||||
|
|
|
@ -218,6 +218,7 @@ void initactorflags_d()
|
|||
setflag(SFLAG2_BRIGHTEXPLODE, { SEENINE, OOZFILTER });
|
||||
setflag(SFLAG2_DOUBLEDMGTHRUST, { RADIUSEXPLOSION, RPG, HYDRENT, HEAVYHBOMB, SEENINE, OOZFILTER, EXPLODINGBARREL });
|
||||
setflag(SFLAG2_BREAKMIRRORS, { RADIUSEXPLOSION, RPG, HYDRENT, HEAVYHBOMB, SEENINE, OOZFILTER, EXPLODINGBARREL });
|
||||
setflag(SFLAG2_CAMERA, { CAMERA1 });
|
||||
|
||||
if (isWorldTour())
|
||||
{
|
||||
|
@ -311,7 +312,6 @@ void initactorflags_d()
|
|||
TILE_TIRE = TIRE;
|
||||
TILE_CONE = CONE;
|
||||
TILE_W_FORCEFIELD = W_FORCEFIELD;
|
||||
TILE_CAMERA1 = CAMERA1;
|
||||
TILE_SCRAP6 = SCRAP6;
|
||||
TILE_APLAYER = APLAYER;
|
||||
TILE_DRONE = DRONE;
|
||||
|
|
|
@ -247,6 +247,7 @@ void initactorflags_r()
|
|||
if (isRRRA()) setflag(SFLAG2_DOUBLEDMGTHRUST, { RPG2 });
|
||||
setflag(SFLAG2_BREAKMIRRORS, { RADIUSEXPLOSION, RPG, HYDRENT, HEAVYHBOMB, SEENINE, OOZFILTER, EXPLODINGBARREL, POWDERKEG });
|
||||
if (isRRRA()) setflag(SFLAG2_BREAKMIRRORS, { RPG2 });
|
||||
setflag(SFLAG2_CAMERA, { CAMERA1 });
|
||||
|
||||
// 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)
|
||||
|
@ -283,7 +284,6 @@ void initactorflags_r()
|
|||
TILE_TIRE = TIRE;
|
||||
TILE_CONE = CONE;
|
||||
TILE_W_FORCEFIELD = W_FORCEFIELD;
|
||||
TILE_CAMERA1 = CAMERA1;
|
||||
TILE_SCRAP6 = SCRAP6;
|
||||
TILE_APLAYER = APLAYER;
|
||||
TILE_DRONE = DRONE;
|
||||
|
|
|
@ -29,6 +29,7 @@ void movefx();
|
|||
void moveclouds(double smoothratio);
|
||||
void movefta();
|
||||
|
||||
void clearcameras(int i, player_struct* p);
|
||||
void RANDOMSCRAP(DDukeActor* i);
|
||||
void ms(DDukeActor* i);
|
||||
void movecrane(DDukeActor* i, int crane);
|
||||
|
|
|
@ -2075,7 +2075,7 @@ int ParseState::parse(void)
|
|||
DukeStatIterator it(STAT_ACTOR);
|
||||
while (auto actj = it.Next())
|
||||
{
|
||||
if (actj->spr.picnum == TILE_CAMERA1)
|
||||
if (actorflag(actj, SFLAG2_CAMERA))
|
||||
actj->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ extern int TILE_TREE2;
|
|||
extern int TILE_TIRE;
|
||||
extern int TILE_CONE;
|
||||
extern int TILE_W_FORCEFIELD;
|
||||
extern int TILE_CAMERA1;
|
||||
extern int TILE_SCRAP6;
|
||||
extern int TILE_APLAYER;
|
||||
extern int TILE_DRONE;
|
||||
|
|
|
@ -187,8 +187,6 @@ static void cachegoodsprites(void)
|
|||
tloadtile(i);
|
||||
}
|
||||
|
||||
tloadtile(VIEWSCREEN);
|
||||
|
||||
for(i=FOOTPRINTS;i<FOOTPRINTS+3;i++)
|
||||
tloadtile(i);
|
||||
|
||||
|
|
|
@ -330,8 +330,6 @@ static void cachegoodsprites(void)
|
|||
tloadtile(FRAGBAR);
|
||||
}
|
||||
|
||||
//tloadtile(VIEWSCREEN);
|
||||
|
||||
for (i = FOOTPRINTS; i < FOOTPRINTS + 3; i++)
|
||||
tloadtile(i);
|
||||
|
||||
|
|
|
@ -1451,7 +1451,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
|||
DukeStatIterator it(STAT_ACTOR);
|
||||
while (auto itActor = it.Next())
|
||||
{
|
||||
if (itActor->spr.picnum == CAMERA1) itActor->spr.yvel = 0;
|
||||
if (actorflag(itActor, SFLAG2_CAMERA)) itActor->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1489,7 +1489,7 @@ void clearcameras(int i, player_struct* p)
|
|||
DukeStatIterator it(STAT_ACTOR);
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
if (act->spr.picnum == CAMERA1) act->spr.yvel = 0;
|
||||
if (actorflag(act, SFLAG2_CAMERA)) act->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
else if (p->newOwner != nullptr)
|
||||
|
@ -1719,7 +1719,7 @@ void checksectors_d(int snum)
|
|||
DukeStatIterator it(STAT_ACTOR);
|
||||
while (auto acti = it.Next())
|
||||
{
|
||||
if (acti->spr.picnum == CAMERA1 && acti->spr.yvel == 0 && neartagsprite->spr.hitag == acti->spr.lotag)
|
||||
if (actorflag(acti, SFLAG2_CAMERA) && acti->spr.yvel == 0 && neartagsprite->spr.hitag == acti->spr.lotag)
|
||||
{
|
||||
acti->spr.yvel = 1; //Using this camera
|
||||
if (snum == screenpeek) S_PlaySound(MONITOR_ACTIVE);
|
||||
|
|
|
@ -2382,7 +2382,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
|
|||
DukeStatIterator it(STAT_EFFECTOR);
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
if (act->spr.picnum == CAMERA1) act->spr.yvel = 0;
|
||||
if (actorflag(act, SFLAG2_CAMERA)) act->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
auto Owner = targ->GetHitOwner();
|
||||
|
|
Loading…
Reference in a new issue