4.10 support:

- CORRECTPIXELSTRETCH where needed on models.
 - Replace CoordUtil.GetAxes with quaternion version.
This commit is contained in:
Marisa the Magician 2022-12-05 15:54:56 +01:00
commit e8b9a55378
36 changed files with 142 additions and 175 deletions

View file

@ -8,10 +8,11 @@ Model "UTPlayerTBoss"
SurfaceSkin 0 3 "Boss/boss4.png" SurfaceSkin 0 3 "Boss/boss4.png"
SurfaceSkin 0 5 "GunPick1.png" SurfaceSkin 0 5 "GunPick1.png"
Scale 0.23 0.23 0.23 Scale 0.23 0.23 0.23
Offset 0 -5 29 Offset 0 -5 24
RollOffset -90 RollOffset -90
AngleOffset -90 AngleOffset -90
IGNORETRANSLATION IGNORETRANSLATION
CORRECTPIXELSTRETCH
// Still // Still
FrameIndex PLAY A 0 373 FrameIndex PLAY A 0 373
FrameIndex PLAY B 0 374 FrameIndex PLAY B 0 374

View file

@ -14,9 +14,10 @@ Model "UTChainsaw"
Path "models" Path "models"
Model 1 "ChainSawPick_d.3d" Model 1 "ChainSawPick_d.3d"
Skin 1 "JChainSawPick1.png" Skin 1 "JChainSawPick1.png"
Offset -10.5 -0.7 6 Offset -10.5 -0.7 5
Scale 0.14 0.14 0.14 Scale 0.14 0.14 0.14
RollOffset -90 RollOffset -90
CORRECTPIXELSTRETCH
FrameIndex CSWP B 1 0 FrameIndex CSWP B 1 0
@ -105,4 +106,4 @@ Model "UTChainsaw"
FrameIndex CSWD D 0 65 FrameIndex CSWD D 0 65
FrameIndex CSWD E 0 66 FrameIndex CSWD E 0 66
FrameIndex CSWD F 0 67 FrameIndex CSWD F 0 67
} }

View file

@ -8,10 +8,11 @@ Model "UTPlayerTMale1"
SurfaceSkin 0 3 "Commando/cmdo4.png" SurfaceSkin 0 3 "Commando/cmdo4.png"
SurfaceSkin 0 5 "GunPick1.png" SurfaceSkin 0 5 "GunPick1.png"
Scale 0.23 0.23 0.23 Scale 0.23 0.23 0.23
Offset 0 -5 29 Offset 0 -5 24
RollOffset -90 RollOffset -90
AngleOffset -90 AngleOffset -90
IGNORETRANSLATION IGNORETRANSLATION
CORRECTPIXELSTRETCH
// Still // Still
FrameIndex PLAY A 0 373 FrameIndex PLAY A 0 373
FrameIndex PLAY B 0 374 FrameIndex PLAY B 0 374

View file

@ -5,7 +5,8 @@ Model "UTRocketAmmo"
Skin 0 "JRocketPack1.png" Skin 0 "JRocketPack1.png"
Scale 0.072 0.072 0.072 Scale 0.072 0.072 0.072
RollOffset -90 RollOffset -90
ZOffset 7 ZOffset 6
CORRECTPIXELSTRETCH
FrameIndex RPAK A 0 0 FrameIndex RPAK A 0 0
} }
@ -15,9 +16,10 @@ Model "UTRocketAmmo2"
Path "models" Path "models"
Model 0 "UTRocket_d.3d" Model 0 "UTRocket_d.3d"
Skin 0 "JuRocket1_.png" Skin 0 "JuRocket1_.png"
Offset 0 1.233 6 Offset 0 1.233 5
Scale 0.0822 0.0822 0.0822 Scale 0.0822 0.0822 0.0822
RollOffset -90 RollOffset -90
CORRECTPIXELSTRETCH
FrameIndex RCKT A 0 0 FrameIndex RCKT A 0 0
} }
@ -31,6 +33,7 @@ Model "UTGrenade"
Scale 0.0822 0.0822 0.0822 Scale 0.0822 0.0822 0.0822
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
CORRECTPIXELSTRETCH
AngleOffset 90 AngleOffset 90
FrameIndex RCKT A 0 0 FrameIndex RCKT A 0 0
@ -44,6 +47,7 @@ Model "UTRocket"
Scale 0.0822 0.0822 0.0822 Scale 0.0822 0.0822 0.0822
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
CORRECTPIXELSTRETCH
AngleOffset 90 AngleOffset 90
FrameIndex RCKT B 0 1 FrameIndex RCKT B 0 1

View file

@ -19,7 +19,8 @@ Model "EnforcerMag"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
USEROTATIONCENTER USEROTATIONCENTER
Rotation-Center 0 0 1 CORRECTPIXELSTRETCH
Rotation-Center 0 0 .5
FrameIndex PCAS A 0 0 FrameIndex PCAS A 0 0
} }
@ -36,7 +37,8 @@ Model "UTCasing"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
USEROTATIONCENTER USEROTATIONCENTER
Rotation-Center 0 0 1 CORRECTPIXELSTRETCH
Rotation-Center 0 0 .5
FrameIndex PCAS A 0 0 FrameIndex PCAS A 0 0
} }
@ -50,6 +52,7 @@ Model "BulletImpact"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
DONTCULLBACKFACES DONTCULLBACKFACES
CORRECTPIXELSTRETCH
Skin 0 "Impact_a00.png" Skin 0 "Impact_a00.png"
FrameIndex BIMP A 0 0 FrameIndex BIMP A 0 0
Skin 0 "Impact_a01.png" Skin 0 "Impact_a01.png"

View file

@ -7,10 +7,11 @@ Model "UTPlayerTFemale1"
SurfaceSkin 0 2 "FCommando/cmdo4.png" SurfaceSkin 0 2 "FCommando/cmdo4.png"
SurfaceSkin 0 4 "GunPick1.png" SurfaceSkin 0 4 "GunPick1.png"
Scale 0.23 0.23 0.23 Scale 0.23 0.23 0.23
Offset -2.5 3 36 Offset -2.5 3 30
RollOffset -90 RollOffset -90
AngleOffset -90 AngleOffset -90
IGNORETRANSLATION IGNORETRANSLATION
CORRECTPIXELSTRETCH
// Still // Still
FrameIndex PLAY A 0 359 FrameIndex PLAY A 0 359
FrameIndex PLAY B 0 360 FrameIndex PLAY B 0 360

View file

@ -30,6 +30,7 @@ Model "FlakSlug"
AngleOffset 180 AngleOffset 180
PitchOffset 90 PitchOffset 90
USEACTORPITCH USEACTORPITCH
CORRECTPIXELSTRETCH
FrameIndex FSLG A 0 0 FrameIndex FSLG A 0 0
} }
@ -43,7 +44,8 @@ Model "FlakChunk"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
USEROTATIONCENTER USEROTATIONCENTER
Rotation-Center 0 0 2 CORRECTPIXELSTRETCH
Rotation-Center 0 0 1
Skin 0 "chunk_a00.png" Skin 0 "chunk_a00.png"
FrameIndex FCH1 A 0 0 FrameIndex FCH1 A 0 0
@ -80,7 +82,8 @@ Model "FlakChunk"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
USEROTATIONCENTER USEROTATIONCENTER
Rotation-Center 0 0 2 CORRECTPIXELSTRETCH
Rotation-Center 0 0 1
Skin 1 "chunk_a00.png" Skin 1 "chunk_a00.png"
FrameIndex FCH2 A 1 0 FrameIndex FCH2 A 1 0
@ -117,7 +120,8 @@ Model "FlakChunk"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
USEROTATIONCENTER USEROTATIONCENTER
Rotation-Center 0 0 2 CORRECTPIXELSTRETCH
Rotation-Center 0 0 1
Skin 2 "chunk_a00.png" Skin 2 "chunk_a00.png"
FrameIndex FCH3 A 2 0 FrameIndex FCH3 A 2 0
@ -154,7 +158,8 @@ Model "FlakChunk"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
USEROTATIONCENTER USEROTATIONCENTER
Rotation-Center 0 0 2 CORRECTPIXELSTRETCH
Rotation-Center 0 0 1
Skin 3 "chunk_a00.png" Skin 3 "chunk_a00.png"
FrameIndex FCH4 A 3 0 FrameIndex FCH4 A 3 0
@ -193,7 +198,8 @@ Model "FlakMag"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
USEROTATIONCENTER USEROTATIONCENTER
Rotation-Center 0 0 1 CORRECTPIXELSTRETCH
Rotation-Center 0 0 .5
FrameIndex PCAS A 0 0 FrameIndex PCAS A 0 0
} }

View file

@ -6,7 +6,8 @@ Model "BioAmmo"
Scale 0.08 0.08 0.08 Scale 0.08 0.08 0.08
PitchOffset 180 PitchOffset 180
RollOffset 90 RollOffset 90
ZOffset 4 CORRECTPIXELSTRETCH
ZOffset 3
FrameIndex BIOA A 0 0 FrameIndex BIOA A 0 0
} }
@ -18,7 +19,8 @@ Model "BioAmmo2"
Scale 0.08 0.08 0.08 Scale 0.08 0.08 0.08
PitchOffset 180 PitchOffset 180
RollOffset 90 RollOffset 90
ZOffset 4 CORRECTPIXELSTRETCH
ZOffset 3
FrameIndex BIOA A 0 0 FrameIndex BIOA A 0 0
} }

View file

@ -3,6 +3,7 @@ Model "ImpactHammer"
Path "models" Path "models"
Model 1 "ImpPick_d.3d" Model 1 "ImpPick_d.3d"
Skin 1 "JImpPick1.png" Skin 1 "JImpPick1.png"
CORRECTPIXELSTRETCH
Scale 0.2 0.2 0.2 Scale 0.2 0.2 0.2
RollOffset -90 RollOffset -90
ZOffset 7.5 ZOffset 7.5
@ -87,4 +88,4 @@ Model "ImpactHammer"
FrameIndex IMPD C 0 53 FrameIndex IMPD C 0 53
FrameIndex IMPD D 0 54 FrameIndex IMPD D 0 54
FrameIndex IMPD E 0 55 FrameIndex IMPD E 0 55
} }

View file

@ -53,7 +53,8 @@ Model "UTHealthPack"
SurfaceSkin 0 2 "fizzfull" SurfaceSkin 0 2 "fizzfull"
Scale 0.2 0.2 0.2 Scale 0.2 0.2 0.2
RollOffset -90 RollOffset -90
ZOffset 16 ZOffset 13
CORRECTPIXELSTRETCH
FrameIndex HBOX A 0 0 FrameIndex HBOX A 0 0
} }
@ -67,7 +68,8 @@ Model "ActHealthPack"
SurfaceSkin 0 2 "fizzfull" SurfaceSkin 0 2 "fizzfull"
Scale 0.2 0.2 0.2 Scale 0.2 0.2 0.2
RollOffset -90 RollOffset -90
ZOffset 16 ZOffset 13
CORRECTPIXELSTRETCH
FrameIndex HBOX A 0 0 FrameIndex HBOX A 0 0
} }
@ -423,7 +425,8 @@ Model "UTChip"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
USEROTATIONCENTER USEROTATIONCENTER
Rotation-Center 0 0 0 CORRECTPIXELSTRETCH
Rotation-Center 0 0 .5
ZOffset 1 ZOffset 1
FrameIndex CHIP A 0 0 FrameIndex CHIP A 0 0
@ -503,6 +506,7 @@ Model "WaterRing"
DONTCULLBACKFACES DONTCULLBACKFACES
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
CORRECTPIXELSTRETCH
FrameIndex RNGX A 0 0 FrameIndex RNGX A 0 0
FrameIndex RNGX B 0 1 FrameIndex RNGX B 0 1
@ -520,6 +524,7 @@ Model "UTWaterSplash"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
DONTCULLBACKFACES DONTCULLBACKFACES
CORRECTPIXELSTRETCH
FrameIndex SPSH A 0 1 FrameIndex SPSH A 0 1
FrameIndex SPSH B 0 2 FrameIndex SPSH B 0 2
@ -557,6 +562,7 @@ Model "UTWaterSplish"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
DONTCULLBACKFACES DONTCULLBACKFACES
CORRECTPIXELSTRETCH
FrameIndex SPSH A 0 1 FrameIndex SPSH A 0 1
FrameIndex SPSH B 0 2 FrameIndex SPSH B 0 2
@ -595,6 +601,7 @@ Model "UTBloodSplash"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
DONTCULLBACKFACES DONTCULLBACKFACES
CORRECTPIXELSTRETCH
FrameIndex SPSH A 0 1 FrameIndex SPSH A 0 1
FrameIndex SPSH B 0 2 FrameIndex SPSH B 0 2
@ -632,6 +639,7 @@ Model "UTBloodSplish"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
DONTCULLBACKFACES DONTCULLBACKFACES
CORRECTPIXELSTRETCH
FrameIndex SPSH A 0 1 FrameIndex SPSH A 0 1
FrameIndex SPSH B 0 2 FrameIndex SPSH B 0 2
@ -670,6 +678,7 @@ Model "UTSlimeSplash"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
DONTCULLBACKFACES DONTCULLBACKFACES
CORRECTPIXELSTRETCH
FrameIndex SPSH A 0 1 FrameIndex SPSH A 0 1
FrameIndex SPSH B 0 2 FrameIndex SPSH B 0 2
@ -707,6 +716,7 @@ Model "UTSlimeSplish"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
DONTCULLBACKFACES DONTCULLBACKFACES
CORRECTPIXELSTRETCH
FrameIndex SPSH A 0 1 FrameIndex SPSH A 0 1
FrameIndex SPSH B 0 2 FrameIndex SPSH B 0 2
@ -745,6 +755,7 @@ Model "UTNukageSplash"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
DONTCULLBACKFACES DONTCULLBACKFACES
CORRECTPIXELSTRETCH
FrameIndex SPSH A 0 1 FrameIndex SPSH A 0 1
FrameIndex SPSH B 0 2 FrameIndex SPSH B 0 2
@ -782,6 +793,7 @@ Model "UTNukageSplish"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
DONTCULLBACKFACES DONTCULLBACKFACES
CORRECTPIXELSTRETCH
FrameIndex SPSH A 0 1 FrameIndex SPSH A 0 1
FrameIndex SPSH B 0 2 FrameIndex SPSH B 0 2
@ -820,6 +832,7 @@ Model "UTLavaSplash"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
DONTCULLBACKFACES DONTCULLBACKFACES
CORRECTPIXELSTRETCH
FrameIndex SPSH A 0 1 FrameIndex SPSH A 0 1
FrameIndex SPSH B 0 2 FrameIndex SPSH B 0 2
@ -857,6 +870,7 @@ Model "UTLavaSplish"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
DONTCULLBACKFACES DONTCULLBACKFACES
CORRECTPIXELSTRETCH
FrameIndex SPSH A 0 1 FrameIndex SPSH A 0 1
FrameIndex SPSH B 0 2 FrameIndex SPSH B 0 2

View file

@ -65,7 +65,8 @@ Model "PulseMag"
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
USEROTATIONCENTER USEROTATIONCENTER
Rotation-Center 0 0 2 CORRECTPIXELSTRETCH
Rotation-Center 0 0 1
FrameIndex PCAS A 0 0 FrameIndex PCAS A 0 0
} }

View file

@ -35,6 +35,7 @@ Model "Razor2"
Scale 0.18 0.18 0.18 Scale 0.18 0.18 0.18
AngleOffset 90 AngleOffset 90
USEACTORPITCH USEACTORPITCH
CORRECTPIXELSTRETCH
FrameIndex RAZB A 0 0 FrameIndex RAZB A 0 0
} }
@ -50,6 +51,7 @@ Model "Razor2Trail"
AngleOffset 90 AngleOffset 90
USEACTORPITCH USEACTORPITCH
DONTCULLBACKFACES DONTCULLBACKFACES
CORRECTPIXELSTRETCH
FrameIndex RAZB A 0 0 FrameIndex RAZB A 0 0
} }
@ -65,6 +67,7 @@ Model "Razor2Alt"
AngleOffset 90 AngleOffset 90
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
CORRECTPIXELSTRETCH
FrameIndex RAZB A 0 0 FrameIndex RAZB A 0 0
} }
@ -157,4 +160,4 @@ Model "Ripper2"
FrameIndex RZRD D 0 70 FrameIndex RZRD D 0 70
FrameIndex RZRD E 0 71 FrameIndex RZRD E 0 71
FrameIndex RZRD F 0 72 FrameIndex RZRD F 0 72
} }

View file

@ -8,10 +8,11 @@ Model "UTPlayerTFemale2"
SurfaceSkin 0 3 "SGirl/army4.png" SurfaceSkin 0 3 "SGirl/army4.png"
SurfaceSkin 0 5 "GunPick1.png" SurfaceSkin 0 5 "GunPick1.png"
Scale 0.23 0.23 0.23 Scale 0.23 0.23 0.23
Offset -2.5 3 36 Offset -2.5 3 30
RollOffset -90 RollOffset -90
AngleOffset -90 AngleOffset -90
IGNORETRANSLATION IGNORETRANSLATION
CORRECTPIXELSTRETCH
// Still // Still
FrameIndex PLAY A 0 359 FrameIndex PLAY A 0 359
FrameIndex PLAY B 0 360 FrameIndex PLAY B 0 360

View file

@ -35,6 +35,8 @@ Model "ShockRifleWave"
Path "models" Path "models"
Model 0 "shockrwm_d.3d" Model 0 "shockrwm_d.3d"
Skin 0 "shocktt1.png" Skin 0 "shocktt1.png"
CORRECTPIXELSTRETCH
RollOffset 90
Scale 0.5 0.5 0.5 Scale 0.5 0.5 0.5
FrameIndex SWAV A 0 0 FrameIndex SWAV A 0 0
@ -46,6 +48,8 @@ Model "SuperShockRifleWave"
Path "models" Path "models"
Model 0 "shockrwm_d.3d" Model 0 "shockrwm_d.3d"
Skin 0 "sshocktt1.png" Skin 0 "sshocktt1.png"
CORRECTPIXELSTRETCH
RollOffset 90
Scale 0.5 0.5 0.5 Scale 0.5 0.5 0.5
FrameIndex SWAV A 0 0 FrameIndex SWAV A 0 0

View file

@ -8,10 +8,11 @@ Model "UTPlayerTMale2"
SurfaceSkin 0 3 "Soldier/sldr4.png" SurfaceSkin 0 3 "Soldier/sldr4.png"
SurfaceSkin 0 5 "GunPick1.png" SurfaceSkin 0 5 "GunPick1.png"
Scale 0.23 0.23 0.23 Scale 0.23 0.23 0.23
Offset 0 -5 29 Offset 0 -5 24
RollOffset -90 RollOffset -90
AngleOffset -90 AngleOffset -90
IGNORETRANSLATION IGNORETRANSLATION
CORRECTPIXELSTRETCH
// Still // Still
FrameIndex PLAY A 0 373 FrameIndex PLAY A 0 373
FrameIndex PLAY B 0 374 FrameIndex PLAY B 0 374
@ -317,8 +318,9 @@ Model "TranslocatorAfterimage"
SurfaceSkin 0 2 "Soldier/sldr3.png" SurfaceSkin 0 2 "Soldier/sldr3.png"
SurfaceSkin 0 3 "Soldier/sldr4.png" SurfaceSkin 0 3 "Soldier/sldr4.png"
SurfaceSkin 0 5 "GunPick1.png" SurfaceSkin 0 5 "GunPick1.png"
Scale 0.256 0.23 0.23 CORRECTPIXELSTRETCH
Offset 0 -5 29 Scale 0.23 0.23 0.23
Offset 0 -5 24
RollOffset -90 RollOffset -90
AngleOffset -90 AngleOffset -90
FrameIndex PLAY A 0 187 FrameIndex PLAY A 0 187

View file

@ -6,6 +6,7 @@ Model "TranslocatorModule"
Scale 0.056 0.056 0.056 Scale 0.056 0.056 0.056
ZOffset 5 ZOffset 5
USEACTORPITCH USEACTORPITCH
CORRECTPIXELSTRETCH
FrameIndex TMOD A 0 0 FrameIndex TMOD A 0 0
FrameIndex TMOD B 0 1 FrameIndex TMOD B 0 1

View file

@ -35,6 +35,8 @@ Model "ShockWave"
Path "models" Path "models"
Model 0 "shockwavem_d.3d" Model 0 "shockwavem_d.3d"
Skin 0 "shockt1.png" Skin 0 "shockt1.png"
CORRECTPIXELSTRETCH
RollOffset 90
Scale 1.0 1.0 1.0 Scale 1.0 1.0 1.0
FrameIndex RWAV A 0 0 FrameIndex RWAV A 0 0
@ -51,6 +53,7 @@ Model "WarShell"
PitchOffset -90 PitchOffset -90
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
CORRECTPIXELSTRETCH
FrameIndex WMIS A 0 0 FrameIndex WMIS A 0 0
} }
@ -64,6 +67,7 @@ Model "GuidedWarShell"
PitchOffset -90 PitchOffset -90
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
CORRECTPIXELSTRETCH
FrameIndex WMIS A 0 0 FrameIndex WMIS A 0 0
} }
@ -78,6 +82,7 @@ Model "WarShell220"
PitchOffset -90 PitchOffset -90
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
CORRECTPIXELSTRETCH
FrameIndex WMIS A 0 0 FrameIndex WMIS A 0 0
} }
@ -91,6 +96,7 @@ Model "WarShell222"
PitchOffset -90 PitchOffset -90
USEACTORPITCH USEACTORPITCH
USEACTORROLL USEACTORROLL
CORRECTPIXELSTRETCH
FrameIndex WMIS A 0 0 FrameIndex WMIS A 0 0
} }
@ -101,6 +107,7 @@ Model "WarheadLauncher"
Model 1 "whpick_d.3d" Model 1 "whpick_d.3d"
Skin 1 "jwhpick1.png" Skin 1 "jwhpick1.png"
Scale 0.2 0.2 0.2 Scale 0.2 0.2 0.2
CORRECTPIXELSTRETCH
RollOffset -90 RollOffset -90
ZOffset 9 ZOffset 9

View file

@ -1,8 +1,7 @@
version "4.9" version "4.10"
#include "zscript/dt_Gutamatics/Include.zsc" #include "zscript/dt_Gutamatics/Include.zsc"
#include "zscript/dt_utility.zsc" #include "zscript/dt_utility.zsc"
#include "zscript/dt_coordutil.zsc"
#include "zscript/utcommon.zsc" #include "zscript/utcommon.zsc"
#include "zscript/utgore.zsc" #include "zscript/utgore.zsc"
#include "zscript/impacthammer.zsc" #include "zscript/impacthammer.zsc"

View file

@ -724,7 +724,7 @@ Class BioRifle : UTWeapon
else A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05); else A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05);
Vector3 x, y, z; Vector3 x, y, z;
double a, s; double a, s;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+8*y-5*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+8*y-5*z);
Actor p; Actor p;
if ( alt ) if ( alt )

View file

@ -131,7 +131,7 @@ Class UTChainsaw : UTWeapon
invoker.FireEffect(); invoker.FireEffect();
A_AlertMonsters(); A_AlertMonsters();
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-4*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-4*z);
FLineTraceData d; FLineTraceData d;
LineTrace(angle,90,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d); LineTrace(angle,90,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
@ -179,7 +179,7 @@ Class UTChainsaw : UTWeapon
if ( initial ) invoker.FireEffect(); if ( initial ) invoker.FireEffect();
A_AlertMonsters(); A_AlertMonsters();
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2*z);
FLineTraceData d; FLineTraceData d;
double ang = (angle-60)+120*invoker.sawcnt; double ang = (angle-60)+120*invoker.sawcnt;
@ -233,7 +233,7 @@ Class UTChainsaw : UTWeapon
else A_QuakeEx(0,0,0,2,0,1,"",QF_RELATIVE,rollIntensity:0.2); else A_QuakeEx(0,0,0,2,0,1,"",QF_RELATIVE,rollIntensity:0.2);
if ( bAlt || Random[Chainsaw](0,2) ) return; if ( bAlt || Random[Chainsaw](0,2) ) return;
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),5*x+y-3*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),5*x+y-3*z);
for ( int i=0; i<5; i++ ) for ( int i=0; i<5; i++ )
{ {

View file

@ -1,92 +0,0 @@
/*
Coordinate Utility helper class.
Reproduces the old UnrealScript Get(Un)Axes functions, providing XYZ axis
vectors relative to an euler rotation (defaults to left-handed coords).
Copyright (c)2018-2022 Marisa the Magician, UnSX Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
*/
Class dt_CoordUtil
{
// In Tim Sweeney's own words: "transform by a pitch-yaw-roll rotation"
static Vector3, Vector3, Vector3 GetUnAxes( double pitch, double yaw, double roll, bool rhand = false )
{
Vector3 x = (1,0,0), y = (0,rhand?1:-1,0), z = (0,0,1);
Vector3 a, b, c;
// pitch and roll in gzdoom work in reverse compared to UE
pitch = -pitch;
roll = -roll;
// yaw
a = (cos(yaw),sin(yaw),0);
b = (-sin(yaw),cos(yaw),0);
c = (0,0,1);
x = (x dot a, x dot b, x dot c);
y = (y dot a, y dot b, y dot c);
z = (z dot a, z dot b, z dot c);
// pitch
a = (cos(pitch),0,sin(pitch));
b = (0,1,0);
c = (-sin(pitch),0,cos(pitch));
x = (x dot a, x dot b, x dot c);
y = (y dot a, y dot b, y dot c);
z = (z dot a, z dot b, z dot c);
// roll
a = (1,0,0);
b = (0,cos(roll),-sin(roll));
c = (0,sin(roll),cos(roll));
x = (x dot a, x dot b, x dot c);
y = (y dot a, y dot b, y dot c);
z = (z dot a, z dot b, z dot c);
return x, y, z;
}
// In Tim Sweeney's own words: "detransform by a pitch-yaw-roll rotation"
static Vector3, Vector3, Vector3 GetAxes( double pitch, double yaw, double roll, bool rhand = false )
{
Vector3 x = (1,0,0), y = (0,rhand?1:-1,0), z = (0,0,1);
Vector3 a, b, c;
// pitch and roll in gzdoom work in reverse compared to UE
pitch = -pitch;
roll = -roll;
// inverse roll
a = (1,0,0);
b = (0,cos(roll),sin(roll));
c = (0,-sin(roll),cos(roll));
x = (x dot a, x dot b, x dot c);
y = (y dot a, y dot b, y dot c);
z = (z dot a, z dot b, z dot c);
// inverse pitch
a = (cos(pitch),0,-sin(pitch));
b = (0,1,0);
c = (sin(pitch),0,cos(pitch));
x = (x dot a, x dot b, x dot c);
y = (y dot a, y dot b, y dot c);
z = (z dot a, z dot b, z dot c);
// inverse yaw
a = (cos(yaw),-sin(yaw),0);
b = (sin(yaw),cos(yaw),0);
c = (0,0,1);
x = (x dot a, x dot b, x dot c);
y = (y dot a, y dot b, y dot c);
z = (z dot a, z dot b, z dot c);
return x, y, z;
}
}

View file

@ -64,4 +64,11 @@ Class dt_Utility
{ {
return (x+y*cos(angle)*spread+z*sin(angle)*spread).unit(); return (x+y*cos(angle)*spread+z*sin(angle)*spread).unit();
} }
static clearscope Vector3, Vector3, Vector3 GetAxes( double angle, double pitch, double roll )
{
Vector3 x = (1,0,0), y = (0,-1,0), z = (0,0,1);
Quat r = Quat.FromAngles(angle,pitch,roll);
return r*x, r*y, r*z;
}
} }

View file

@ -388,9 +388,9 @@ Class UTRocketLauncher : UTWeapon
A_QuakeEx(2+num,2+num,2+num,6+num,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1+num*0.05); A_QuakeEx(2+num,2+num,2+num,6+num,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1+num*0.05);
Vector3 x, y, z, x2, y2, z2; Vector3 x, y, z, x2, y2, z2;
double a, s; double a, s;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-3*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-3*z);
[x2, y2, z2] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll); [x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
Actor p; Actor p;
if ( weap.bAltFire ) if ( weap.bAltFire )
{ {

View file

@ -34,7 +34,7 @@ Class EnforcerLight : DynamicLight
if ( target.player ) if ( target.player )
{ {
Vector3 x, y, z, origin; Vector3 x, y, z, origin;
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll); [x, y, z] = dt_Utility.GetAxes(target.angle,target.pitch,target.roll);
origin = level.Vec3Offset(target.Vec2OffsetZ(0,0,target.player.viewz),x*12); origin = level.Vec3Offset(target.Vec2OffsetZ(0,0,target.player.viewz),x*12);
SetOrigin(origin,true); SetOrigin(origin,true);
} }
@ -378,13 +378,13 @@ Class Enforcer : UTWeapon
A_OverlayRenderstyle(-2,STYLE_Add); A_OverlayRenderstyle(-2,STYLE_Add);
} }
Vector3 x, y, z, x2, y2, z2; Vector3 x, y, z, x2, y2, z2;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x);
int ydir = slave?-1:1; int ydir = slave?-1:1;
if ( alt ) origin = level.Vec3Offset(origin,-z*3+ydir*y); if ( alt ) origin = level.Vec3Offset(origin,-z*3+ydir*y);
else origin = level.Vec3Offset(origin,-z+ydir*y*4); else origin = level.Vec3Offset(origin,-z+ydir*y*4);
double a = FRandom[Enforcer](0,360), s = FRandom[Enforcer](0,alt?invoker.altaccuracy:0.004); double a = FRandom[Enforcer](0,360), s = FRandom[Enforcer](0,alt?invoker.altaccuracy:0.004);
[x2, y2, z2] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll); [x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
Vector3 dir = dt_Utility.ConeSpread(x2,y2,z2,a,s); Vector3 dir = dt_Utility.ConeSpread(x2,y2,z2,a,s);
FLineTraceData d; FLineTraceData d;
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d); LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
@ -634,7 +634,7 @@ Class Enforcer : UTWeapon
UTPlayer(self).PlayReloading(); UTPlayer(self).PlayReloading();
invoker.slavereload = (flak_enforcerreload&&invoker.slaveactive&&(invoker.slaveclipcount<min(invoker.default.slaveclipcount,invoker.Ammo1.Amount))); invoker.slavereload = (flak_enforcerreload&&invoker.slaveactive&&(invoker.slaveclipcount<min(invoker.default.slaveclipcount,invoker.Ammo1.Amount)));
Vector3 x, y, z, origin; Vector3 x, y, z, origin;
[x,y,z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x,y,z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.+y*4.-z*8.); origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.+y*4.-z*8.);
let c = Spawn("EnforcerMag",origin); let c = Spawn("EnforcerMag",origin);
c.angle = angle; c.angle = angle;
@ -668,7 +668,7 @@ Class Enforcer : UTWeapon
UTPlayer(self).PlayReloading(); UTPlayer(self).PlayReloading();
invoker.slavereload = false; invoker.slavereload = false;
Vector3 x, y, z, origin; Vector3 x, y, z, origin;
[x,y,z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x,y,z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.-y*4.-z*8.); origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.-y*4.-z*8.);
let c = Spawn("EnforcerMag",origin); let c = Spawn("EnforcerMag",origin);
c.angle = angle; c.angle = angle;

View file

@ -523,7 +523,7 @@ Class FlakSlug : Actor
Spawn("SlugLight",pos); Spawn("SlugLight",pos);
Vector3 x, y, z; Vector3 x, y, z;
double a, s; double a, s;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Actor p; Actor p;
Vector3 spawnofs; Vector3 spawnofs;
if ( BlockingMobj ) spawnofs = level.Vec3Diff(pos,BlockingMobj.Vec3Offset(0,0,BlockingMobj.height/2)).unit()*8; if ( BlockingMobj ) spawnofs = level.Vec3Diff(pos,BlockingMobj.Vec3Offset(0,0,BlockingMobj.height/2)).unit()*8;
@ -674,12 +674,12 @@ Class FlakCannon : UTWeapon
A_QuakeEx(1,1,1,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05); A_QuakeEx(1,1,1,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05);
Vector3 x, y, z; Vector3 x, y, z;
double a, s; double a, s;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+4*y-3*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+4*y-3*z);
A_Overlay(-2,"MuzzleFlash"); A_Overlay(-2,"MuzzleFlash");
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true); A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
A_OverlayRenderstyle(-2,STYLE_Add); A_OverlayRenderstyle(-2,STYLE_Add);
[x, y, z] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
Vector3 offsets[8]; // vanilla adds these to each chunk Vector3 offsets[8]; // vanilla adds these to each chunk
offsets[0] = (0,0,0); offsets[0] = (0,0,0);
offsets[1] = -z; offsets[1] = -z;
@ -732,7 +732,7 @@ Class FlakCannon : UTWeapon
A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1); A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z; Vector3 x, y, z;
double a, s; double a, s;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-3*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-3*z);
A_Overlay(-2,"MuzzleFlash"); A_Overlay(-2,"MuzzleFlash");
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true); A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
@ -819,7 +819,7 @@ Class FlakCannon : UTWeapon
FLKF J 4 FLKF J 4
{ {
Vector3 x, y, z, origin; Vector3 x, y, z, origin;
[x,y,z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x,y,z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.+y*3.-z*8.); origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.+y*3.-z*8.);
let c = Spawn("FlakMag",origin); let c = Spawn("FlakMag",origin);
c.angle = angle; c.angle = angle;

View file

@ -107,7 +107,7 @@ Class ImpactHammer : UTWeapon
} }
FLineTraceData d; FLineTraceData d;
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-4*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-4*z);
LineTrace(angle,40,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d); LineTrace(angle,40,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
if ( (invoker.chargesize > 1) && (d.HitType == TRACE_HitActor) ) if ( (invoker.chargesize > 1) && (d.HitType == TRACE_HitActor) )
@ -122,7 +122,7 @@ Class ImpactHammer : UTWeapon
invoker.FireEffect(); invoker.FireEffect();
A_AlertMonsters(gameinfo.gametype&GAME_Strife?100:0); A_AlertMonsters(gameinfo.gametype&GAME_Strife?100:0);
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-4*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-4*z);
double realcharge = min(1.5,invoker.chargesize); double realcharge = min(1.5,invoker.chargesize);
FLineTraceData d; FLineTraceData d;
@ -187,7 +187,7 @@ Class ImpactHammer : UTWeapon
A_AlertMonsters(gameinfo.gametype&GAME_Strife?100:0); A_AlertMonsters(gameinfo.gametype&GAME_Strife?100:0);
A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1); A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-4*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-4*z);
FLineTraceData d; FLineTraceData d;
LineTrace(angle,120,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d); LineTrace(angle,120,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);

View file

@ -117,10 +117,10 @@ Class Minigun : UTWeapon
l.target = self; l.target = self;
if ( !alt ) MinigunLight(l).cnt--; if ( !alt ) MinigunLight(l).cnt--;
Vector3 x, y, z, x2, y2, z2; Vector3 x, y, z, x2, y2, z2;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+y*2-z*2); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+y*2-z*2);
double a = FRandom[Minigun](0,360), s = FRandom[Minigun](0,alt?0.05:0.02); double a = FRandom[Minigun](0,360), s = FRandom[Minigun](0,alt?0.05:0.02);
[x2, y2, z2] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll); [x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
Vector3 dir = dt_Utility.ConeSpread(x2,y2,z2,a,s); Vector3 dir = dt_Utility.ConeSpread(x2,y2,z2,a,s);
FLineTraceData d; FLineTraceData d;
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d); LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);

View file

@ -576,7 +576,7 @@ Class UTVisionLight : DynamicLight
return; return;
} }
Vector3 x, y, z, origin; Vector3 x, y, z, origin;
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll); [x, y, z] = dt_Utility.GetAxes(target.angle,target.pitch,target.roll);
if ( target.player ) if ( target.player )
origin = target.Vec2OffsetZ(0,0,target.player.viewz); origin = target.Vec2OffsetZ(0,0,target.player.viewz);
else origin = target.Vec3Offset(0,0,target.height/2); else origin = target.Vec3Offset(0,0,target.height/2);

View file

@ -108,7 +108,7 @@ Class ViewPulseSpark : PulseSpark
return; return;
} }
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll); [x, y, z] = dt_Utility.GetAxes(target.angle,target.pitch,target.roll);
Vector3 origin = level.Vec3Offset(target.Vec2OffsetZ(0,0,target.player.viewz),x*ofs.x+y*ofs.y+z*ofs.z); Vector3 origin = level.Vec3Offset(target.Vec2OffsetZ(0,0,target.player.viewz),x*ofs.x+y*ofs.y+z*ofs.z);
SetOrigin(origin,true); SetOrigin(origin,true);
bInvisible = (players[consoleplayer].camera != target); bInvisible = (players[consoleplayer].camera != target);
@ -540,7 +540,7 @@ Class StarterBolt : PulseBolt
bRELATIVETOFLOOR = (target.pos.z <= target.floorz); // hack, but kinda works bRELATIVETOFLOOR = (target.pos.z <= target.floorz); // hack, but kinda works
if ( target.player ) if ( target.player )
{ {
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll); [x, y, z] = dt_Utility.GetAxes(target.angle,target.pitch,target.roll);
origin = level.Vec3Offset(target.Vec2OffsetZ(0,0,target.player.viewz),8*x+4.1*y-2.7*z); origin = level.Vec3Offset(target.Vec2OffsetZ(0,0,target.player.viewz),8*x+4.1*y-2.7*z);
} }
else origin = target.Vec3Offset(0,0,target.missileheight); else origin = target.Vec3Offset(0,0,target.missileheight);
@ -678,7 +678,7 @@ Class PulseGun : UTWeapon
UTMainHandler.DoFlash(self,Color(32,128,255,128),1); UTMainHandler.DoFlash(self,Color(32,128,255,128),1);
A_AlertMonsters(); A_AlertMonsters();
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+4.1*y-2.7*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+4.1*y-2.7*z);
for ( int i=0; i<4; i++ ) for ( int i=0; i<4; i++ )
{ {
@ -743,7 +743,7 @@ Class PulseGun : UTWeapon
A_OverlayRenderstyle(-2,STYLE_Add); A_OverlayRenderstyle(-2,STYLE_Add);
Vector3 x, y, z; Vector3 x, y, z;
double a; double a;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-1.8*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-1.8*z);
origin = level.Vec3Offset(origin,dt_Utility.CircleOffset(y,z,invoker.sangle,2)); origin = level.Vec3Offset(origin,dt_Utility.CircleOffset(y,z,invoker.sangle,2));
invoker.sangle += 100; invoker.sangle += 100;
@ -776,7 +776,7 @@ Class PulseGun : UTWeapon
invoker.special1 = 0; invoker.special1 = 0;
A_StartSound("pulse/bolt",CHAN_WEAPON,CHANF_LOOPING); A_StartSound("pulse/bolt",CHAN_WEAPON,CHANF_LOOPING);
Vector3 x, y, z, origin; Vector3 x, y, z, origin;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+4.1*y-2.7*z); origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+4.1*y-2.7*z);
invoker.beam = Spawn("StarterBolt",origin); invoker.beam = Spawn("StarterBolt",origin);
invoker.beam.angle = angle; invoker.beam.angle = angle;
@ -901,7 +901,7 @@ Class PulseGun : UTWeapon
PGR2 A 1 PGR2 A 1
{ {
Vector3 x, y, z, origin; Vector3 x, y, z, origin;
[x,y,z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x,y,z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.-y*6.-z*8.); origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.-y*6.-z*8.);
let c = Spawn("PulseMag",origin); let c = Spawn("PulseMag",origin);
c.angle = angle; c.angle = angle;

View file

@ -256,7 +256,7 @@ Class Ripper2 : UTWeapon
if ( alt ) A_QuakeEx(3,3,3,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1); if ( alt ) A_QuakeEx(3,3,3,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
else A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08); else A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08);
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+6*y-4*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+6*y-4*z);
Actor p; Actor p;
if ( alt ) p = Spawn("Razor2Alt",origin); if ( alt ) p = Spawn("Razor2Alt",origin);

View file

@ -1036,7 +1036,7 @@ Class ViewShockSpark : ShockSpark
return; return;
} }
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll); [x, y, z] = dt_Utility.GetAxes(target.angle,target.pitch,target.roll);
Vector3 origin = level.Vec3Offset(target.Vec2OffsetZ(0,0,target.player.viewz),x*ofs.x+y*ofs.y+z*ofs.z); Vector3 origin = level.Vec3Offset(target.Vec2OffsetZ(0,0,target.player.viewz),x*ofs.x+y*ofs.y+z*ofs.z);
SetOrigin(origin,true); SetOrigin(origin,true);
bInvisible = (players[consoleplayer].camera != target); bInvisible = (players[consoleplayer].camera != target);
@ -1069,7 +1069,7 @@ Class ShockRifle : UTWeapon
A_AlertMonsters(); A_AlertMonsters();
A_QuakeEx(2,2,2,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1); A_QuakeEx(2,2,2,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-1.5*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-1.5*z);
Actor p = Spawn("ShockBeam",origin); Actor p = Spawn("ShockBeam",origin);
p.angle = angle; p.angle = angle;
@ -1106,7 +1106,7 @@ Class ShockRifle : UTWeapon
A_AlertMonsters(); A_AlertMonsters();
A_QuakeEx(2,2,2,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1); A_QuakeEx(2,2,2,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-1.5*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-1.5*z);
Actor p = Spawn("ShockBall",origin); Actor p = Spawn("ShockBall",origin);
p.angle = angle; p.angle = angle;
@ -1251,7 +1251,7 @@ Class EnhancedShockRifle : UTWeapon
A_AlertMonsters(); A_AlertMonsters();
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15); A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15);
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-1.5*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-1.5*z);
Actor p = Spawn("SuperShockBeam",origin); Actor p = Spawn("SuperShockBeam",origin);
p.angle = angle; p.angle = angle;
@ -1288,7 +1288,7 @@ Class EnhancedShockRifle : UTWeapon
A_AlertMonsters(); A_AlertMonsters();
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15); A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15);
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-1.5*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-1.5*z);
Actor p = Spawn("SuperShockBall",origin); Actor p = Spawn("SuperShockBall",origin);
p.angle = angle; p.angle = angle;

View file

@ -95,7 +95,7 @@ Class SniperRifle : UTWeapon
let l = Spawn("SniperLight",pos); let l = Spawn("SniperLight",pos);
l.target = self; l.target = self;
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x);
if ( !zoomed ) origin = level.Vec3Offset(origin,y*4-z*2); if ( !zoomed ) origin = level.Vec3Offset(origin,y*4-z*2);
FLineTraceData d; FLineTraceData d;

View file

@ -323,7 +323,7 @@ Class TranslocatorAfterimage : Actor
angle = target.angle-90; angle = target.angle-90;
roll = -90; roll = -90;
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(0,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,0,roll);
int lump = Wads.CheckNumForFullname("models/TeleSoldier_a.3d"); int lump = Wads.CheckNumForFullname("models/TeleSoldier_a.3d");
String anivfile = Wads.ReadLump(lump); String anivfile = Wads.ReadLump(lump);
int numframes = anivfile.ByteAt(0); int numframes = anivfile.ByteAt(0);
@ -417,7 +417,7 @@ Class Translocator : UTWeapon
invoker.FireEffect(); invoker.FireEffect();
A_AlertMonsters(); A_AlertMonsters();
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-8*y-12*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-8*y-12*z);
let p = Spawn("TranslocatorModule",origin); let p = Spawn("TranslocatorModule",origin);
p.target = self; p.target = self;
@ -592,7 +592,7 @@ Class OldTranslocator : Translocator
invoker.FireEffect(); invoker.FireEffect();
A_AlertMonsters(); A_AlertMonsters();
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = (pos.x,pos.y,player.viewz)+15.0*x-10.0*y-4.0*z; Vector3 origin = (pos.x,pos.y,player.viewz)+15.0*x-10.0*y-4.0*z;
let p = Spawn("OldTranslocatorModule",origin); let p = Spawn("OldTranslocatorModule",origin);
p.target = self; p.target = self;

View file

@ -103,7 +103,7 @@ Class UTPlayer : DoomPlayer
Player.StartItem "ImpactHammer"; Player.StartItem "ImpactHammer";
Player.StartItem "MiniAmmo", 30; Player.StartItem "MiniAmmo", 30;
Player.DamageScreenColor "FF 00 00"; Player.DamageScreenColor "FF 00 00";
Player.ViewHeight 46; Player.ViewHeight 44;
Player.GruntSpeed 20; Player.GruntSpeed 20;
Player.Portrait "TNT1A0"; Player.Portrait "TNT1A0";
+NOMENU; +NOMENU;
@ -610,7 +610,7 @@ Class UTPlayer : DoomPlayer
Vector3 dir = (0,0,0); Vector3 dir = (0,0,0);
if ( vel.length() > double.epsilon ) dir = vel.unit(); if ( vel.length() > double.epsilon ) dir = vel.unit();
Vector3 x, y; Vector3 x, y;
[x, y] = dt_CoordUtil.GetAxes(pitch,angle,0); [x, y] = dt_Utility.GetAxes(angle,pitch,0);
acceleration3 = x*player.cmd.forwardmove+y*player.cmd.sidemove; acceleration3 = x*player.cmd.forwardmove+y*player.cmd.sidemove;
if ( player.cmd.buttons&BT_JUMP ) acceleration3.z = 0x500; if ( player.cmd.buttons&BT_JUMP ) acceleration3.z = 0x500;
else if ( player.cmd.buttons&BT_CROUCH ) acceleration3.z = -0x500; else if ( player.cmd.buttons&BT_CROUCH ) acceleration3.z = -0x500;
@ -639,7 +639,7 @@ Class UTPlayer : DoomPlayer
if ( vel.length() > double.epsilon ) dir = vel.unit(); if ( vel.length() > double.epsilon ) dir = vel.unit();
double doomfriction = clamp(GetFriction()/ORIG_FRICTION,0.0,1.0); double doomfriction = clamp(GetFriction()/ORIG_FRICTION,0.0,1.0);
Vector3 x, y; Vector3 x, y;
[x, y] = dt_CoordUtil.GetAxes(pitch,angle,0); [x, y] = dt_Utility.GetAxes(angle,pitch,0);
acceleration3 = x*player.cmd.forwardmove+y*player.cmd.sidemove; acceleration3 = x*player.cmd.forwardmove+y*player.cmd.sidemove;
if ( player.cmd.buttons&BT_JUMP ) acceleration3.z = 0x500; if ( player.cmd.buttons&BT_JUMP ) acceleration3.z = 0x500;
else if ( player.cmd.buttons&BT_CROUCH ) acceleration3.z = -0x500; else if ( player.cmd.buttons&BT_CROUCH ) acceleration3.z = -0x500;
@ -2025,7 +2025,7 @@ Class UTWeapon : Weapon
Vector2 hofs = RotateVector((dropper.radius,0),dropper.angle); Vector2 hofs = RotateVector((dropper.radius,0),dropper.angle);
SetOrigin(dropper.Vec3Offset(hofs.x,hofs.y,dropper.height*0.5),false); SetOrigin(dropper.Vec3Offset(hofs.x,hofs.y,dropper.height*0.5),false);
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(dropper.pitch,dropper.angle,dropper.roll); [x, y, z] = dt_Utility.GetAxes(dropper.angle,dropper.pitch,dropper.roll);
vel = x*12.0; vel = x*12.0;
vel.z += 4.0; vel.z += 4.0;
angle = dropper.angle; angle = dropper.angle;
@ -2215,7 +2215,7 @@ Class UTViewSpark : UTSpark
return; return;
} }
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll); [x, y, z] = dt_Utility.GetAxes(target.angle,target.pitch,target.roll);
Vector3 origin = level.Vec3Offset(target.Vec2OffsetZ(0,0,target.player.viewz),x*ofs.x+y*ofs.y+z*ofs.z); Vector3 origin = level.Vec3Offset(target.Vec2OffsetZ(0,0,target.player.viewz),x*ofs.x+y*ofs.y+z*ofs.z);
SetOrigin(origin,true); SetOrigin(origin,true);
bInvisible = (players[consoleplayer].camera != target); bInvisible = (players[consoleplayer].camera != target);
@ -2462,7 +2462,7 @@ Class UTViewSmoke : UTSmoke
return; return;
} }
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll); [x, y, z] = dt_Utility.GetAxes(target.angle,target.pitch,target.roll);
Vector3 origin = level.Vec3Offset(target.Vec2OffsetZ(0,0,target.player.viewz),x*ofs.x+y*ofs.y+z*ofs.z); Vector3 origin = level.Vec3Offset(target.Vec2OffsetZ(0,0,target.player.viewz),x*ofs.x+y*ofs.y+z*ofs.z);
SetOrigin(origin,true); SetOrigin(origin,true);
bInvisible = (players[consoleplayer].camera != target); bInvisible = (players[consoleplayer].camera != target);
@ -2778,7 +2778,7 @@ Class UTParticleMesh : Actor
pz[i] = az/4194304.; pz[i] = az/4194304.;
} }
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
for ( int i=0; i<numverts; i++ ) for ( int i=0; i<numverts; i++ )
parts[i] = Spawn(pclass,level.Vec3Offset(pos,px[i]*scale.x*x+py[i]*scale.x*y+pz[i]*scale.y*z)); parts[i] = Spawn(pclass,level.Vec3Offset(pos,px[i]*scale.x*x+py[i]*scale.x*y+pz[i]*scale.y*z));
animframe = 0; animframe = 0;
@ -2807,7 +2807,7 @@ Class UTParticleMesh : Actor
double theta = animframe-framea; double theta = animframe-framea;
Vector3 posa, posb, ipos; Vector3 posa, posb, ipos;
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
for ( int i=0; i<numverts; i++ ) for ( int i=0; i<numverts; i++ )
{ {
posa = (px[i+numverts*framea],py[i+numverts*framea],pz[i+numverts*framea]); posa = (px[i+numverts*framea],py[i+numverts*framea],pz[i+numverts*framea]);

View file

@ -182,6 +182,12 @@ Class UTHud : BaseStatusBar
override void Draw( int state, double TicFrac ) override void Draw( int state, double TicFrac )
{ {
// make sure vanilla nametags don't display
DetachMessageID(0x5745504e); // WEPN
DetachMessageID(0x53494e56); // SINV
// also try with different endianness, just in case
DetachMessageID(0x4e504557); // WEPN
DetachMessageID(0x564e4953); // SINV
Super.Draw(state,TicFrac); Super.Draw(state,TicFrac);
HScale = Screen.GetWidth()/1280.; HScale = Screen.GetWidth()/1280.;
switch ( flak_colorprefs ) switch ( flak_colorprefs )
@ -1139,12 +1145,6 @@ Class UTHud : BaseStatusBar
} }
} }
lastwep = CPlayer.PendingWeapon; lastwep = CPlayer.PendingWeapon;
// make sure vanilla nametags don't display
DetachMessageID(0x5745504e); // WEPN
DetachMessageID(0x53494e56); // SINV
// also try with different endianness, just in case
DetachMessageID(0x4e504557); // WEPN
DetachMessageID(0x564e4953); // SINV
if ( deathmatch||teamplay ) if ( deathmatch||teamplay )
{ {
if ( CPlayer.fragcount != lastfragcnt ) lastfrag = level.time; if ( CPlayer.fragcount != lastfragcnt ) lastfrag = level.time;

View file

@ -651,7 +651,7 @@ Class WarheadLauncher : UTWeapon
A_AlertMonsters(); A_AlertMonsters();
A_QuakeEx(6,6,6,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.2); A_QuakeEx(6,6,6,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.2);
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
vel -= x*10; vel -= x*10;
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-2*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-2*z);
Actor p = Spawn("WarShell",origin); Actor p = Spawn("WarShell",origin);
@ -665,7 +665,7 @@ Class WarheadLauncher : UTWeapon
Weapon weap = Weapon(invoker); Weapon weap = Weapon(invoker);
if ( !weap ) return; if ( !weap ) return;
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
vel -= x*0.2; vel -= x*0.2;
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-2*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-2*z);
int numpt = Random[Warhead](10,20); int numpt = Random[Warhead](10,20);
@ -689,7 +689,7 @@ Class WarheadLauncher : UTWeapon
A_AlertMonsters(); A_AlertMonsters();
A_QuakeEx(6,6,6,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.2); A_QuakeEx(6,6,6,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.2);
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
vel -= x*10; vel -= x*10;
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-2*z); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-2*z);
Actor p = Spawn("GuidedWarShell",origin); Actor p = Spawn("GuidedWarShell",origin);