mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- refactor all oclipdist uses
This commit is contained in:
parent
d22c473c31
commit
7ed45d713a
2 changed files with 14 additions and 16 deletions
|
@ -1251,7 +1251,6 @@ int DoRadiationCloud(DSWActor* actor)
|
|||
int PlayerInitChemBomb(PLAYER* pp)
|
||||
{
|
||||
DSWActor* plActor = pp->actor;
|
||||
short oclipdist;
|
||||
|
||||
|
||||
PlaySound(DIGI_THROW, pp, v3df_dontpan | v3df_doppler);
|
||||
|
@ -1291,13 +1290,13 @@ int PlayerInitChemBomb(PLAYER* pp)
|
|||
|
||||
actorNew->vel.Z += pp->horizon.horiz.Tan() * HORIZ_MULTF;
|
||||
|
||||
oclipdist = plActor->native_clipdist();
|
||||
double oclipdist = plActor->clipdist;
|
||||
plActor->clipdist = 0;
|
||||
actorNew->clipdist = 0;
|
||||
|
||||
MissileSetPos(actorNew, DoChemBomb, 1000);
|
||||
|
||||
plActor->set_native_clipdist(oclipdist);
|
||||
plActor->clipdist = oclipdist;
|
||||
actorNew->clipdist = 5;
|
||||
|
||||
UpdateChange(actorNew, 0.5);
|
||||
|
@ -1631,7 +1630,6 @@ void SpawnFlashBombOnActor(DSWActor* actor)
|
|||
int PlayerInitCaltrops(PLAYER* pp)
|
||||
{
|
||||
DSWActor* plActor = pp->actor;
|
||||
short oclipdist;
|
||||
|
||||
PlaySound(DIGI_THROW, pp, v3df_dontpan | v3df_doppler);
|
||||
|
||||
|
@ -1666,13 +1664,13 @@ int PlayerInitCaltrops(PLAYER* pp)
|
|||
|
||||
actorNew->vel.Z += pp->horizon.horiz.Tan() * HORIZ_MULTF;
|
||||
|
||||
oclipdist = plActor->native_clipdist();
|
||||
double oclipdist = plActor->clipdist;
|
||||
plActor->clipdist = 0;
|
||||
actorNew->clipdist = 0;
|
||||
|
||||
MissileSetPos(actorNew, DoCaltrops, 1000);
|
||||
|
||||
plActor->set_native_clipdist(oclipdist);
|
||||
plActor->clipdist = oclipdist;
|
||||
actorNew->clipdist = 5;
|
||||
|
||||
UpdateChange(actorNew, 0.5);
|
||||
|
|
|
@ -12069,7 +12069,7 @@ void InitSpellNapalm(PLAYER* pp)
|
|||
actor->user.ceiling_dist = (1);
|
||||
actor->user.Dist = 12.5;
|
||||
|
||||
auto oclipdist = plActor->native_clipdist();
|
||||
auto oclipdist = plActor->clipdist;
|
||||
plActor->clipdist = 0.25;
|
||||
|
||||
if (mp[i].dist_over != 0)
|
||||
|
@ -12083,7 +12083,7 @@ void InitSpellNapalm(PLAYER* pp)
|
|||
|
||||
if (MissileSetPos(actor, DoNapalm, mp[i].dist_out))
|
||||
{
|
||||
plActor->set_native_clipdist(oclipdist);
|
||||
plActor->clipdist = oclipdist;
|
||||
KillActor(actor);
|
||||
continue;
|
||||
}
|
||||
|
@ -12091,7 +12091,7 @@ void InitSpellNapalm(PLAYER* pp)
|
|||
if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actor))
|
||||
actor->user.Flags |= (SPR_UNDERWATER);
|
||||
|
||||
plActor->set_native_clipdist(oclipdist);
|
||||
plActor->clipdist = oclipdist;
|
||||
|
||||
actor->user.Counter = 0;
|
||||
|
||||
|
@ -12201,13 +12201,13 @@ int InitSpellMirv(PLAYER* pp)
|
|||
actorNew->user.Dist = 12.5;
|
||||
|
||||
DSWActor* plActor = pp->actor;
|
||||
auto oclipdist = plActor->native_clipdist();
|
||||
auto oclipdist = plActor->clipdist;
|
||||
plActor->clipdist = 0;
|
||||
|
||||
UpdateChange(actorNew);
|
||||
|
||||
MissileSetPos(actorNew, DoMirv, 600);
|
||||
plActor->set_native_clipdist(oclipdist);
|
||||
plActor->clipdist = oclipdist;
|
||||
|
||||
actorNew->user.Counter = 0;
|
||||
return 0;
|
||||
|
@ -13176,14 +13176,14 @@ void InitHeartAttack(PLAYER* pp)
|
|||
actorNew->user.ceiling_dist = (1);
|
||||
actorNew->user.Dist = 12.5;
|
||||
|
||||
auto oclipdist = plActor->native_clipdist();
|
||||
auto oclipdist = plActor->clipdist;
|
||||
plActor->clipdist = 0.25;
|
||||
|
||||
UpdateChange(actorNew);
|
||||
|
||||
MissileSetPos(actorNew, DoBloodWorm, mp[i].dist_out);
|
||||
|
||||
plActor->set_native_clipdist(oclipdist);
|
||||
plActor->clipdist = oclipdist;
|
||||
actorNew->user.Counter = 0;
|
||||
actorNew->user.Counter2 = 0;
|
||||
actorNew->user.Counter3 = 0;
|
||||
|
@ -15341,7 +15341,7 @@ int InitTracerUzi(PLAYER* pp)
|
|||
actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);
|
||||
|
||||
DSWActor* plActor = pp->actor;
|
||||
auto oclipdist = plActor->native_clipdist();
|
||||
auto oclipdist = plActor->clipdist;
|
||||
plActor->clipdist = 0;
|
||||
|
||||
actorNew->spr.angle += DAngle90;
|
||||
|
@ -15353,14 +15353,14 @@ int InitTracerUzi(PLAYER* pp)
|
|||
|
||||
if (MissileSetPos(actorNew, DoTracerStart, 800))
|
||||
{
|
||||
plActor->set_native_clipdist(oclipdist);
|
||||
plActor->clipdist = oclipdist;
|
||||
KillActor(actorNew);
|
||||
return 0;
|
||||
}
|
||||
|
||||
actorNew->vel.Z = pp->horizon.horiz.Tan() * actorNew->vel.X;
|
||||
|
||||
plActor->set_native_clipdist(oclipdist);
|
||||
plActor->clipdist = oclipdist;
|
||||
|
||||
WeaponAutoAim(pp->actor, actorNew, DAngle22_5 / 4, false);
|
||||
|
||||
|
|
Loading…
Reference in a new issue