diff --git a/resources/assets/zscript/actors/hxdd/hexen2/pickups/powerupsphere.zs b/resources/assets/zscript/actors/hxdd/hexen2/pickups/powerupsphere.zs index 10d9f17..b9c5d16 100644 --- a/resources/assets/zscript/actors/hxdd/hexen2/pickups/powerupsphere.zs +++ b/resources/assets/zscript/actors/hxdd/hexen2/pickups/powerupsphere.zs @@ -67,11 +67,11 @@ class H2HolyStrength: HXDDPowerupSphere { self.A_StartSound("hexen2/items/artpkup"); // Give Health - int amountHealth = floor((1000.0 / 35.0) / tickDuration); + int amountHealth = floor((1000.0 / double(TICRATE)) / tickDuration); HealThing(amountHealth); // Give Ammo - int amount = floor((1000.0 / 35.0) / tickDuration); + int amount = floor((1000.0 / double(TICRATE)) / tickDuration); self.GiveAmmoAmount(toucher, amount); } } @@ -130,11 +130,11 @@ class H2SoulSphere: HXDDPowerupSphere { self.A_StartSound("hexen2/items/artpkup"); // Give Health - int amountHealth = floor((1000.0 / 35.0) / tickDuration) * 2; + int amountHealth = floor((1000.0 / double(TICRATE)) / tickDuration) * 2; HealThing(amountHealth); // Give Ammo - int amount = 15 + floor((1000.0 / 35.0) / tickDuration); + int amount = 15 + floor((1000.0 / double(TICRATE)) / tickDuration); self.GiveAmmoAmount(toucher, amount); } @@ -142,11 +142,11 @@ class H2SoulSphere: HXDDPowerupSphere { self.A_StartSound("hexen2/items/artpkup"); // Give Health - int amountHealth = floor((1000.0 / 35.0) / tickDuration); + int amountHealth = floor((1000.0 / double(TICRATE)) / tickDuration); HealThing(amountHealth); // Give Ammo - int amount = floor((1000.0 / 35.0) / tickDuration); + int amount = floor((1000.0 / double(TICRATE)) / tickDuration); self.GiveAmmoAmount(toucher, amount); } } diff --git a/resources/assets/zscript/actors/hxdd/hexen2/weapons/assassingrenades.zs b/resources/assets/zscript/actors/hxdd/hexen2/weapons/assassingrenades.zs index 8ab1602..6b0b4e5 100644 --- a/resources/assets/zscript/actors/hxdd/hexen2/weapons/assassingrenades.zs +++ b/resources/assets/zscript/actors/hxdd/hexen2/weapons/assassingrenades.zs @@ -182,7 +182,7 @@ class AWeapGrenades_Grenade: Hexen2Projectile { DeathSound "hexen2/weapons/explode"; Obituary "$OB_MPMWEAPFROST"; - AWeapGrenades_Grenade.tickDuration (2.0 * 35.0); + AWeapGrenades_Grenade.tickDuration (2.0 * double(TICRATE)); } States { @@ -277,7 +277,7 @@ class AWeapGrenades_Grenade: Hexen2Projectile { gren.SetOrigin(self.pos, false); gren.isModified = self.isModified; gren.ex_damage = ex_damage; - gren.ticNextExplosion = frandom(0.1, 0.6) * 35.0; + gren.ticNextExplosion = frandom(0.1, 0.6) * double(TICRATE); gren.isMulti = (i == 0); double x; @@ -365,7 +365,7 @@ class AWeapGrenades_SuperGrenade: Hexen2Projectile { gren.isMulti = self.isMulti; gren.isModified = self.isModified; gren.ex_damage = self.ex_damage; - gren.ticNextExplosion = frandom(0.1, 0.6) * 35.0; + gren.ticNextExplosion = frandom(0.1, 0.6) * double(TICRATE); double x; double y; diff --git a/resources/assets/zscript/actors/hxdd/hexen2/weapons/crusadericemace.zs b/resources/assets/zscript/actors/hxdd/hexen2/weapons/crusadericemace.zs index b0bb347..f8cdf25 100644 --- a/resources/assets/zscript/actors/hxdd/hexen2/weapons/crusadericemace.zs +++ b/resources/assets/zscript/actors/hxdd/hexen2/weapons/crusadericemace.zs @@ -120,7 +120,7 @@ class CWeapIceMace_IceShot1 : Hexen2Projectile { Obituary "$OB_MPMWEAPFROST"; Scale 1.5; - CWeapIceMace_IceShot1.tickDuration (4.0 * 35.0); + CWeapIceMace_IceShot1.tickDuration (4.0 * double(TICRATE)); } States diff --git a/resources/assets/zscript/actors/hxdd/hexen2/weapons/crusadermeteorstaff.zs b/resources/assets/zscript/actors/hxdd/hexen2/weapons/crusadermeteorstaff.zs index db90f7b..f59a8d3 100644 --- a/resources/assets/zscript/actors/hxdd/hexen2/weapons/crusadermeteorstaff.zs +++ b/resources/assets/zscript/actors/hxdd/hexen2/weapons/crusadermeteorstaff.zs @@ -90,7 +90,7 @@ class CWeapMeteorStaff_Meteor: Hexen2Projectile { DeathSound "hexen2/weapons/explode"; Obituary "$OB_MPMWEAPFROST"; - CWeapMeteorStaff_Meteor.tickDuration (5.0 * 35.0); + CWeapMeteorStaff_Meteor.tickDuration (5.0 * double(TICRATE)); } States diff --git a/resources/assets/zscript/actors/hxdd/hexen2/weapons/necromancerspellbook.zs b/resources/assets/zscript/actors/hxdd/hexen2/weapons/necromancerspellbook.zs index 1d6ff42..c4240e6 100644 --- a/resources/assets/zscript/actors/hxdd/hexen2/weapons/necromancerspellbook.zs +++ b/resources/assets/zscript/actors/hxdd/hexen2/weapons/necromancerspellbook.zs @@ -355,7 +355,7 @@ class NWeapSpellbook_Flash : Actor { Alpha = self.Default.Alpha * (tickDuration / (0.75 * 0.5)); } - tickDuration -= 35.0f / 100.0f; + tickDuration -= double(TICRATE) / 100.0f; } } @@ -541,7 +541,7 @@ class NWeapSpellbook_MagicMissile : Hexen2Projectile { Destroy(); } - tickDuration -= 35.0f / 1000.0f; + tickDuration -= double(TICRATE) / 1000.0f; Vector3 avelocity = (0, 0, frandom(300.0f,600.0f) / 32.0f); if (!self.useNewModel) { diff --git a/resources/assets/zscript/actors/hxdd/hexen2/weapons/paladinaxe.zs b/resources/assets/zscript/actors/hxdd/hexen2/weapons/paladinaxe.zs index 56cbda8..4a96662 100644 --- a/resources/assets/zscript/actors/hxdd/hexen2/weapons/paladinaxe.zs +++ b/resources/assets/zscript/actors/hxdd/hexen2/weapons/paladinaxe.zs @@ -313,7 +313,7 @@ class PWeapAxe_BladeProjectile : Hexen2Projectile { A_DestroySelf(); } - tickDuration -= 35.0f / 1000.0f; + tickDuration -= double(TICRATE) / 1000.0f; } void A_OnBounce() { diff --git a/resources/assets/zscript/actors/hxdd/hexen2/weapons/paladinpurifier.zs b/resources/assets/zscript/actors/hxdd/hexen2/weapons/paladinpurifier.zs index 59f95e5..461f944 100644 --- a/resources/assets/zscript/actors/hxdd/hexen2/weapons/paladinpurifier.zs +++ b/resources/assets/zscript/actors/hxdd/hexen2/weapons/paladinpurifier.zs @@ -206,7 +206,7 @@ class PWeapPurifier_Missile: Actor { DeathSound "hexen2/weapons/expsmall"; Obituary "$HXDD.HEXEN2.WEAPONS.PALADIN.PURIFIER.OBITUARY.1"; - PWeapPurifier_Missile.tickDuration (2.5 * 35.0); + PWeapPurifier_Missile.tickDuration (2.5 * double(TICRATE)); } States { @@ -284,7 +284,7 @@ class PWeapPurifier_DragonBall: Actor { DeathSound "hexen2/weapons/exphuge"; Obituary "$HXDD.HEXEN2.WEAPONS.PALADIN.PURIFIER.OBITUARY.1"; - PWeapPurifier_DragonBall.tickDuration (2.5 * 35.0); + PWeapPurifier_DragonBall.tickDuration (2.5 * double(TICRATE)); } States { @@ -299,7 +299,7 @@ class PWeapPurifier_DragonBall: Actor { void A_HandleHoming() { if (self.delayHoming <= 0.0) { self.A_SeekerMissile(2, 10, SMF_LOOK | SMF_CURSPEED, 50); - self.delayHoming = (0.15 * 35.0); + self.delayHoming = (0.15 * double(TICRATE)); return; } self.delayHoming--; @@ -308,7 +308,7 @@ class PWeapPurifier_DragonBall: Actor { override void PostBeginPlay() { Super.PostBeginPlay(); - self.delayHoming = ((1/3) * 35.0); + self.delayHoming = ((1/3) * double(TICRATE)); Vector3 avelocity = (-6.25, 6.25, -6.25); angle += avelocity.x; @@ -391,7 +391,7 @@ class PWeapPurifier_PuffRing: SpriteFXParticle { override void Tick() { Super.Tick(); - self.duration -= 1.0 / 35.0; + self.duration -= 1.0 / double(TICRATE); if (self.duration < 0.30) { self.ChangeTexture(4); diff --git a/resources/assets/zscript/actors/hxdd/hexen2/weapons/paladinvorpalsword.zs b/resources/assets/zscript/actors/hxdd/hexen2/weapons/paladinvorpalsword.zs index e17ec23..3a86719 100644 --- a/resources/assets/zscript/actors/hxdd/hexen2/weapons/paladinvorpalsword.zs +++ b/resources/assets/zscript/actors/hxdd/hexen2/weapons/paladinvorpalsword.zs @@ -384,7 +384,7 @@ class PWeapVorpalSword_MissileWave : Hexen2Projectile { Destroy(); } - tickDuration -= 35.0f / 1000.0f; + tickDuration -= double(TICRATE) / 1000.0f; Vector3 facing = LemonUtil.GetEularFromVelocity(self.vel); self.angle = facing.x; @@ -564,7 +564,7 @@ class PWeapVorpalSword_Shock2 : Actor { } override void BeginPlay() { - self.lifeTime = 0.5 * 35.0; + self.lifeTime = 0.5 * double(TICRATE); } override void Tick() { diff --git a/resources/assets/zscript/actors/hxdd/hexen2/weapons/succubusacidrune.zs b/resources/assets/zscript/actors/hxdd/hexen2/weapons/succubusacidrune.zs index 58f2637..3b36565 100644 --- a/resources/assets/zscript/actors/hxdd/hexen2/weapons/succubusacidrune.zs +++ b/resources/assets/zscript/actors/hxdd/hexen2/weapons/succubusacidrune.zs @@ -248,7 +248,7 @@ class SWeapAcidRune_Missile: Hexen2Projectile { DeathSound "hexen2/succubus/acidhit"; Obituary "$OB_MPSWEAPACIDRUNE"; - SWeapAcidRune_Missile.tickDuration (35.0 * 1.5); + SWeapAcidRune_Missile.tickDuration (double(TICRATE) * 1.5); } States { @@ -274,7 +274,7 @@ class SWeapAcidRune_Missile: Hexen2Projectile { if (self.isPowered) { // TODO: make veer cvar value as dependant between modes self.veerAmount = 30; - self.tickDuration = 35.0 * 5; + self.tickDuration = double(TICRATE) * 5; self.Scale = (2.5, 2.5); double avecz = frandom(0.0, 1.0) * -360.0 - 100.0; @@ -338,7 +338,7 @@ class SWeapAcidRune_Missile: Hexen2Projectile { sprfx.SetOrigin(self.pos, false); self.nextTrail = 0.1; } else { - self.nextTrail -= (1.0 / 35.0); + self.nextTrail -= (1.0 / double(TICRATE)); } } @@ -489,7 +489,7 @@ class SWeapAcidRune_PFX_Shimmer: Actor { if (self.remove) { self.Destroy(); } - self.delay -= (1.0 / 35.0); + self.delay -= (1.0 / double(TICRATE)); if (self.delay <= 0) { ParticleGenerator pg = ParticleGenerator(Spawn("ParticleGenerator")); pg.Attach(self); @@ -621,7 +621,7 @@ class SWeapAcidRune_AcidDrop: Hexen2Projectile { pgs.SetOrigin(self.pos, false); SWeapAcidRune_PFX_Shimmer(pgs).delay = 0.6; - self.lifetime -= (1.0 / 35.0); + self.lifetime -= (1.0 / double(TICRATE)); if (self.lifetime <= 0) { A_ExplodeAndDamage(); self.Destroy(); diff --git a/resources/assets/zscript/actors/hxdd/hexen2/weapons/succubusfirestorm.zs b/resources/assets/zscript/actors/hxdd/hexen2/weapons/succubusfirestorm.zs index a1dd170..658b7a9 100644 --- a/resources/assets/zscript/actors/hxdd/hexen2/weapons/succubusfirestorm.zs +++ b/resources/assets/zscript/actors/hxdd/hexen2/weapons/succubusfirestorm.zs @@ -241,7 +241,7 @@ class SWeapFireStorm_FlameStream: Hexen2Projectile { DeathSound "hexen2/succubus/flampow"; Obituary "$OB_MPSWEAPFIRESTORM"; - SWeapFireStorm_FlameStream.tickDuration (2.0 * 35.0); + SWeapFireStorm_FlameStream.tickDuration (2.0 * double(TICRATE)); } States { @@ -273,7 +273,7 @@ class SWeapFireStorm_FlameStream: Hexen2Projectile { if (self.isPowered) { // TODO: make veer cvar value as dependant between modes self.veerAmount = 30; - self.tickDuration = 35.0 * 5; + self.tickDuration = double(TICRATE) * 5; self.Scale = (2.5, 2.5); double avecz = frandom(0.0, 1.0) * -360.0 - 100.0; @@ -314,7 +314,7 @@ class SWeapFireStorm_FlameStream: Hexen2Projectile { //self.roll += self.avelocity.z; if (self.isPowered) { - self.nextTrail -= (1.0 / 35.0); + self.nextTrail -= (1.0 / double(TICRATE)); if (self.nextTrail <= 0.0) { Actor sprfx = Spawn("AcidMuzzleFlash"); sprfx.SetOrigin(self.pos, false); @@ -384,7 +384,7 @@ class SWeapFireStorm_Burner: Actor { Height 0; Radius 0; - SWeapFireStorm_Burner.tickDuration (5.0 * 35.0); + SWeapFireStorm_Burner.tickDuration (5.0 * double(TICRATE)); } States { @@ -396,7 +396,7 @@ class SWeapFireStorm_Burner: Actor { override void PostBeginPlay() { Super.PostBeginPlay(); - self.tickDuration = (5 + random[swfs_burner](0, 5) * 35.0); + self.tickDuration = (5 + random[swfs_burner](0, 5) * double(TICRATE)); } void AttachToActor(Actor nextTarget) { @@ -429,7 +429,7 @@ class SWeapFireStorm_Burner: Actor { pg.actorParticleTypes.push("FireWall2Particle"); pg.actorParticleTypes.push("FireWall3Particle"); - self.nextDamage = frandom(0.0, 0.5) * 35.0; + self.nextDamage = frandom(0.0, 0.5) * double(TICRATE); } void SetOwner(Actor owner) { @@ -456,7 +456,7 @@ class SWeapFireStorm_Burner: Actor { self.burnTarget.DamageMobj(self, self.target, random[swfs_burndmg](2,3), 'Fire'); self.A_StartSound("hexen2/raven/fire1", CHAN_WEAPON, 1); - self.nextDamage = frandom(0.0, 0.5) * 35.0; + self.nextDamage = frandom(0.0, 0.5) * double(TICRATE); } } } @@ -606,7 +606,7 @@ class SWeapFireStorm_FlameBall: Hexen2Projectile { DeathSound "hexen2/succubus/flampow"; Obituary "$OB_MPSWEAPFIRESTORM"; - //SWeapFireStorm_FlameBall.tickDuration (2.0 * 35.0); + //SWeapFireStorm_FlameBall.tickDuration (2.0 * double(TICRATE)); } States { diff --git a/resources/assets/zscript/actors/hxdd/hexen2/weapons/weaponbase.zs b/resources/assets/zscript/actors/hxdd/hexen2/weapons/weaponbase.zs index 9f8a8e8..1f4d599 100644 --- a/resources/assets/zscript/actors/hxdd/hexen2/weapons/weaponbase.zs +++ b/resources/assets/zscript/actors/hxdd/hexen2/weapons/weaponbase.zs @@ -246,7 +246,7 @@ class Hexen2Weapon: Weapon { ** Dynamic Refire ** Simulates Hexen II's delay before allowing to fire again **/ - double ticRate; // used to count how many tics have passed in a fire loop + double ticRatePassed; // used to count how many tics have passed in a fire loop double nextFire; action void ResetCooldown(Weapon ReadyWeapon) { Hexen2Weapon weap = Hexen2Weapon(ReadyWeapon); @@ -255,7 +255,7 @@ class Hexen2Weapon: Weapon { action void SetCooldown(Weapon ReadyWeapon, double seconds, double tics = 1) { Hexen2Weapon weap = Hexen2Weapon(ReadyWeapon); - weap.ticRate = tics; + weap.ticRatePassed = tics; weap.nextFire = seconds; } @@ -266,7 +266,7 @@ class Hexen2Weapon: Weapon { action bool CooldownTick(Weapon ReadyWeapon, int frameTime = 1) { Hexen2Weapon weap = Hexen2Weapon(ReadyWeapon); - weap.nextFire -= (frameTime / 35.0) * weap.ticRate; + weap.nextFire -= (frameTime / double(TICRATE)) * weap.ticRatePassed; return (weap.nextFire > 0.0); } diff --git a/resources/assets/zscript/statusbar/themes/hxddhexen2statusbar.zs b/resources/assets/zscript/statusbar/themes/hxddhexen2statusbar.zs index aaf4714..e49366b 100644 --- a/resources/assets/zscript/statusbar/themes/hxddhexen2statusbar.zs +++ b/resources/assets/zscript/statusbar/themes/hxddhexen2statusbar.zs @@ -222,9 +222,9 @@ class HXDDHexen2StatusBar : BaseStatusBar { if (!Level.NoInventoryBar && CPlayer.mo.InvSel != null) { if (isInventoryBarVisible()) { - invTime = clamp(invTime + (1.0 / 35.0), 0.0, INV_FADE_DURATION); + invTime = clamp(invTime + (1.0 / double(TICRATE)), 0.0, INV_FADE_DURATION); } else if (invTime != 0.0) { - invTime = clamp(invTime - (1.0 / 35.0), 0.0, INV_FADE_DURATION); + invTime = clamp(invTime - (1.0 / double(TICRATE)), 0.0, INV_FADE_DURATION); } if (invTime != 0.0) { int width = diparms_sbar.boxsize.X * INV_NUM_FIELDS; @@ -314,9 +314,9 @@ class HXDDHexen2StatusBar : BaseStatusBar { if (!Level.NoInventoryBar && CPlayer.mo.InvSel != null) { if (isInventoryBarVisible()) { - invTime = clamp(invTime + (1.0 / 35.0), 0.0, INV_FADE_DURATION); + invTime = clamp(invTime + (1.0 / double(TICRATE)), 0.0, INV_FADE_DURATION); } else if (invTime != 0.0) { - invTime = clamp(invTime - (1.0 / 35.0), 0.0, INV_FADE_DURATION); + invTime = clamp(invTime - (1.0 / double(TICRATE)), 0.0, INV_FADE_DURATION); } if (invTime != 0.0) { int width = diparms_sbar.boxsize.X * INV_NUM_FIELDS; diff --git a/resources/assets/zscript/statusbar/themes/split/hxddhereticsplitstatusbar.zs b/resources/assets/zscript/statusbar/themes/split/hxddhereticsplitstatusbar.zs index 19cc5e2..4882e76 100644 --- a/resources/assets/zscript/statusbar/themes/split/hxddhereticsplitstatusbar.zs +++ b/resources/assets/zscript/statusbar/themes/split/hxddhereticsplitstatusbar.zs @@ -387,9 +387,9 @@ class HXDDHereticSplitStatusBar : BaseStatusBar { if (!Level.NoInventoryBar && CPlayer.mo.InvSel != null) { if (isInventoryBarVisible()) { - invTime = clamp(invTime + (1.0 / 35.0), 0.0, invAnimationDuration); + invTime = clamp(invTime + (1.0 / double(TICRATE)), 0.0, invAnimationDuration); } else if (invTime != 0.0) { - invTime = clamp(invTime - (1.0 / 35.0), 0.0, invAnimationDuration); + invTime = clamp(invTime - (1.0 / double(TICRATE)), 0.0, invAnimationDuration); } if (invTime != 0.0) { double posInventory = LemonUtil.flerp(80.0, 0.0, LemonUtil.Easing_Quadradic_Out(invTime / invAnimationDuration)); diff --git a/resources/assets/zscript/statusbar/themes/split/hxddhexen2splitstatusbar.zs b/resources/assets/zscript/statusbar/themes/split/hxddhexen2splitstatusbar.zs index 267ba82..63197a5 100644 --- a/resources/assets/zscript/statusbar/themes/split/hxddhexen2splitstatusbar.zs +++ b/resources/assets/zscript/statusbar/themes/split/hxddhexen2splitstatusbar.zs @@ -406,9 +406,9 @@ class HXDDHexen2SplitStatusBar : BaseStatusBar { DrawImage("assets/ui/FS_HEXEN2_SBAR_RIGHT_ITEM.png", (anchorRight - 49, anchorBottom) + v2Right, DI_SCREEN_RIGHT_BOTTOM | DI_ITEM_RIGHT_BOTTOM); if (!Level.NoInventoryBar && CPlayer.mo.InvSel != null) { if (isInventoryBarVisible()) { - invTime = clamp(invTime + (1.0 / 35.0), 0.0, invAnimationDuration); + invTime = clamp(invTime + (1.0 / double(TICRATE)), 0.0, invAnimationDuration); } else if (invTime != 0.0) { - invTime = clamp(invTime - (1.0 / 35.0), 0.0, invAnimationDuration); + invTime = clamp(invTime - (1.0 / double(TICRATE)), 0.0, invAnimationDuration); } if (invTime != 0.0) { double posInventory = LemonUtil.flerp(80.0, 0.0, LemonUtil.Easing_Quadradic_Out(invTime / invAnimationDuration));