mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 07:01:09 +00:00
- renamed variables for refactoring.
This commit is contained in:
parent
44e4367ee7
commit
2ab87ad18c
5 changed files with 34 additions and 34 deletions
|
@ -618,9 +618,9 @@ int DoActorBeginSlide(DSWActor* actor, int ang, int vel, int dec)
|
||||||
{
|
{
|
||||||
actor->user.Flags |= (SPR_SLIDING);
|
actor->user.Flags |= (SPR_SLIDING);
|
||||||
|
|
||||||
actor->user.slide_ang = ang;
|
actor->user._slide_ang = ang;
|
||||||
actor->user.slide_vel = vel;
|
actor->user._slide_vel = vel;
|
||||||
actor->user.slide_dec = dec;
|
actor->user._slide_dec = dec;
|
||||||
|
|
||||||
//DoActorSlide(actor);
|
//DoActorSlide(actor);
|
||||||
|
|
||||||
|
@ -634,8 +634,8 @@ int DoActorSlide(DSWActor* actor)
|
||||||
{
|
{
|
||||||
int nx, ny;
|
int nx, ny;
|
||||||
|
|
||||||
nx = MulScale(actor->user.slide_vel, bcos(actor->user.slide_ang), 14);
|
nx = MulScale(actor->user._slide_vel, bcos(actor->user._slide_ang), 14);
|
||||||
ny = MulScale(actor->user.slide_vel, bsin(actor->user.slide_ang), 14);
|
ny = MulScale(actor->user._slide_vel, bsin(actor->user._slide_ang), 14);
|
||||||
|
|
||||||
if (!move_actor(actor, DVector3(nx * inttoworld, ny * inttoworld, 0)))
|
if (!move_actor(actor, DVector3(nx * inttoworld, ny * inttoworld, 0)))
|
||||||
{
|
{
|
||||||
|
@ -643,9 +643,9 @@ int DoActorSlide(DSWActor* actor)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
actor->user.slide_vel -= actor->user.slide_dec * ACTORMOVETICS;
|
actor->user._slide_vel -= actor->user._slide_dec * ACTORMOVETICS;
|
||||||
|
|
||||||
if (actor->user.slide_vel < 20)
|
if (actor->user._slide_vel < 20)
|
||||||
{
|
{
|
||||||
actor->user.Flags &= ~(SPR_SLIDING);
|
actor->user.Flags &= ~(SPR_SLIDING);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1040,9 +1040,9 @@ struct USER
|
||||||
int track_vel;
|
int track_vel;
|
||||||
|
|
||||||
// sliding variables - slide backwards etc
|
// sliding variables - slide backwards etc
|
||||||
int16_t slide_ang;
|
int16_t _slide_ang;
|
||||||
int slide_vel;
|
int _slide_vel;
|
||||||
int16_t slide_dec;
|
int16_t _slide_dec;
|
||||||
|
|
||||||
int16_t motion_blur_dist;
|
int16_t motion_blur_dist;
|
||||||
int16_t motion_blur_num;
|
int16_t motion_blur_num;
|
||||||
|
|
|
@ -5451,7 +5451,7 @@ void DoPlayerBeginDie(PLAYER* pp)
|
||||||
|
|
||||||
pp->Flags |= (PF_DEAD_HEAD | PF_JUMPING);
|
pp->Flags |= (PF_DEAD_HEAD | PF_JUMPING);
|
||||||
pp->jump_speed = -300;
|
pp->jump_speed = -300;
|
||||||
plActor->user.slide_vel = 0;
|
plActor->user._slide_vel = 0;
|
||||||
SpawnShrap(pp->actor, nullptr);
|
SpawnShrap(pp->actor, nullptr);
|
||||||
plActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
plActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
||||||
NewStateGroup(pp->actor, sg_PlayerHeadFly);
|
NewStateGroup(pp->actor, sg_PlayerHeadFly);
|
||||||
|
@ -5484,7 +5484,7 @@ void DoPlayerBeginDie(PLAYER* pp)
|
||||||
|
|
||||||
pp->Flags |= (PF_DEAD_HEAD | PF_JUMPING);
|
pp->Flags |= (PF_DEAD_HEAD | PF_JUMPING);
|
||||||
pp->jump_speed = 200;
|
pp->jump_speed = 200;
|
||||||
plActor->user.slide_vel = 800;
|
plActor->user._slide_vel = 800;
|
||||||
SpawnShrap(pp->actor, nullptr);
|
SpawnShrap(pp->actor, nullptr);
|
||||||
plActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
plActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
||||||
NewStateGroup(pp->actor, sg_PlayerHeadFly);
|
NewStateGroup(pp->actor, sg_PlayerHeadFly);
|
||||||
|
@ -5703,10 +5703,10 @@ void DoPlayerDeathCheckKick(PLAYER* pp)
|
||||||
{
|
{
|
||||||
pp->KillerActor = itActor;
|
pp->KillerActor = itActor;
|
||||||
|
|
||||||
plActor->user.slide_ang = getangle(plActor->int_pos().X - itActor->int_pos().X, plActor->int_pos().Y - itActor->int_pos().Y);
|
plActor->user._slide_ang = getangle(plActor->int_pos().X - itActor->int_pos().X, plActor->int_pos().Y - itActor->int_pos().Y);
|
||||||
plActor->user.slide_ang = NORM_ANGLE(plActor->user.slide_ang + (RANDOM_P2(128<<5)>>5) - 64);
|
plActor->user._slide_ang = NORM_ANGLE(plActor->user._slide_ang + (RANDOM_P2(128<<5)>>5) - 64);
|
||||||
|
|
||||||
plActor->user.slide_vel = itActor->int_xvel() << 1;
|
plActor->user._slide_vel = itActor->int_xvel() << 1;
|
||||||
plActor->user.Flags &= ~(SPR_BOUNCE);
|
plActor->user.Flags &= ~(SPR_BOUNCE);
|
||||||
pp->jump_speed = -500;
|
pp->jump_speed = -500;
|
||||||
NewStateGroup(pp->actor, sg_PlayerHeadFly);
|
NewStateGroup(pp->actor, sg_PlayerHeadFly);
|
||||||
|
@ -5721,8 +5721,8 @@ void DoPlayerDeathCheckKick(PLAYER* pp)
|
||||||
// sector stomper kick
|
// sector stomper kick
|
||||||
if (abs(pp->loz - pp->hiz) < ActorSizeZ(plActor) - 8)
|
if (abs(pp->loz - pp->hiz) < ActorSizeZ(plActor) - 8)
|
||||||
{
|
{
|
||||||
plActor->user.slide_ang = RANDOM_P2(2048);
|
plActor->user._slide_ang = RANDOM_P2(2048);
|
||||||
plActor->user.slide_vel = 1000;
|
plActor->user._slide_vel = 1000;
|
||||||
plActor->user.Flags &= ~(SPR_BOUNCE);
|
plActor->user.Flags &= ~(SPR_BOUNCE);
|
||||||
pp->jump_speed = -100;
|
pp->jump_speed = -100;
|
||||||
NewStateGroup(pp->actor, sg_PlayerHeadFly);
|
NewStateGroup(pp->actor, sg_PlayerHeadFly);
|
||||||
|
@ -5737,8 +5737,8 @@ void DoPlayerDeathMoveHead(PLAYER* pp)
|
||||||
DSWActor* plActor = pp->actor;
|
DSWActor* plActor = pp->actor;
|
||||||
int dax,day;
|
int dax,day;
|
||||||
|
|
||||||
dax = MOVEx(plActor->user.slide_vel, plActor->user.slide_ang);
|
dax = MOVEx(plActor->user._slide_vel, plActor->user._slide_ang);
|
||||||
day = MOVEy(plActor->user.slide_vel, plActor->user.slide_ang);
|
day = MOVEy(plActor->user._slide_vel, plActor->user._slide_ang);
|
||||||
|
|
||||||
plActor->user.coll = move_sprite(pp->actor, dax, day, 0, Z(16), Z(16), 1, synctics);
|
plActor->user.coll = move_sprite(pp->actor, dax, day, 0, Z(16), Z(16), 1, synctics);
|
||||||
{
|
{
|
||||||
|
@ -5755,8 +5755,8 @@ void DoPlayerDeathMoveHead(PLAYER* pp)
|
||||||
|
|
||||||
|
|
||||||
wall_ang = NORM_ANGLE(hitActor->int_ang());
|
wall_ang = NORM_ANGLE(hitActor->int_ang());
|
||||||
dang = getincangle(wall_ang, plActor->user.slide_ang);
|
dang = getincangle(wall_ang, plActor->user._slide_ang);
|
||||||
plActor->user.slide_ang = NORM_ANGLE(wall_ang + 1024 - dang);
|
plActor->user._slide_ang = NORM_ANGLE(wall_ang + 1024 - dang);
|
||||||
|
|
||||||
SpawnShrap(pp->actor, nullptr);
|
SpawnShrap(pp->actor, nullptr);
|
||||||
break;
|
break;
|
||||||
|
@ -5765,8 +5765,8 @@ void DoPlayerDeathMoveHead(PLAYER* pp)
|
||||||
{
|
{
|
||||||
int wall_ang = NORM_ANGLE(getangle(plActor->user.coll.hitWall->delta())-512);
|
int wall_ang = NORM_ANGLE(getangle(plActor->user.coll.hitWall->delta())-512);
|
||||||
|
|
||||||
int dang = getincangle(wall_ang, plActor->user.slide_ang);
|
int dang = getincangle(wall_ang, plActor->user._slide_ang);
|
||||||
plActor->user.slide_ang = NORM_ANGLE(wall_ang + 1024 - dang);
|
plActor->user._slide_ang = NORM_ANGLE(wall_ang + 1024 - dang);
|
||||||
|
|
||||||
SpawnShrap(pp->actor, nullptr);
|
SpawnShrap(pp->actor, nullptr);
|
||||||
break;
|
break;
|
||||||
|
@ -5879,7 +5879,7 @@ void DoPlayerDeathBounce(PLAYER* pp)
|
||||||
{
|
{
|
||||||
plActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
plActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
NewStateGroup(pp->actor, sg_PlayerHead);
|
NewStateGroup(pp->actor, sg_PlayerHead);
|
||||||
plActor->user.slide_vel = 0;
|
plActor->user._slide_vel = 0;
|
||||||
plActor->user.Flags |= (SPR_BOUNCE);
|
plActor->user.Flags |= (SPR_BOUNCE);
|
||||||
|
|
||||||
|
|
||||||
|
@ -5888,8 +5888,8 @@ void DoPlayerDeathBounce(PLAYER* pp)
|
||||||
|
|
||||||
plActor->user.Flags |= (SPR_BOUNCE);
|
plActor->user.Flags |= (SPR_BOUNCE);
|
||||||
pp->jump_speed = -300;
|
pp->jump_speed = -300;
|
||||||
plActor->user.slide_vel >>= 2;
|
plActor->user._slide_vel >>= 2;
|
||||||
plActor->user.slide_ang = NORM_ANGLE((RANDOM_P2(64<<8)>>8) - 32);
|
plActor->user._slide_ang = NORM_ANGLE((RANDOM_P2(64<<8)>>8) - 32);
|
||||||
pp->Flags |= (PF_JUMPING);
|
pp->Flags |= (PF_JUMPING);
|
||||||
SpawnShrap(pp->actor, nullptr);
|
SpawnShrap(pp->actor, nullptr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -815,9 +815,9 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, USER& w, USER* def
|
||||||
("point", w.point, def->point)
|
("point", w.point, def->point)
|
||||||
("track_dir", w.track_dir, def->track_dir)
|
("track_dir", w.track_dir, def->track_dir)
|
||||||
("track_vel", w.track_vel, def->track_vel)
|
("track_vel", w.track_vel, def->track_vel)
|
||||||
("slide_ang", w.slide_ang, def->slide_ang)
|
("slide_ang", w._slide_ang, def->_slide_ang)
|
||||||
("slide_vel", w.slide_vel, def->slide_vel)
|
("slide_vel", w._slide_vel, def->_slide_vel)
|
||||||
("slide_dec", w.slide_dec, def->slide_dec)
|
("slide_dec", w._slide_dec, def->_slide_dec)
|
||||||
("motion_blur_dist", w.motion_blur_dist, def->motion_blur_dist)
|
("motion_blur_dist", w.motion_blur_dist, def->motion_blur_dist)
|
||||||
("motion_blur_num", w.motion_blur_num, def->motion_blur_num)
|
("motion_blur_num", w.motion_blur_num, def->motion_blur_num)
|
||||||
("wait_active_check", w.wait_active_check, def->wait_active_check)
|
("wait_active_check", w.wait_active_check, def->wait_active_check)
|
||||||
|
|
|
@ -5366,9 +5366,9 @@ int PlayerCheckDeath(PLAYER* pp, DSWActor* weapActor)
|
||||||
DoPlayerBeginDie(pp);
|
DoPlayerBeginDie(pp);
|
||||||
|
|
||||||
// for death direction
|
// for death direction
|
||||||
actor->user.slide_ang = getangle(actor->int_pos().X - weapActor->int_pos().X, actor->int_pos().Y - weapActor->int_pos().Y);
|
actor->user._slide_ang = getangle(actor->int_pos().X - weapActor->int_pos().X, actor->int_pos().Y - weapActor->int_pos().Y);
|
||||||
// for death velocity
|
// for death velocity
|
||||||
actor->user.slide_vel = actor->user.LastDamage * 5;
|
actor->user._slide_vel = actor->user.LastDamage * 5;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -11114,7 +11114,7 @@ int DoSerpRing(DSWActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
// rotate the ring
|
// rotate the ring
|
||||||
actor->user.slide_ang = NORM_ANGLE(actor->user.slide_ang + actor->spr.yint);
|
actor->user._slide_ang = NORM_ANGLE(actor->user._slide_ang + actor->spr.yint);
|
||||||
|
|
||||||
// rotate the heads
|
// rotate the heads
|
||||||
if (actor->user.Flags & (SPR_BOUNCE))
|
if (actor->user.Flags & (SPR_BOUNCE))
|
||||||
|
@ -11123,7 +11123,7 @@ int DoSerpRing(DSWActor* actor)
|
||||||
actor->set_int_ang(NORM_ANGLE(actor->int_ang() - (28 * RINGMOVETICS)));
|
actor->set_int_ang(NORM_ANGLE(actor->int_ang() - (28 * RINGMOVETICS)));
|
||||||
|
|
||||||
// put it out there
|
// put it out there
|
||||||
actor->add_int_pos({ MulScale(int(actor->user.Dist * worldtoint), bcos(actor->user.slide_ang), 14), MulScale(int(actor->user.Dist * worldtoint), bsin(actor->user.slide_ang), 14), 0 });
|
actor->add_int_pos({ MulScale(int(actor->user.Dist * worldtoint), bcos(actor->user._slide_ang), 14), MulScale(int(actor->user.Dist * worldtoint), bsin(actor->user._slide_ang), 14), 0 });
|
||||||
|
|
||||||
SetActor(actor, actor->spr.pos);
|
SetActor(actor, actor->spr.pos);
|
||||||
|
|
||||||
|
@ -11337,7 +11337,7 @@ int InitSerpRing(DSWActor* actor)
|
||||||
actorNew->user.pos.Z = 50;
|
actorNew->user.pos.Z = 50;
|
||||||
|
|
||||||
// ang around the serp is now slide_ang
|
// ang around the serp is now slide_ang
|
||||||
actorNew->user.slide_ang = actorNew->int_ang();
|
actorNew->user._slide_ang = actorNew->int_ang();
|
||||||
// randomize the head turning angle
|
// randomize the head turning angle
|
||||||
actorNew->set_int_ang(RANDOM_P2(2048<<5)>>5);
|
actorNew->set_int_ang(RANDOM_P2(2048<<5)>>5);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue