mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
- some simple replacements.
This commit is contained in:
parent
933e5eb35a
commit
c6bb8cea89
3 changed files with 15 additions and 16 deletions
|
@ -738,7 +738,7 @@ int SetupSerp(DSWActor* actor)
|
||||||
actor->user.lo_step = Z(40);
|
actor->user.lo_step = Z(40);
|
||||||
|
|
||||||
actor->user.floor_dist = actor->user.zclip - actor->user.lo_step * zinttoworld;
|
actor->user.floor_dist = actor->user.zclip - actor->user.lo_step * zinttoworld;
|
||||||
actor->user.ceiling_dist = int_ActorSizeZ(actor) * zinttoworld - actor->user.zclip;
|
actor->user.ceiling_dist = ActorSizeZ(actor) - actor->user.zclip;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -456,7 +456,7 @@ int DoVator(DSWActor* actor)
|
||||||
{
|
{
|
||||||
if (itActor->spr.statnum == STAT_ENEMY)
|
if (itActor->spr.statnum == STAT_ENEMY)
|
||||||
{
|
{
|
||||||
if (abs(sectp->int_ceilingz() - sectp->int_floorz()) < int_ActorSizeZ(itActor))
|
if (abs(sectp->ceilingz - sectp->floorz) < ActorSizeZ(itActor))
|
||||||
{
|
{
|
||||||
InitBloodSpray(itActor, true, -1);
|
InitBloodSpray(itActor, true, -1);
|
||||||
UpdateSinglePlayKills(itActor);
|
UpdateSinglePlayKills(itActor);
|
||||||
|
@ -502,7 +502,7 @@ int DoVator(DSWActor* actor)
|
||||||
{
|
{
|
||||||
if (itActor->spr.statnum == STAT_ENEMY)
|
if (itActor->spr.statnum == STAT_ENEMY)
|
||||||
{
|
{
|
||||||
if (abs(sectp->int_ceilingz() - sectp->int_floorz()) < int_ActorSizeZ(itActor))
|
if (abs(sectp->ceilingz - sectp->floorz) < ActorSizeZ(itActor))
|
||||||
{
|
{
|
||||||
InitBloodSpray(itActor, true, -1);
|
InitBloodSpray(itActor, true, -1);
|
||||||
UpdateSinglePlayKills(itActor);
|
UpdateSinglePlayKills(itActor);
|
||||||
|
|
|
@ -4310,7 +4310,7 @@ bool WeaponMoveHit(DSWActor* actor)
|
||||||
|
|
||||||
if ((sectp->ceilingstat & CSTAT_SECTOR_SKY) && sectp->ceilingpicnum != FAF_MIRROR_PIC)
|
if ((sectp->ceilingstat & CSTAT_SECTOR_SKY) && sectp->ceilingpicnum != FAF_MIRROR_PIC)
|
||||||
{
|
{
|
||||||
if (labs(actor->int_pos().Z - sectp->int_ceilingz()) < int_ActorSizeZ(actor))
|
if (abs(actor->spr.pos.Z - sectp->ceilingz) < ActorSizeZ(actor))
|
||||||
{
|
{
|
||||||
SetSuicide(actor);
|
SetSuicide(actor);
|
||||||
return true;
|
return true;
|
||||||
|
@ -8715,7 +8715,7 @@ int DoMine(DSWActor* actor)
|
||||||
|
|
||||||
SetMineStuck(actor);
|
SetMineStuck(actor);
|
||||||
// Set the Z position
|
// Set the Z position
|
||||||
actor->set_int_z(hitActor->int_pos().Z - (int_ActorSizeZ(hitActor) >> 1));
|
actor->spr.pos.Z = hitActor->spr.pos.Z - (ActorSizeZ(hitActor) * 0.5);
|
||||||
|
|
||||||
// If it's not alive, don't stick it
|
// If it's not alive, don't stick it
|
||||||
if (hitActor->hasU() && hitActor->user.Health <= 0) return false; // JBF: added null check
|
if (hitActor->hasU() && hitActor->user.Health <= 0) return false; // JBF: added null check
|
||||||
|
@ -10967,7 +10967,7 @@ int DoRing(DSWActor* actor)
|
||||||
auto own = GetOwner(actor);
|
auto own = GetOwner(actor);
|
||||||
if (!own) return 0; // this would crash.
|
if (!own) return 0; // this would crash.
|
||||||
PLAYER* pp = own->user.PlayerP;;
|
PLAYER* pp = own->user.PlayerP;;
|
||||||
int cz,fz;
|
double cz,fz;
|
||||||
|
|
||||||
if (actor->user.Flags & (SPR_UNDERWATER))
|
if (actor->user.Flags & (SPR_UNDERWATER))
|
||||||
{
|
{
|
||||||
|
@ -11026,14 +11026,14 @@ int DoRing(DSWActor* actor)
|
||||||
getzsofslopeptr(actor->sector(), actor->spr.pos, &cz, &fz);
|
getzsofslopeptr(actor->sector(), actor->spr.pos, &cz, &fz);
|
||||||
|
|
||||||
// bound the sprite by the sectors ceiling and floor
|
// bound the sprite by the sectors ceiling and floor
|
||||||
if (actor->int_pos().Z > fz)
|
if (actor->spr.pos.Z > fz)
|
||||||
{
|
{
|
||||||
actor->set_int_z(fz);
|
actor->spr.pos.Z = fz;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor->int_pos().Z < cz + int_ActorSizeZ(actor))
|
if (actor->spr.pos.Z < cz + ActorSizeZ(actor))
|
||||||
{
|
{
|
||||||
actor->set_int_z(cz + int_ActorSizeZ(actor));
|
actor->spr.pos.Z = (cz + ActorSizeZ(actor));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Done last - check for damage
|
// Done last - check for damage
|
||||||
|
@ -11102,7 +11102,7 @@ void InitSpellRing(PLAYER* pp)
|
||||||
int DoSerpRing(DSWActor* actor)
|
int DoSerpRing(DSWActor* actor)
|
||||||
{
|
{
|
||||||
int dist,a,b,c;
|
int dist,a,b,c;
|
||||||
int cz,fz;
|
double cz,fz;
|
||||||
|
|
||||||
auto own = GetOwner(actor);
|
auto own = GetOwner(actor);
|
||||||
// if Owner does not exist or he's dead on the floor
|
// if Owner does not exist or he's dead on the floor
|
||||||
|
@ -11152,14 +11152,14 @@ int DoSerpRing(DSWActor* actor)
|
||||||
getzsofslopeptr(actor->sector(), actor->spr.pos, &cz, &fz);
|
getzsofslopeptr(actor->sector(), actor->spr.pos, &cz, &fz);
|
||||||
|
|
||||||
// bound the sprite by the sectors ceiling and floor
|
// bound the sprite by the sectors ceiling and floor
|
||||||
if (actor->int_pos().Z > fz)
|
if (actor->spr.pos.Z > fz)
|
||||||
{
|
{
|
||||||
actor->set_int_z(fz);
|
actor->spr.pos.Z = fz;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor->int_pos().Z < cz + int_ActorSizeZ(actor))
|
if (actor->spr.pos.Z < cz + ActorSizeZ(actor))
|
||||||
{
|
{
|
||||||
actor->set_int_z(cz + int_ActorSizeZ(actor));
|
actor->spr.pos.Z = cz + ActorSizeZ(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor->user.Counter2 > 0)
|
if (actor->user.Counter2 > 0)
|
||||||
|
@ -12209,7 +12209,6 @@ int WeaponAutoAim(DSWActor* actor, DSWActor* mislActor, short ang, bool test)
|
||||||
int WeaponAutoAimZvel(DSWActor* actor, DSWActor* missileActor, int *zvel, short ang, bool test)
|
int WeaponAutoAimZvel(DSWActor* actor, DSWActor* missileActor, int *zvel, short ang, bool test)
|
||||||
{
|
{
|
||||||
int dist;
|
int dist;
|
||||||
int zh;
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
//formula for leading a player
|
//formula for leading a player
|
||||||
|
|
Loading…
Reference in a new issue