- renamed 2 integer functions to add float variants

This commit is contained in:
Christoph Oelckers 2022-08-21 09:49:25 +02:00
parent abf9d764c4
commit 9ed66acd44
14 changed files with 80 additions and 70 deletions

View file

@ -331,7 +331,7 @@ int DoActorSectorDamage(DSWActor* actor)
}
}
}
else if (ActorZOfBottom(actor) >= sectp->int_floorz())
else if (int_ActorZOfBottom(actor) >= sectp->int_floorz())
{
if ((actor->user.DamageTics -= synctics) < 0)
{

View file

@ -217,7 +217,7 @@ int DoActorNoise(ANIMATOR* Action, DSWActor* actor)
bool CanSeePlayer(DSWActor* actor)
{
// if actor can still see the player
int look_height = ActorZOfTop(actor);
int look_height = int_ActorZOfTop(actor);
if (actor->user.targetActor && FAFcansee(actor->int_pos().X, actor->int_pos().Y, look_height, actor->sector(), actor->user.targetActor->int_pos().X, actor->user.targetActor->int_pos().Y, ActorUpperZ(actor->user.targetActor), actor->user.targetActor->sector()))
return true;
@ -279,7 +279,7 @@ int DoActorPickClosePlayer(DSWActor* actor)
int pnum;
PLAYER* pp;
// if actor can still see the player
int look_height = ActorZOfTop(actor);
int look_height = int_ActorZOfTop(actor);
bool found = false;
int i;

View file

@ -894,7 +894,7 @@ void DoPickCloseBunny(DSWActor* actor)
int dist, near_dist = 1000, a,b,c;
// if actor can still see the player
int look_height = ActorZOfTop(actor);
int look_height = int_ActorZOfTop(actor);
bool ICanSee = false;
SWStatIterator it(STAT_ENEMY);
@ -1003,7 +1003,7 @@ int DoBunnyQuickJump(DSWActor* actor)
if (pp == Player+myconnectindex)
{
choose_snd = StdRandomRange(2<<8)>>8;
if (FAFcansee(actor->int_pos().X,actor->int_pos().Y,ActorZOfTop(actor),actor->sector(),pp->int_ppos().X, pp->int_ppos().Y, pp->int_ppos().Z, pp->cursector) && Facing(actor, actor->user.targetActor))
if (FAFcansee(actor->int_pos().X,actor->int_pos().Y,int_ActorZOfTop(actor),actor->sector(),pp->int_ppos().X, pp->int_ppos().Y, pp->int_ppos().Z, pp->cursector) && Facing(actor, actor->user.targetActor))
PlayerSound(fagsnds[choose_snd], v3df_doppler|v3df_follow|v3df_dontpan,pp);
}
}
@ -1018,7 +1018,7 @@ int DoBunnyQuickJump(DSWActor* actor)
if (pp == Player+myconnectindex)
{
choose_snd = StdRandomRange(3<<8)>>8;
if (FAFcansee(actor->int_pos().X,actor->int_pos().Y,ActorZOfTop(actor),actor->sector(),pp->int_ppos().X, pp->int_ppos().Y, pp->int_ppos().Z, pp->cursector) && Facing(actor, actor->user.targetActor))
if (FAFcansee(actor->int_pos().X,actor->int_pos().Y,int_ActorZOfTop(actor),actor->sector(),pp->int_ppos().X, pp->int_ppos().Y, pp->int_ppos().Z, pp->cursector) && Facing(actor, actor->user.targetActor))
PlayerSound(straightsnds[choose_snd], v3df_doppler|v3df_follow|v3df_dontpan,pp);
}
}

View file

@ -436,7 +436,7 @@ int DoEelMatchPlayerZ(DSWActor* actor)
// actor does a sine wave about actor->user.sz - this is the z mid point
zdiff = (ActorZOfBottom(actor->user.targetActor) - Z(8)) - actor->user.int_upos().Z;
zdiff = (int_ActorZOfBottom(actor->user.targetActor) - Z(8)) - actor->user.int_upos().Z;
// check z diff of the player and the sprite
zdist = Z(20 + RandomRange(64)); // put a random amount

View file

@ -2104,24 +2104,34 @@ inline int16_t SP_TAG13(DSWActor* actor) { return int16_t(uint8_t(actor->spr.xof
inline void SET_SP_TAG13(DSWActor* actor, int val) { actor->spr.xoffset = uint8_t(val); actor->spr.yoffset = uint8_t(val >> 8); }
// actual Z for TOS and BOS - handles both WYSIWYG and old style
inline int ActorZOfTop(DSWActor* actor)
inline int int_ActorZOfTop(DSWActor* actor)
{
return GetSpriteZOfTop(&actor->spr);
}
inline int ActorZOfBottom(DSWActor* actor)
inline double ActorZOfTop(DSWActor* actor)
{
return GetSpriteZOfTop(&actor->spr) * zinttoworld;
}
inline int int_ActorZOfBottom(DSWActor* actor)
{
return GetSpriteZOfBottom(&actor->spr);
}
inline double ActorZOfBottom(DSWActor* actor)
{
return GetSpriteZOfBottom(&actor->spr) * zinttoworld;
}
inline int int_ActorZOfMiddle(DSWActor* actor)
{
return (ActorZOfTop(actor) + ActorZOfBottom(actor)) >> 1;
return (int_ActorZOfTop(actor) + int_ActorZOfBottom(actor)) >> 1;
}
inline double ActorZOfMiddle(DSWActor* actor)
{
return (ActorZOfTop(actor) + ActorZOfBottom(actor)) * zinttoworld * 0.5;
return (int_ActorZOfTop(actor) + int_ActorZOfBottom(actor)) * zinttoworld * 0.5;
}
inline int ActorSizeZ(DSWActor* actor)
@ -2131,17 +2141,17 @@ inline int ActorSizeZ(DSWActor* actor)
inline int ActorUpperZ(DSWActor* actor)
{
return (ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2));
return (int_ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2));
}
inline int int_ActorLowerZ(DSWActor* actor)
{
return (ActorZOfBottom(actor) - (ActorSizeZ(actor) >> 2));
return (int_ActorZOfBottom(actor) - (ActorSizeZ(actor) >> 2));
}
inline double ActorLowerZ(DSWActor* actor)
{
return (ActorZOfBottom(actor) - (ActorSizeZ(actor) * 0.25)) * zinttoworld;
return (int_ActorZOfBottom(actor) - (ActorSizeZ(actor) * 0.25)) * zinttoworld;
}
// Z size of top (TOS) and bottom (BOS) part of sprite

View file

@ -1799,7 +1799,7 @@ int InitBloodSpray(DSWActor* actor, bool dogib, short velocity)
nx = actor->int_pos().X;
ny = actor->int_pos().Y;
nz = ActorZOfTop(actor)-20;
nz = int_ActorZOfTop(actor)-20;
// Spawn a shot
auto actorNew = SpawnActor(STAT_MISSILE, GOREDrip, s_BloodSprayChunk, actor->sector(),

View file

@ -1188,11 +1188,11 @@ DSWActor* DoPickTarget(DSWActor* actor, uint32_t max_delta_ang, int skip_targets
if (actor->hasU() && actor->user.PlayerP)
zh = actor->user.PlayerP->int_ppos().Z;
else
zh = ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
zh = int_ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
ezh = ActorZOfTop(itActor) + (ActorSizeZ(itActor) >> 2);
ezhm = ActorZOfTop(itActor) + (ActorSizeZ(itActor) >> 1);
ezhl = ActorZOfBottom(itActor) - (ActorSizeZ(itActor) >> 2);
ezh = int_ActorZOfTop(itActor) + (ActorSizeZ(itActor) >> 2);
ezhm = int_ActorZOfTop(itActor) + (ActorSizeZ(itActor) >> 1);
ezhl = int_ActorZOfBottom(itActor) - (ActorSizeZ(itActor) >> 2);
// If you can't see 'em you can't shoot 'em
if (!FAFcansee(actor->int_pos().X, actor->int_pos().Y, zh, actor->sector(), itActor->int_pos().X, itActor->int_pos().Y, ezh, itActor->sector()) &&
@ -1307,7 +1307,7 @@ void DoSpawnTeleporterEffect(DSWActor* actor)
ny += actor->int_pos().Y;
auto effectActor = SpawnActor(STAT_MISSILE, 0, s_TeleportEffect, actor->sector(),
nx, ny, ActorZOfTop(actor) + Z(16),
nx, ny, int_ActorZOfTop(actor) + Z(16),
actor->int_ang(), 0);
SetActorZ(effectActor, effectActor->int_pos());
@ -1325,7 +1325,7 @@ void DoSpawnTeleporterEffectPlace(DSWActor* actor)
extern STATE s_TeleportEffect[];
auto effectActor = SpawnActor(STAT_MISSILE, 0, s_TeleportEffect, actor->sector(),
actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor) + Z(16),
actor->int_pos().X, actor->int_pos().Y, int_ActorZOfTop(actor) + Z(16),
actor->int_ang(), 0);
SetActorZ(effectActor, effectActor->int_pos());
@ -1693,7 +1693,7 @@ void UpdatePlayerUnderSprite(PLAYER* pp)
water_level_z = act_over->sector()->int_floorz(); // - Z(pp->WadeDepth);
// if not below water
above_water = (ActorZOfBottom(act_over) <= water_level_z);
above_water = (int_ActorZOfBottom(act_over) <= water_level_z);
in_dive_area = SpriteInDiveArea(act_over);
// if not in dive area OR (in dive area AND above the water) - Kill it
@ -1726,7 +1726,7 @@ void UpdatePlayerUnderSprite(PLAYER* pp)
// find z water level of the top sector
// diff between the bottom of the upper sprite and the water level
zdiff = ActorZOfBottom(act_over) - water_level_z;
zdiff = int_ActorZOfBottom(act_over) - water_level_z;
// add diff to ceiling
act_under->set_int_z(act_under->sector()->int_ceilingz() + zdiff);
@ -2932,7 +2932,7 @@ void StackedWaterSplash(PLAYER* pp)
{
auto sect = pp->cursector;
updatesectorz(pp->int_ppos().X, pp->int_ppos().Y, ActorZOfBottom(pp->actor), &sect);
updatesectorz(pp->int_ppos().X, pp->int_ppos().Y, int_ActorZOfBottom(pp->actor), &sect);
if (SectorIsUnderwaterArea(sect))
{
@ -3795,7 +3795,7 @@ int PlayerCanDiveNoWarp(PLAYER* pp)
{
auto sect = pp->cursector;
updatesectorz(pp->int_ppos().X, pp->int_ppos().Y, ActorZOfBottom(pp->actor), &sect);
updatesectorz(pp->int_ppos().X, pp->int_ppos().Y, int_ActorZOfBottom(pp->actor), &sect);
if (SectorIsUnderwaterArea(sect))
{
@ -5688,7 +5688,7 @@ void DoPlayerDeathFollowKiller(PLAYER* pp)
DSWActor* killer = pp->KillerActor;
if (killer)
{
if (FAFcansee(killer->int_pos().X, killer->int_pos().Y, ActorZOfTop(killer), killer->sector(), pp->int_ppos().X, pp->int_ppos().Y, pp->int_ppos().Z, pp->cursector))
if (FAFcansee(killer->int_pos().X, killer->int_pos().Y, int_ActorZOfTop(killer), killer->sector(), pp->int_ppos().X, pp->int_ppos().Y, pp->int_ppos().Z, pp->cursector))
{
pp->angle.addadjustment(deltaangle(pp->angle.ang, VecToAngle(killer->int_pos().X - pp->int_ppos().X, killer->int_pos().Y - pp->int_ppos().Y)) * (1. / 16.));
}

View file

@ -895,7 +895,7 @@ int PickJumpMaxSpeed(DSWActor* actor, short max_speed)
actor->user.jump_speed = max_speed;
actor->user.jump_grav = 8;
zh = ActorZOfTop(actor);
zh = int_ActorZOfTop(actor);
while (true)
{

View file

@ -2298,7 +2298,7 @@ void PlayerOperateEnv(PLAYER* pp)
{
PlayerTakeSectorDamage(pp);
}
else if ((ActorZOfBottom(pp->actor) >= sectp->int_floorz()) && !(pp->Flags & PF_DIVING))
else if ((int_ActorZOfBottom(pp->actor) >= sectp->int_floorz()) && !(pp->Flags & PF_DIVING))
{
PlayerTakeSectorDamage(pp);
}

View file

@ -232,7 +232,7 @@ int SetupSkull(DSWActor* actor)
actor->user.Radius = 400;
if (ActorZOfBottom(actor) > actor->user.int_loz() - Z(16))
if (int_ActorZOfBottom(actor) > actor->user.int_loz() - Z(16))
{
actor->spr.pos.Z = actor->user.loz + tileTopOffset(actor->spr.picnum);
@ -617,7 +617,7 @@ int SetupBetty(DSWActor* actor)
actor->user.Radius = 400;
if (ActorZOfBottom(actor) > actor->user.int_loz() - Z(16))
if (int_ActorZOfBottom(actor) > actor->user.int_loz() - Z(16))
{
actor->spr.pos.Z = actor->user.loz + tileTopOffset(actor->spr.picnum);

View file

@ -4266,11 +4266,11 @@ bool SpriteOverlap(DSWActor* actor_a, DSWActor* actor_b)
return false;
}
spa_tos = ActorZOfTop(actor_a);
spa_bos = ActorZOfBottom(actor_a);
spa_tos = int_ActorZOfTop(actor_a);
spa_bos = int_ActorZOfBottom(actor_a);
spb_tos = ActorZOfTop(actor_b);
spb_bos = ActorZOfBottom(actor_b);
spb_tos = int_ActorZOfTop(actor_b);
spb_bos = int_ActorZOfBottom(actor_b);
overlap_z = actor_a->user.OverlapZ + actor_b->user.OverlapZ;
@ -4295,11 +4295,11 @@ bool SpriteOverlapZ(DSWActor* actor_a, DSWActor* actor_b, int z_overlap)
{
int spa_tos, spa_bos, spb_tos, spb_bos;
spa_tos = ActorZOfTop(actor_a);
spa_bos = ActorZOfBottom(actor_a);
spa_tos = int_ActorZOfTop(actor_a);
spa_bos = int_ActorZOfBottom(actor_a);
spb_tos = ActorZOfTop(actor_b);
spb_bos = ActorZOfBottom(actor_b);
spb_tos = int_ActorZOfTop(actor_b);
spb_bos = int_ActorZOfBottom(actor_b);
// if the top of sprite a is below the bottom of b
@ -5900,7 +5900,7 @@ void AdjustActiveRange(PLAYER* pp, DSWActor* actor, int dist)
//
// if actor can still see the player
look_height = ActorZOfTop(actor);
look_height = int_ActorZOfTop(actor);
if (FAFcansee(actor->int_pos().X, actor->int_pos().Y, look_height, actor->sector(), plActor->int_pos().X, plActor->int_pos().Y, ActorUpperZ(plActor), plActor->sector()))
{
// Player is visible

View file

@ -765,7 +765,7 @@ void BossHealthMeter(void)
DSWActor* actor = BossSpriteNum[i];
if (actor != nullptr && !bosswasseen[i])
{
if (cansee(actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor), actor->sector(), pp->int_ppos().X, pp->int_ppos().Y, pp->int_ppos().Z - Z(40), pp->cursector))
if (cansee(actor->int_pos().X, actor->int_pos().Y, int_ActorZOfTop(actor), actor->sector(), pp->int_ppos().X, pp->int_ppos().Y, pp->int_ppos().Z - Z(40), pp->cursector))
{
if (i == 0 && !bosswasseen[0])
{

View file

@ -3314,7 +3314,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
// Get the z height to climb
//
neartag({ actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor) - (ActorSizeZ(actor) >> 1) }, actor->sector(), actor->int_ang(), near, 600, NTAG_SEARCH_LO_HI);
neartag({ actor->int_pos().X, actor->int_pos().Y, int_ActorZOfTop(actor) - (ActorSizeZ(actor) >> 1) }, actor->sector(), actor->int_ang(), near, 600, NTAG_SEARCH_LO_HI);
if (near.hitWall == nullptr)
{
@ -3343,7 +3343,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
//
actor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
double bos_z = ActorZOfBottom(actor) * zinttoworld;
double bos_z = ActorZOfBottom(actor);
if (bos_z > actor->user.loz)
{
actor->user.pos.Y = (bos_z - actor->spr.pos.Z);
@ -3496,7 +3496,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
if (actor->user.Flags & (SPR_CLIMBING))
{
if (ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2) < actor->user.int_upos().Z)
if (int_ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2) < actor->user.int_upos().Z)
{
actor->user.Flags &= ~(SPR_CLIMBING);

View file

@ -3661,8 +3661,8 @@ AutoShrap:
}
}
hz[Z_TOP] = ActorZOfTop(parentActor); // top
hz[Z_BOT] = ActorZOfBottom(parentActor); // bottom
hz[Z_TOP] = int_ActorZOfTop(parentActor); // top
hz[Z_BOT] = int_ActorZOfBottom(parentActor); // bottom
hz[Z_MID] = (hz[0] + hz[2]) >> 1; // mid
for (; p->id; p++)
@ -4025,7 +4025,7 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, short hit_ang, int hit_x, i
hit_ang = actor->int_ang();
hit_x = actor->int_pos().X;
hit_y = actor->int_pos().Y;
hit_z = ActorZOfTop(weapActor) + (ActorSizeZ(weapActor) >> 4);
hit_z = int_ActorZOfTop(weapActor) + (ActorSizeZ(weapActor) >> 4);
}
else
{
@ -4033,7 +4033,7 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, short hit_ang, int hit_x, i
hit_ang = NORM_ANGLE(weapActor->int_ang() + 1024);
hit_x = actor->int_pos().X;
hit_y = actor->int_pos().Y;
hit_z = ActorZOfTop(weapActor) + (ActorSizeZ(weapActor) >> 2);
hit_z = int_ActorZOfTop(weapActor) + (ActorSizeZ(weapActor) >> 2);
}
break;
case SERP_RUN_R0:
@ -4041,7 +4041,7 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, short hit_ang, int hit_x, i
hit_ang = NORM_ANGLE(weapActor->int_ang() + 1024);
hit_x = actor->int_pos().X;
hit_y = actor->int_pos().Y;
hit_z = ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
hit_z = int_ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
break;
case BLADE1:
case BLADE2:
@ -4066,14 +4066,14 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, short hit_ang, int hit_x, i
hit_ang = weapActor->int_ang();
hit_x = actor->int_pos().X;
hit_y = actor->int_pos().Y;
hit_z = ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
hit_z = int_ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
break;
default:
p = SomeBlood;
hit_ang = NORM_ANGLE(weapActor->int_ang() + 1024);
hit_x = actor->int_pos().X;
hit_y = actor->int_pos().Y;
hit_z = ActorZOfTop(weapActor) + (ActorSizeZ(weapActor) >> 2);
hit_z = int_ActorZOfTop(weapActor) + (ActorSizeZ(weapActor) >> 2);
break;
}
}
@ -7701,7 +7701,7 @@ int MissileSeek(DSWActor* actor, int16_t delay_tics, int16_t aware_range/*, int1
actor->add_int_ang(-delta_ang);
zh = ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
zh = int_ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
delta_ang = (zh - actor->int_pos().Z)>>1;
@ -7770,7 +7770,7 @@ int ComboMissileSeek(DSWActor* actor, int16_t delay_tics, int16_t aware_range/*,
actor->user.change.X = MOVEx(actor->spr.xvel, actor->int_ang());
actor->user.change.Y = MOVEy(actor->spr.xvel, actor->int_ang());
zh = ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
zh = int_ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
dist = ksqrt(SQ(actor->int_pos().X - goal->int_pos().X) + SQ(actor->int_pos().Y - goal->int_pos().Y) + (SQ(actor->int_pos().Z - zh)>>8));
@ -7835,7 +7835,7 @@ int VectorMissileSeek(DSWActor* actor, int16_t delay_tics, int16_t turn_speed, i
{
int ox,oy,oz;
zh = ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
zh = int_ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
dist = ksqrt(SQ(actor->int_pos().X - goal->int_pos().X) + SQ(actor->int_pos().Y - goal->int_pos().Y) + (SQ(actor->int_pos().Z - zh)>>8));
@ -7893,7 +7893,7 @@ int VectorWormSeek(DSWActor* actor, int16_t delay_tics, int16_t aware_range1, in
{
int ox,oy,oz;
zh = ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
zh = int_ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
dist = ksqrt(SQ(actor->int_pos().X - goal->int_pos().X) + SQ(actor->int_pos().Y - goal->int_pos().Y) + (SQ(actor->int_pos().Z - zh)>>8));
@ -7937,7 +7937,7 @@ int DoBlurExtend(DSWActor* actor, int16_t interval, int16_t blur_num)
int InitPlasmaFountain(DSWActor* wActor, DSWActor* sActor)
{
auto actorNew = SpawnActor(STAT_MISSILE, PLASMA_FOUNTAIN, s_PlasmaFountain, sActor->sector(),
sActor->int_pos().X, sActor->int_pos().Y, ActorZOfBottom(sActor), sActor->int_ang(), 0);
sActor->int_pos().X, sActor->int_pos().Y, int_ActorZOfBottom(sActor), sActor->int_ang(), 0);
actorNew->spr.shade = -40;
if (wActor)
@ -11385,7 +11385,7 @@ int InitLavaThrow(DSWActor* actor)
nx = actor->int_pos().X;
ny = actor->int_pos().Y;
nz = ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
nz = int_ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
// Spawn a shot
auto actorNew = SpawnActor(STAT_MISSILE, LAVA_BOULDER, s_LavaBoulder, actor->sector(),
@ -11525,7 +11525,7 @@ int InitSerpRing(DSWActor* actor)
actorNew->spr.zvel = Z(3);
actorNew->spr.pal = 0;
actorNew->set_int_z(ActorZOfTop(actor) - Z(20));
actorNew->set_int_z(int_ActorZOfTop(actor) - Z(20));
actorNew->user.pos.Z = 50;
// ang around the serp is now slide_ang
@ -11657,7 +11657,7 @@ int InitEnemyNapalm(DSWActor* actor)
for (i = 0; i < SIZ(mp); i++)
{
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL1, s_Napalm, actor->sector(),
actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2), actor->int_ang(), NAPALM_VELOCITY);
actor->int_pos().X, actor->int_pos().Y, int_ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2), actor->int_ang(), NAPALM_VELOCITY);
actorNew->spr.hitag = LUMINOUS; //Always full brightness
if (i==0) // Only attach sound to first projectile
@ -11759,7 +11759,7 @@ int InitEnemyMirv(DSWActor* actor)
PlaySound(DIGI_MIRVFIRE, actor, v3df_none);
auto actorNew = SpawnActor(STAT_MISSILE, MIRV_METEOR, s_Mirv, actor->sector(),
actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2), actor->int_ang(), MIRV_VELOCITY);
actor->int_pos().X, actor->int_pos().Y, int_ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2), actor->int_ang(), MIRV_VELOCITY);
PlaySound(DIGI_MIRVWIZ, actorNew, v3df_follow);
@ -12181,7 +12181,7 @@ int InitSumoNapalm(DSWActor* actor)
for (size_t i = 0; i < countof(mp); i++)
{
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL1, s_Napalm, actor->sector(),
actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor), ang, NAPALM_VELOCITY);
actor->int_pos().X, actor->int_pos().Y, int_ActorZOfTop(actor), ang, NAPALM_VELOCITY);
actorNew->spr.hitag = LUMINOUS; //Always full brightness
if (i == 0) // Only attach sound to first projectile
@ -12379,7 +12379,7 @@ int WeaponAutoAim(DSWActor* actor, DSWActor* mislActor, short ang, bool test)
{
int tos, diff, siz;
tos = ActorZOfTop(hitActor);
tos = int_ActorZOfTop(hitActor);
diff = mislActor->int_pos().Z - tos;
siz = ActorSizeZ(hitActor);
@ -12435,7 +12435,7 @@ int WeaponAutoAimZvel(DSWActor* actor, DSWActor* missileActor, int *zvel, short
{
int tos, diff, siz;
tos = ActorZOfTop(hitActor);
tos = int_ActorZOfTop(hitActor);
diff = missileActor->int_pos().Z - tos;
siz = ActorSizeZ(hitActor);
@ -12533,7 +12533,7 @@ DSWActor* WeaponAutoAimHitscan(DSWActor* actor, int *z, short *ang, bool test)
if (dist != 0)
{
zh = ActorZOfTop(picked) + (ActorSizeZ(picked) >> 2);
zh = int_ActorZOfTop(picked) + (ActorSizeZ(picked) >> 2);
xvect = bcos(*ang);
yvect = bsin(*ang);
@ -12566,7 +12566,7 @@ void WeaponHitscanShootFeet(DSWActor* actor, DSWActor* hitActor, int *zvect)
if (dist != 0)
{
zh = ActorZOfBottom(hitActor) + Z(20);
zh = int_ActorZOfBottom(hitActor) + Z(20);
z = actor->int_pos().Z;
xvect = bcos(ang);
@ -13183,7 +13183,7 @@ int InitZillaRail(DSWActor* actor)
nx = actor->int_pos().X;
ny = actor->int_pos().Y;
nz = ActorZOfTop(actor);
nz = int_ActorZOfTop(actor);
// Spawn a shot
// Inserting and setting up variables
@ -13732,7 +13732,7 @@ int InitMicro(PLAYER* pp)
if (dist != 0)
{
int zh;
zh = ActorZOfTop(picked) + (ActorSizeZ(picked) >> 2);
zh = int_ActorZOfTop(picked) + (ActorSizeZ(picked) >> 2);
actorNew->spr.zvel = (actorNew->spr.xvel * (zh - actorNew->int_pos().Z)) / dist;
}
@ -14044,7 +14044,7 @@ int InitSerpSpell(DSWActor* actor)
auto actorNew = SpawnActor(STAT_MISSILE, SERP_METEOR, &sg_SerpMeteor[0][0], actor->sector(),
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 1500);
actorNew->set_int_z(ActorZOfTop(actor));
actorNew->set_int_z(int_ActorZOfTop(actor));
actorNew->user.RotNum = 5;
NewStateGroup(actorNew, &sg_SerpMeteor[0]);
@ -14143,7 +14143,7 @@ int InitSerpMonstSpell(DSWActor* actor)
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 500);
actorNew->user.spal = actorNew->spr.pal = 25; // Bright Red
actorNew->set_int_z(ActorZOfTop(actor));
actorNew->set_int_z(int_ActorZOfTop(actor));
actorNew->user.RotNum = 5;
NewStateGroup(actorNew, &sg_SerpMeteor[0]);
@ -15412,7 +15412,7 @@ int InitTurretMicro(DSWActor* actor, PLAYER* pp)
if (dist != 0)
{
int zh;
zh = ActorZOfTop(picked) + (ActorSizeZ(picked) >> 2);
zh = int_ActorZOfTop(picked) + (ActorSizeZ(picked) >> 2);
actorNew->spr.zvel = (actorNew->spr.xvel * (zh - actorNew->int_pos().Z)) / dist;
}
@ -16129,7 +16129,7 @@ int InitEnemyUzi(DSWActor* actor)
if (actor->user.ID == ZILLA_RUN_R0)
{
zh = ActorZOfTop(actor);
zh = int_ActorZOfTop(actor);
zh += Z(20);
}
else