diff --git a/src/compatibility.cpp b/src/compatibility.cpp index 60f9d8ad6..742f43eee 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -533,8 +533,9 @@ void SetCompatibilityParams() if (CompatParams[i+1] < numsectors) { sector_t *sec = §ors[CompatParams[i+1]]; - sec->floorplane.ChangeHeight(CompatParams[i+2]); - sec->ChangePlaneTexZ(sector_t::floor, CompatParams[i+2] / 65536.); + const double delta = CompatParams[i + 2] / 65536.0; + sec->floorplane.ChangeHeight(delta); + sec->ChangePlaneTexZ(sector_t::floor, delta); } i += 3; break; diff --git a/wadsrc/static/zscript/doom/archvile.txt b/wadsrc/static/zscript/doom/archvile.txt index 9faa80495..a19e5c705 100644 --- a/wadsrc/static/zscript/doom/archvile.txt +++ b/wadsrc/static/zscript/doom/archvile.txt @@ -125,25 +125,26 @@ extend class Actor void A_VileAttack(sound snd = "vile/stop", int initialdmg = 20, int blastdmg = 70, int blastradius = 70, double thrust = 1.0, name damagetype = "Fire", int flags = 0) { - if (target) + Actor targ = target; + if (targ) { A_FaceTarget(); - if (!CheckSight(target, 0)) return; + if (!CheckSight(targ, 0)) return; A_PlaySound(snd, CHAN_WEAPON); - int newdam = target.DamageMobj (self, self, initialdmg, (flags & VAF_DMGTYPEAPPLYTODIRECT)? damagetype : 'none'); + int newdam = targ.DamageMobj (self, self, initialdmg, (flags & VAF_DMGTYPEAPPLYTODIRECT)? damagetype : 'none'); - TraceBleed (newdam > 0 ? newdam : initialdmg, target); + TraceBleed (newdam > 0 ? newdam : initialdmg, targ); Actor fire = tracer; if (fire) { // move the fire between the vile and the player - fire.SetOrigin(target.Vec3Angle(-24., angle, 0), true); + fire.SetOrigin(targ.Vec3Angle(-24., angle, 0), true); fire.A_Explode(blastdmg, blastradius, XF_NOSPLASH, false, 0, 0, 0, "BulletPuff", damagetype); } - if (!target.bDontThrust) + if (!targ.bDontThrust) { - target.Vel.z = thrust * 1000 / max(1, target.Mass); + targ.Vel.z = thrust * 1000 / max(1, targ.Mass); } } }