mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 04:24:39 +00:00
- split use of tempang between real angles and other counters.
This commit is contained in:
parent
ee28c90429
commit
9325886e35
8 changed files with 22 additions and 22 deletions
|
@ -2576,15 +2576,15 @@ void handle_se00(DDukeActor* actor)
|
|||
|
||||
if (actor->spr.extra == 1)
|
||||
{
|
||||
if (actor->tempang < 256)
|
||||
if (actor->tempval < 256)
|
||||
{
|
||||
actor->tempang += 4;
|
||||
if (actor->tempang >= 256)
|
||||
actor->tempval += 4;
|
||||
if (actor->tempval >= 256)
|
||||
callsound(actor->sector(), actor, true);
|
||||
if (actor->native_clipdist()) direction = 1; // notreallyclipdist
|
||||
else direction = -1;
|
||||
}
|
||||
else actor->tempang = 256;
|
||||
else actor->tempval = 256;
|
||||
|
||||
if (sect->floorz > actor->spr.pos.Z) //z's are touching
|
||||
{
|
||||
|
@ -2604,15 +2604,15 @@ void handle_se00(DDukeActor* actor)
|
|||
}
|
||||
else if (actor->spr.extra == 3)
|
||||
{
|
||||
if (actor->tempang > 0)
|
||||
if (actor->tempval > 0)
|
||||
{
|
||||
actor->tempang -= 4;
|
||||
if (actor->tempang <= 0)
|
||||
actor->tempval -= 4;
|
||||
if (actor->tempval <= 0)
|
||||
callsound(actor->sector(), actor, true);
|
||||
if (actor->native_clipdist()) direction = -1; // notreallyclipdist
|
||||
else direction = 1;
|
||||
}
|
||||
else actor->tempang = 0;
|
||||
else actor->tempval = 0;
|
||||
|
||||
double checkz = actor->temp_pos.Z;
|
||||
if (sect->floorz > checkz) //z's are touching
|
||||
|
|
|
@ -1283,8 +1283,8 @@ void DoActor(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
else SetGameVarID(lVar2, act->movflag, sActor, sPlayer);
|
||||
break;
|
||||
case ACTOR_HTTEMPANG:
|
||||
if (bSet) act->tempang = lValue;
|
||||
else SetGameVarID(lVar2, act->tempang, sActor, sPlayer);
|
||||
if (bSet) act->tempval = lValue;
|
||||
else SetGameVarID(lVar2, act->tempval, sActor, sPlayer);
|
||||
break;
|
||||
case ACTOR_HTACTORSTAYPUT:
|
||||
if (bSet) act->actorstayput = toSect(lValue);
|
||||
|
@ -1693,9 +1693,9 @@ int ParseState::parse(void)
|
|||
ps[connecthead].max_actors_killed++; //revive the egg
|
||||
g_ac->temp_data[5] = 0;
|
||||
}
|
||||
g_ac->spr.pal = (uint8_t)g_ac->tempang;
|
||||
g_ac->spr.pal = (uint8_t)g_ac->tempval;
|
||||
}
|
||||
g_ac->tempang = 0;
|
||||
g_ac->tempval = 0;
|
||||
break;
|
||||
case concmd_tossweapon:
|
||||
insptr++;
|
||||
|
@ -2265,7 +2265,7 @@ int ParseState::parse(void)
|
|||
|
||||
g_ac->cgg = 0;
|
||||
g_ac->movflag = 0;
|
||||
g_ac->tempang = 0;
|
||||
g_ac->tempval = 0;
|
||||
g_ac->actorstayput = nullptr;
|
||||
g_ac->dispicnum = 0;
|
||||
g_ac->SetHitOwner(ps[g_p].GetActor());
|
||||
|
@ -2512,7 +2512,7 @@ int ParseState::parse(void)
|
|||
case concmd_spritepal:
|
||||
insptr++;
|
||||
if(!g_ac->isPlayer())
|
||||
g_ac->tempang = g_ac->spr.pal;
|
||||
g_ac->tempval = g_ac->spr.pal;
|
||||
g_ac->spr.pal = *insptr;
|
||||
insptr++;
|
||||
break;
|
||||
|
|
|
@ -284,7 +284,7 @@ void DDukeActor::Serialize(FSerializer& arc)
|
|||
("owneractor", ownerActor)
|
||||
("owner", hitOwnerActor)
|
||||
("movflag", movflag)
|
||||
("tempang", tempang)
|
||||
("tempang", tempval)
|
||||
("actorstayput", actorstayput)
|
||||
("dispicnum", dispicnum)
|
||||
("basepicnum", basepicnum)
|
||||
|
|
|
@ -1010,7 +1010,7 @@ void operatesectors(sectortype* sptr, DDukeActor *actor)
|
|||
{
|
||||
auto act = barrier_cast<DDukeActor*>(sptr->hitagactor);
|
||||
if (!act) break;
|
||||
if (act->tempang == 0 || act->tempang == 256) callsound(sptr, actor);
|
||||
if (act->tempval == 0 || act->tempval == 256) callsound(sptr, actor);
|
||||
if (act->spr.extra == 1) act->spr.extra = 3;
|
||||
else act->spr.extra = 1;
|
||||
break;
|
||||
|
|
|
@ -88,7 +88,7 @@ DDukeActor* CreateActor(sectortype* whatsectp, const DVector3& pos, int s_pn, in
|
|||
act->hitextra = -1;
|
||||
act->cgg = 0;
|
||||
act->movflag = 0;
|
||||
act->tempang = 0;
|
||||
act->tempval = 0;
|
||||
act->dispicnum = 0;
|
||||
act->SetHitOwner(s_ow);
|
||||
act->SetOwner(s_ow);
|
||||
|
@ -148,7 +148,7 @@ bool initspriteforspawn(DDukeActor* act)
|
|||
act->SetHitOwner(act);
|
||||
act->cgg = 0;
|
||||
act->movflag = 0;
|
||||
act->tempang = 0;
|
||||
act->tempval = 0;
|
||||
act->dispicnum = 0;
|
||||
act->floorz = act->sector()->floorz;
|
||||
act->ceilingz = act->sector()->ceilingz;
|
||||
|
@ -272,7 +272,7 @@ void spawninitdefault(DDukeActor* actj, DDukeActor *act)
|
|||
if (actj)
|
||||
{
|
||||
if (actj->spr.picnum == RESPAWN)
|
||||
act->tempang = act->spr.pal = actj->spr.pal;
|
||||
act->tempval = act->spr.pal = actj->spr.pal;
|
||||
ChangeActorStat(act, STAT_ACTOR);
|
||||
}
|
||||
else ChangeActorStat(act, STAT_ZOMBIEACTOR);
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
uint8_t cgg;
|
||||
uint8_t spriteextra; // moved here for easier maintenance. This was originally a hacked in field in the sprite structure called 'filler'.
|
||||
short attackertype, hitextra, movflag;
|
||||
short tempang, dispicnum, basepicnum;
|
||||
short tempval, dispicnum, basepicnum;
|
||||
short timetosleep;
|
||||
DVector2 ovel;
|
||||
DAngle hitang;
|
||||
|
|
|
@ -98,7 +98,7 @@ DEFINE_FIELD(DDukeActor, spriteextra)
|
|||
DEFINE_FIELD(DDukeActor, hitang)
|
||||
DEFINE_FIELD(DDukeActor, hitextra)
|
||||
DEFINE_FIELD(DDukeActor, movflag)
|
||||
DEFINE_FIELD(DDukeActor, tempang)
|
||||
DEFINE_FIELD(DDukeActor, tempval)
|
||||
DEFINE_FIELD(DDukeActor, timetosleep)
|
||||
DEFINE_FIELD(DDukeActor, floorz)
|
||||
DEFINE_FIELD(DDukeActor, ceilingz)
|
||||
|
|
|
@ -29,7 +29,7 @@ class DukeActor : CoreActor native
|
|||
native uint8 cgg;
|
||||
native uint8 spriteextra; // moved here for easier maintenance. This was originally a hacked in field in the sprite structure called 'filler'.
|
||||
native int16 /*attackertype, hitang,*/ hitextra, movflag;
|
||||
native int16 tempang; /*, dispicnum;*/
|
||||
native int16 tempval; /*, dispicnum;*/
|
||||
native int16 timetosleep;
|
||||
native double floorz, ceilingz;
|
||||
native int saved_ammo;
|
||||
|
|
Loading…
Reference in a new issue