diff --git a/source/games/sw/src/actor.cpp b/source/games/sw/src/actor.cpp index b995c3262..a2b29d845 100644 --- a/source/games/sw/src/actor.cpp +++ b/source/games/sw/src/actor.cpp @@ -331,7 +331,7 @@ int DoActorSectorDamage(DSWActor* actor) } } } - else if (int_ActorZOfBottom(actor) >= sectp->int_floorz()) + else if (ActorZOfBottom(actor) >= sectp->floorz) { if ((actor->user.DamageTics -= synctics) < 0) { diff --git a/source/games/sw/src/ai.cpp b/source/games/sw/src/ai.cpp index f7812df38..cbefd0e48 100644 --- a/source/games/sw/src/ai.cpp +++ b/source/games/sw/src/ai.cpp @@ -98,11 +98,7 @@ bool ActorFlaming(DSWActor* actor) auto flame = actor->user.flameActor; if (flame != nullptr) { - int size; - - size = int_ActorSizeZ(actor) - (int_ActorSizeZ(actor) >> 2); - - if (int_ActorSizeZ(flame) > size) + if (ActorSizeZ(flame) > ActorSizeZ(actor) * 0.75) return true; } diff --git a/source/games/sw/src/coolie.cpp b/source/games/sw/src/coolie.cpp index 782f2bec5..d3988265f 100644 --- a/source/games/sw/src/coolie.cpp +++ b/source/games/sw/src/coolie.cpp @@ -411,7 +411,7 @@ void EnemyDefaults(DSWActor* actor, ACTOR_ACTION_SET* action, PERSONALITY* perso actor->user.lo_step = Z(32); 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; actor->user.Radius = 400; diff --git a/source/games/sw/src/jweapon.cpp b/source/games/sw/src/jweapon.cpp index 98918e6aa..53aa1d563 100644 --- a/source/games/sw/src/jweapon.cpp +++ b/source/games/sw/src/jweapon.cpp @@ -1726,8 +1726,7 @@ int InitPhosphorus(DSWActor* actor) int InitBloodSpray(DSWActor* actor, bool dogib, short velocity) { - int nx, ny, nz; - short i, cnt, ang, vel, rnd; + short cnt, vel, rnd; if (dogib) @@ -1746,10 +1745,9 @@ int InitBloodSpray(DSWActor* actor, bool dogib, short velocity) PlaySound(DIGI_GIBS3, actor, v3df_none); // } - ang = actor->int_ang(); vel = velocity; - - for (i=0; ispr.angle; + for (int i=0; iint_pos().X; - ny = actor->int_pos().Y; - nz = int_ActorZOfTop(actor)-20; + ang = ang + DAngle180 + DAngle45 - DAngle::fromBuild(RandomRange(256)); // Spawn a shot auto actorNew = SpawnActor(STAT_MISSILE, GOREDrip, s_BloodSprayChunk, actor->sector(), - nx, ny, nz, ang, vel*2); + ActorVectOfTop(actor).plusZ(- 20/256.), ang, vel*2); actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); if (dogib) @@ -2106,7 +2100,7 @@ int DoFlag(DSWActor* actor) // attach weapon to sprite actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); SetAttach(hitActor, actor); - actor->user.pos.Z = hitActor->spr.pos.Z - (int_ActorSizeZ(hitActor) >> 1) * zinttoworld; + actor->user.pos.Z = hitActor->spr.pos.Z - ActorSizeZ(hitActor) * 0.5; } }