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

@ -724,7 +724,7 @@ Class BioRifle : UTWeapon
else A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05);
Vector3 x, y, z;
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);
Actor p;
if ( alt )

View file

@ -131,7 +131,7 @@ Class UTChainsaw : UTWeapon
invoker.FireEffect();
A_AlertMonsters();
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);
FLineTraceData 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();
A_AlertMonsters();
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);
FLineTraceData d;
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);
if ( bAlt || Random[Chainsaw](0,2) ) return;
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);
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();
}
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);
Vector3 x, y, z, x2, y2, z2;
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);
[x2, y2, z2] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll);
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
Actor p;
if ( weap.bAltFire )
{

View file

@ -34,7 +34,7 @@ Class EnforcerLight : DynamicLight
if ( target.player )
{
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);
SetOrigin(origin,true);
}
@ -378,13 +378,13 @@ Class Enforcer : UTWeapon
A_OverlayRenderstyle(-2,STYLE_Add);
}
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);
int ydir = slave?-1:1;
if ( alt ) origin = level.Vec3Offset(origin,-z*3+ydir*y);
else origin = level.Vec3Offset(origin,-z+ydir*y*4);
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);
FLineTraceData 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();
invoker.slavereload = (flak_enforcerreload&&invoker.slaveactive&&(invoker.slaveclipcount<min(invoker.default.slaveclipcount,invoker.Ammo1.Amount)));
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.);
let c = Spawn("EnforcerMag",origin);
c.angle = angle;
@ -668,7 +668,7 @@ Class Enforcer : UTWeapon
UTPlayer(self).PlayReloading();
invoker.slavereload = false;
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.);
let c = Spawn("EnforcerMag",origin);
c.angle = angle;

View file

@ -523,7 +523,7 @@ Class FlakSlug : Actor
Spawn("SlugLight",pos);
Vector3 x, y, z;
double a, s;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Actor p;
Vector3 spawnofs;
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);
Vector3 x, y, z;
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);
A_Overlay(-2,"MuzzleFlash");
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
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
offsets[0] = (0,0,0);
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);
Vector3 x, y, z;
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);
A_Overlay(-2,"MuzzleFlash");
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
@ -819,7 +819,7 @@ Class FlakCannon : UTWeapon
FLKF J 4
{
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.);
let c = Spawn("FlakMag",origin);
c.angle = angle;

View file

@ -107,7 +107,7 @@ Class ImpactHammer : UTWeapon
}
FLineTraceData d;
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);
LineTrace(angle,40,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
if ( (invoker.chargesize > 1) && (d.HitType == TRACE_HitActor) )
@ -122,7 +122,7 @@ Class ImpactHammer : UTWeapon
invoker.FireEffect();
A_AlertMonsters(gameinfo.gametype&GAME_Strife?100:0);
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);
double realcharge = min(1.5,invoker.chargesize);
FLineTraceData d;
@ -187,7 +187,7 @@ Class ImpactHammer : UTWeapon
A_AlertMonsters(gameinfo.gametype&GAME_Strife?100:0);
A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
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);
FLineTraceData 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;
if ( !alt ) MinigunLight(l).cnt--;
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);
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);
FLineTraceData 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;
}
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 )
origin = target.Vec2OffsetZ(0,0,target.player.viewz);
else origin = target.Vec3Offset(0,0,target.height/2);

View file

@ -108,7 +108,7 @@ Class ViewPulseSpark : PulseSpark
return;
}
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);
SetOrigin(origin,true);
bInvisible = (players[consoleplayer].camera != target);
@ -540,7 +540,7 @@ Class StarterBolt : PulseBolt
bRELATIVETOFLOOR = (target.pos.z <= target.floorz); // hack, but kinda works
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);
}
else origin = target.Vec3Offset(0,0,target.missileheight);
@ -678,7 +678,7 @@ Class PulseGun : UTWeapon
UTMainHandler.DoFlash(self,Color(32,128,255,128),1);
A_AlertMonsters();
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);
for ( int i=0; i<4; i++ )
{
@ -743,7 +743,7 @@ Class PulseGun : UTWeapon
A_OverlayRenderstyle(-2,STYLE_Add);
Vector3 x, y, z;
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);
origin = level.Vec3Offset(origin,dt_Utility.CircleOffset(y,z,invoker.sangle,2));
invoker.sangle += 100;
@ -776,7 +776,7 @@ Class PulseGun : UTWeapon
invoker.special1 = 0;
A_StartSound("pulse/bolt",CHAN_WEAPON,CHANF_LOOPING);
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);
invoker.beam = Spawn("StarterBolt",origin);
invoker.beam.angle = angle;
@ -901,7 +901,7 @@ Class PulseGun : UTWeapon
PGR2 A 1
{
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.);
let c = Spawn("PulseMag",origin);
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);
else A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08);
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);
Actor p;
if ( alt ) p = Spawn("Razor2Alt",origin);

View file

@ -1036,7 +1036,7 @@ Class ViewShockSpark : ShockSpark
return;
}
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);
SetOrigin(origin,true);
bInvisible = (players[consoleplayer].camera != target);
@ -1069,7 +1069,7 @@ Class ShockRifle : UTWeapon
A_AlertMonsters();
A_QuakeEx(2,2,2,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
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);
Actor p = Spawn("ShockBeam",origin);
p.angle = angle;
@ -1106,7 +1106,7 @@ Class ShockRifle : UTWeapon
A_AlertMonsters();
A_QuakeEx(2,2,2,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
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);
Actor p = Spawn("ShockBall",origin);
p.angle = angle;
@ -1251,7 +1251,7 @@ Class EnhancedShockRifle : UTWeapon
A_AlertMonsters();
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15);
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);
Actor p = Spawn("SuperShockBeam",origin);
p.angle = angle;
@ -1288,7 +1288,7 @@ Class EnhancedShockRifle : UTWeapon
A_AlertMonsters();
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15);
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);
Actor p = Spawn("SuperShockBall",origin);
p.angle = angle;

View file

@ -95,7 +95,7 @@ Class SniperRifle : UTWeapon
let l = Spawn("SniperLight",pos);
l.target = self;
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);
if ( !zoomed ) origin = level.Vec3Offset(origin,y*4-z*2);
FLineTraceData d;

View file

@ -323,7 +323,7 @@ Class TranslocatorAfterimage : Actor
angle = target.angle-90;
roll = -90;
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");
String anivfile = Wads.ReadLump(lump);
int numframes = anivfile.ByteAt(0);
@ -417,7 +417,7 @@ Class Translocator : UTWeapon
invoker.FireEffect();
A_AlertMonsters();
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);
let p = Spawn("TranslocatorModule",origin);
p.target = self;
@ -592,7 +592,7 @@ Class OldTranslocator : Translocator
invoker.FireEffect();
A_AlertMonsters();
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;
let p = Spawn("OldTranslocatorModule",origin);
p.target = self;

View file

@ -103,7 +103,7 @@ Class UTPlayer : DoomPlayer
Player.StartItem "ImpactHammer";
Player.StartItem "MiniAmmo", 30;
Player.DamageScreenColor "FF 00 00";
Player.ViewHeight 46;
Player.ViewHeight 44;
Player.GruntSpeed 20;
Player.Portrait "TNT1A0";
+NOMENU;
@ -610,7 +610,7 @@ Class UTPlayer : DoomPlayer
Vector3 dir = (0,0,0);
if ( vel.length() > double.epsilon ) dir = vel.unit();
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;
if ( player.cmd.buttons&BT_JUMP ) 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();
double doomfriction = clamp(GetFriction()/ORIG_FRICTION,0.0,1.0);
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;
if ( player.cmd.buttons&BT_JUMP ) 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);
SetOrigin(dropper.Vec3Offset(hofs.x,hofs.y,dropper.height*0.5),false);
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.z += 4.0;
angle = dropper.angle;
@ -2215,7 +2215,7 @@ Class UTViewSpark : UTSpark
return;
}
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);
SetOrigin(origin,true);
bInvisible = (players[consoleplayer].camera != target);
@ -2462,7 +2462,7 @@ Class UTViewSmoke : UTSmoke
return;
}
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);
SetOrigin(origin,true);
bInvisible = (players[consoleplayer].camera != target);
@ -2778,7 +2778,7 @@ Class UTParticleMesh : Actor
pz[i] = az/4194304.;
}
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++ )
parts[i] = Spawn(pclass,level.Vec3Offset(pos,px[i]*scale.x*x+py[i]*scale.x*y+pz[i]*scale.y*z));
animframe = 0;
@ -2807,7 +2807,7 @@ Class UTParticleMesh : Actor
double theta = animframe-framea;
Vector3 posa, posb, ipos;
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++ )
{
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 )
{
// 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);
HScale = Screen.GetWidth()/1280.;
switch ( flak_colorprefs )
@ -1139,12 +1145,6 @@ Class UTHud : BaseStatusBar
}
}
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 ( CPlayer.fragcount != lastfragcnt ) lastfrag = level.time;

View file

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