1.3 update and whatnot.

This commit is contained in:
Marisa the Magician 2023-08-25 23:47:10 +02:00
commit 2f56442ffb
47 changed files with 153 additions and 178 deletions

19
LICENSE.txt Normal file
View file

@ -0,0 +1,19 @@
Copyright (c) 2018-2023 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.

View file

@ -2,7 +2,7 @@
The Unreal 1 counterpart to Doom Tournament. Adds Unreal 1 weapons and items (including dummied out stuff and others).
This mod requires GZDoom 4.9 or later, and runs on top of Doom Tournament. Like it, it took four years for some things to finally be possible. I've come a long way in modding, for sure.
This mod requires GZDoom 4.11 or later, and runs on top of Doom Tournament. Like it, it took four years for some things to finally be possible. I've come a long way in modding, for sure.
## What's In

View file

@ -5,7 +5,7 @@ Model "UPlayerMale2"
SurfaceSkin 0 0 "Male2/Ash.png"
SurfaceSkin 0 1 "GunPick1.png"
Scale 0.2 0.2 0.2
Offset 2.5 -7 21
Offset 2.5 7 21
RollOffset -90
AngleOffset -90
IGNORETRANSLATION

View file

@ -5,7 +5,7 @@ Model "UPlayerMale3"
SurfaceSkin 0 0 "Male3/Dante.png"
SurfaceSkin 0 1 "GunPick1.png"
Scale 0.2 0.2 0.2
Offset 2.5 -7 21
Offset 2.5 7 21
RollOffset -90
AngleOffset -90
IGNORETRANSLATION

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Before After
Before After

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Before After
Before After

Binary file not shown.

Binary file not shown.

View file

@ -1,4 +1,14 @@
version "4.10"
version "4.11"
/*
Doomreal add-on codebase
All code here is (C)2018-2023 Marisa the Magician, UnSX Team, and is
released under the terms of the MIT license (see LICENSE.txt).
No proprietary code by Epic Games has been copied, with or without
modification, in the process of developing this project.
*/
#include "zscript/unrealcommon.zsc"
#include "zscript/dispersionpistol.zsc"

View file

@ -269,9 +269,7 @@ Class ViewASMDSpark : ShockSpark
Destroy();
return;
}
Vector3 x, y, z;
[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 = dt_Utility.GetFireOffset(target,ofs.x,ofs.y,ofs.z);
SetOrigin(origin,true);
bInvisible = (players[consoleplayer].camera != target);
if ( isFrozen() ) return;
@ -670,9 +668,7 @@ Class ASMD : UnrealWeapon
UTMainHandler.DoFlash(self,Color(80,64,32,255),1);
if ( !Dampener.Active(self) ) A_AlertMonsters();
A_QuakeEx(1,1,1,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2.9*y-2.5*z);
Vector3 origin = dt_Utility.GetFireOffset(self,10,-2.9,-2.5);
Actor p = Spawn("ASMDBeam",origin);
p.angle = angle;
p.pitch = BulletSlope();
@ -701,9 +697,7 @@ Class ASMD : UnrealWeapon
UTMainHandler.DoFlash(self,Color(80,64,32,255),1);
if ( !Dampener.Active(self) ) A_AlertMonsters();
A_QuakeEx(1,1,1,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2.9*y-2.5*z);
Vector3 origin = dt_Utility.GetFireOffset(self,10,-2.9,-2.5);
Actor p = Spawn("ASMDBall",origin);
p.angle = angle;
p.pitch = BulletSlope();

View file

@ -191,14 +191,14 @@ Class Automag : UnrealWeapon
A_OverlayRenderstyle(-2,STYLE_Add);
}
Vector3 x, y, z, x2, y2, z2;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x);
[x, y, z] = dt_Utility.GetPlayerAxes(self);
int ydir = slave?1:-1;
if ( alt ) origin = level.Vec3Offset(origin,-z*3+ydir*y);
else origin = level.Vec3Offset(origin,-z+ydir*y*4);
Vector3 origin;
if ( alt ) origin = dt_Utility.GetFireOffset(self,10,ydir,-3);
else origin = dt_Utility.GetFireOffset(self,10,ydir*4,-1);
double a = FRandom[Automag](0,360), s = FRandom[Automag](0,alt?invoker.altaccuracy:0.01);
if ( invoker.Amount > 1 ) s *= 1.6;
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
[x2, y2, z2] = dt_Utility.GetPlayerAxesAutoAimed(self);
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);
@ -352,7 +352,8 @@ Class Automag : UnrealWeapon
invoker.slavedown = false;
if ( !invoker.slaveactive && (CountInv("Automag") > 1) )
{
invoker.slavespin = invoker.slavereload = invoker.slaverefire = 0;
invoker.slavespin = invoker.slavereload = false;
invoker.slaverefire = 0;
A_Overlay(2,"LeftReady");
}
}
@ -550,8 +551,8 @@ Class Automag : UnrealWeapon
UTPlayer(self).PlayReloading();
invoker.slavereload = (invoker.slaveactive&&(invoker.slaveclipcount<invoker.default.slaveclipcount)&&(invoker.Ammo1.Amount>0));
Vector3 x, y, z, origin;
[x,y,z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.-y*4.-z*8.);
[x,y,z] = dt_Utility.GetPlayerAxes(self);
origin = dt_Utility.GetFireOffset(self,4,-4,-8);
let c = Spawn("AutomagMag",origin);
c.angle = angle;
c.pitch = pitch;
@ -564,7 +565,7 @@ Class Automag : UnrealWeapon
{
if ( invoker.slaveclipcount >= invoker.default.slaveclipcount )
{
invoker.slavereload = 0;
invoker.slavereload = false;
return ResolveState("LeftIdle");
}
invoker.slaveclipout = true;
@ -586,8 +587,8 @@ Class Automag : UnrealWeapon
UTPlayer(self).PlayReloading();
invoker.slavereload = false;
Vector3 x, y, z, origin;
[x,y,z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.+y*4.-z*8.);
[x,y,z] = dt_Utility.GetPlayerAxes(self);
origin = dt_Utility.GetFireOffset(self,4,4,-8);
let c = Spawn("AutomagMag",origin);
c.angle = angle;
c.pitch = pitch;

View file

@ -264,14 +264,14 @@ Class Betamag : UnrealWeapon
A_OverlayRenderstyle(-2,STYLE_Add);
}
Vector3 x, y, z, x2, y2, z2;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x);
[x, y, z] = dt_Utility.GetPlayerAxes(self);
int ydir = slave?1:-1;
if ( alt ) origin = level.Vec3Offset(origin,-z*2.5+ydir*y*1.5);
else origin = level.Vec3Offset(origin,-z*1.5+ydir*y*2);
Vector3 origin;
if ( alt ) origin = dt_Utility.GetFireOffset(self,10,ydir*1.5,-2.5);
else origin = dt_Utility.GetFireOffset(self,10,ydir*2,-1.5);
double a = FRandom[Betamag](0,360), s = FRandom[Betamag](0,alt?invoker.altaccuracy:0.);
if ( invoker.Amount > 1 ) s = s*2.+FRandom[Betamag](0,0.01);
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
[x2, y2, z2] = dt_Utility.GetPlayerAxesAutoAimed(self);
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);
@ -409,7 +409,8 @@ Class Betamag : UnrealWeapon
invoker.slavedown = false;
if ( !invoker.slaveactive && (CountInv("Betamag") > 1) )
{
invoker.slavespin = invoker.slavewhip = invoker.slaverefire = 0;
invoker.slavespin = invoker.slavewhip = false;
invoker.slaverefire = 0;
player.setpsprite(2,ResolveState("LeftReady"));
}
}
@ -445,7 +446,8 @@ Class Betamag : UnrealWeapon
A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM);
if ( !invoker.slaveactive && (CountInv("Betamag") > 1) )
{
invoker.slavespin = invoker.slavewhip = invoker.slaverefire = 0;
invoker.slavespin = invoker.slavewhip = false;
invoker.slaverefire = 0;
player.setpsprite(2,ResolveState("LeftReady"));
}
}

View file

@ -308,8 +308,8 @@ Class BigGun : UnrealWeapon
action void A_Eject()
{
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),4*x+y*12-z*4);
[x, y, z] = dt_Utility.GetPlayerAxes(self);
Vector3 origin = dt_Utility.GetFireOffset(self,4,12,-4);
let c = Spawn("BigCasing",origin);
c.vel = x*FRandom[Junk](-1.5,1.5)+y*FRandom[Junk](2,4)+z*FRandom[Junk](-1,2);
}
@ -327,14 +327,13 @@ Class BigGun : UnrealWeapon
invoker.FireEffect();
UTMainHandler.DoFlash(self,Color(32,255,128,0),1);
A_QuakeEx(2,2,2,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollintensity:0.12);
Vector3 x, y, z, x2, y2, z2;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
vel -= x*(player.onground?9.5:2.5);
Vector3 x, y, z;
vel -= dt_Utility.GetPlayerViewDir(self)*(player.onground?9.5:2.5);
vel.z += (player.onground?2.8:.25);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+y*5-z*1);
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
Vector3 origin = dt_Utility.GetFireOffset(self,10,5,-1);
[x, y, z] = dt_Utility.GetPlayerAxesAutoAimed(self);
double a = FRandom[BigGun](0,360), s = FRandom[BigGun](0,bAlt?0.2:0.05);
Vector3 dir = dt_Utility.ConeSpread(x2,y2,z2,a,s);
Vector3 dir = dt_Utility.ConeSpread(x,y,z,a,s);
if ( !invoker.t ) invoker.t = new("BigTracer");
invoker.t.ignoreme = self;
invoker.t.hitlist.Clear();
@ -537,8 +536,8 @@ Class BigGun : UnrealWeapon
BIGR X 2
{
Vector3 x, y, z, origin;
[x,y,z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*5.-z*9.);
[x,y,z] = dt_Utility.GetPlayerAxes(self);
origin = dt_Utility.GetFireOffset(self,5,0,-9);
let c = Spawn("BigMag",origin);
c.angle = angle;
c.pitch = pitch;

View file

@ -48,9 +48,7 @@ Class Bonesaw : UnrealWeapon
FTranslatedLineTarget t;
double slope = AimLineAttack(angle,DEFMELEERANGE,t,0.,ALF_CHECK3D);
FLineTraceData d;
Vector3 x, y, z, origin;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),z*4);
Vector3 origin = dt_Utility.GetFireOffset(self,0,0,4);
LineTrace(angle,DEFMELEERANGE,slope,TRF_ABSPOSITION,origin.z,origin.x,origin.y,data:d);
if ( d.HitType != TRACE_HitNone )
{
@ -90,8 +88,8 @@ Class Bonesaw : UnrealWeapon
{
invoker.special1++;
Vector3 x, y, z, origin;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*15-z*4);
[x, y, z] = dt_Utility.GetPlayerAxes(self);
origin = dt_Utility.GetFireOffset(self,15,0,-4);
if ( waterlevel >= 3 )
{
UTMainHandler.DoKnockback(self,x,5000);
@ -113,8 +111,8 @@ Class Bonesaw : UnrealWeapon
invoker.FireEffect();
A_AlertMonsters();
Vector3 x, y, z, origin;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*15-z*4);
[x, y, z] = dt_Utility.GetPlayerAxes(self);
origin = dt_Utility.GetFireOffset(self,15,0,-4);
if ( waterlevel >= 3 )
{
UTMainHandler.DoKnockback(self,x,20000);

View file

@ -574,9 +574,7 @@ Class DispersionPistol : UnrealWeapon
A_OverlayRenderstyle(PSP_FLASH,STYLE_Add);
if ( !Dampener.Active(self) ) A_AlertMonsters(gameinfo.gametype&GAME_Strife?120:0);
A_QuakeEx(2,2,2,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z;
[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 = dt_Utility.GetFireOffset(self,10,-3,-3);
Actor p = Spawn(proj,origin);
p.angle = angle;
p.pitch = BulletSlope();
@ -648,9 +646,7 @@ Class DispersionPistol : UnrealWeapon
if ( !Dampener.Active(self) ) A_AlertMonsters(gameinfo.gametype&GAME_Strife?120:0);
int qs = int(1+invoker.chargesize*0.3);
A_QuakeEx(qs,qs,qs,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z;
[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 = dt_Utility.GetFireOffset(self,10,-3,-3);
Actor p = Spawn(proj,origin);
p.angle = angle;
p.pitch = BulletSlope();

View file

@ -367,16 +367,15 @@ Class FlameGun : UnrealWeapon
if ( bAlt ) A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
else A_QuakeEx(1,1,1,2,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
if ( !Dampener.Active(self) ) A_AlertMonsters();
Vector3 x, y, z, x2, y2, z2, dir;
Vector3 x, y, z, dir;
double a, s;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-3*y-z);
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
Vector3 origin = dt_Utility.GetFireOffset(self,10,-3,-1);
[x, y, z] = dt_Utility.GetPlayerAxesAutoAimed(self);
for ( int i=0; i<(bAlt?1:3); i++ )
{
a = FRandom[FlameGun](0,360);
s = FRandom[FlameGun](0,bAlt?0.:.06);
dir = dt_Utility.ConeSpread(x2,y2,z2,a,s);
dir = dt_Utility.ConeSpread(x,y,z,a,s);
let p = Spawn(bAlt?"UFireball2":"UFireball",origin);
p.angle = atan2(dir.y,dir.x);
p.pitch = asin(-dir.z);

View file

@ -206,15 +206,15 @@ Class SMiniGun : UnrealWeapon
invoker.special1 = (invoker.special1%4)+1;
}
Vector3 x, y, z, x2, y2, z2;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-y*2-z*2);
[x, y, z] = dt_Utility.GetPlayerAxes(self);
Vector3 origin = dt_Utility.GetFireOffset(self,10,-2,-2);
[x2, y2, z2] = dt_Utility.GetPlayerAxesAutoAimed(self);
for ( int i=0; i<(bAlt?4:1); i++ )
{
if ( bAlt && !weap.DepleteAmmo(weap.bAltFire,true,1) ) break;
int pos = bAlt?i:invoker.special1;
origin = level.Vec3Offset(origin,x*(!(pos%2)?-1.5:1.5)+y*(pos<2?-1.5:1.5));
double a = FRandom[Minigun](0,360), s = FRandom[Minigun](0,bAlt?0.12:0.03);
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
Vector3 dir = dt_Utility.ConeSpread(x2,y2,z2,a,s);
vel -= dir*(player.onground?3:1.2);
vel.z += (player.onground?0.8:.1);

View file

@ -176,6 +176,8 @@ Class ImpalerBurstBolt : Actor
t.hitlist[i].hitactor.DamageMobj(self,target,3,'Impaler',DMG_THRUSTLESS);
}
Vector3 normal = -t.Results.HitVector, dir = t.Results.HitVector;
double a = FRandom[Impaler](0,360), s = FRandom[Impaler](0.,.8);
invoker.nextdir = dt_Utility.ConeSpread(dir,y,z,a,s);
if ( t.Results.HitType == TRACE_HitWall )
{
normal = (t.Results.HitLine.delta.y,-t.Results.HitLine.delta.x,0).unit();
@ -197,13 +199,10 @@ Class ImpalerBurstBolt : Actor
}
else
{
// why the fuck
t.Results.HitPos = level.Vec3Offset(pos,x*10.125);
normal *= 0;
invoker.nextpos = t.Results.HitPos;
return;
}
double a = FRandom[Impaler](0,360), s = FRandom[Impaler](0.,.8);
invoker.nextpos = level.Vec3Offset(t.Results.HitPos,normal);
invoker.nextdir = dt_Utility.ConeSpread(dir,y,z,a,s);
}
action void A_Spread()
{
@ -545,11 +544,7 @@ Class StarterImpalerBolt : ImpalerBolt
}
Vector3 x, y, z, origin;
bRELATIVETOFLOOR = (target.pos.z <= target.floorz); // hack, but kinda works
if ( target.player )
{
[x, y, z] = dt_Utility.GetAxes(target.angle,target.pitch,target.roll);
origin = level.Vec3Offset(target.Vec2OffsetZ(0,0,target.player.viewz),15*x-2.5*z);
}
if ( target.player ) origin = dt_Utility.GetFireOffset(target,15,0,-2.5);
else origin = target.Vec3Offset(0,0,target.missileheight);
SetOrigin(origin,true);
if ( !flares[0] ) flares[0] = Spawn("ImpalerFlare",pos);
@ -562,7 +557,7 @@ Class StarterImpalerBolt : ImpalerBolt
flares[0].A_SetScale(0.01+cos(gametic*8)*0.002);
flares[1].A_SetScale(0.02+cos(gametic*8)*0.004);
double a = FRandom[Impaler](0,360), s = FRandom[Impaler](0.,.1);
[x, y, z] = dt_Utility.GetAxes(target.angle,target.pitch,target.roll);
[x, y, z] = dt_Utility.GetPlayerAxes(target);
Vector3 dir = dt_Utility.ConeSpread(x,y,z,a,s);
dir = oldx*.5+dir*.5;
oldx = dir;
@ -793,9 +788,7 @@ Class Impaler : UnrealWeapon
UTMainHandler.DoFlash(self,Color(16,224,64,255),1);
if ( !Dampener.Active(self) ) A_AlertMonsters();
A_QuakeEx(1,1,1,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2.5*z);
Vector3 origin = dt_Utility.GetFireOffset(self,10,0,-2.5);
Actor p = Spawn("ImpalerProjectile",origin);
p.angle = angle;
p.pitch = BulletSlope();
@ -818,9 +811,7 @@ Class Impaler : UnrealWeapon
}
action void A_StartBeam()
{
Vector3 x, y, z, origin;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),15*x-2.5*z);
Vector3 origin = dt_Utility.GetFireOffset(self,15,0,-2.5);
invoker.beam = Spawn("StarterImpalerBolt",origin);
invoker.beam.angle = angle;
invoker.beam.pitch = BulletSlope();
@ -846,9 +837,7 @@ Class Impaler : UnrealWeapon
invoker.FireEffect();
UTMainHandler.DoFlash(self,Color(16,255,32,255),3);
A_AlertMonsters();
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),15*x-2.5*z);
Vector3 origin = dt_Utility.GetFireOffset(self,15,0,-2.5);
int numpt = Random[Impaler](4,7);
for ( int i=0; i<numpt; i++ )
{
@ -895,9 +884,7 @@ Class Impaler : UnrealWeapon
FTranslatedLineTarget t;
double slope = AimLineAttack(angle,DEFMELEERANGE*1.5,t,0.,ALF_CHECK3D);
FLineTraceData d;
Vector3 x, y, z, origin;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),-z*4);
Vector3 origin = dt_Utility.GetFireOffset(self,0,0,-4);
LineTrace(angle,DEFMELEERANGE*1.5,slope,TRF_ABSPOSITION,origin.z,origin.x,origin.y,data:d);
if ( d.HitType != TRACE_HitNone )
{

View file

@ -191,12 +191,10 @@ Class VoiceBox : UnrealInventory
override bool Use( bool pickup )
{
if ( pickup || bActive ) return false;
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(Owner.angle,Owner.pitch,Owner.roll);
Vector3 origin = level.Vec3Offset(Owner.Vec2OffsetZ(0,0,Owner.player.viewz),x*20-z*8);
Vector3 origin = dt_Utility.GetFireOffset(Owner,20,0,-8);
box = Spawn("VoiceBoxActive",origin);
box.ReactionTime = Charge;
box.vel = x*9.;
box.vel = dt_Utility.GetPlayerViewDir(Owner)*9.;
box.vel.z += 1.;
box.target = Owner;
box.angle = Owner.angle;
@ -395,14 +393,12 @@ Class Flare : UnrealInventory
override bool Use( bool pickup )
{
if ( pickup ) return false;
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(Owner.angle,Owner.pitch,Owner.roll);
Vector3 origin = level.Vec3Offset(Owner.Vec2OffsetZ(0,0,Owner.player.viewz),x*10-z*8);
Vector3 origin = dt_Utility.GetFireOffset(Owner,10,0,-8);
let a = Spawn("FlareThrown",origin);
a.target = Owner;
a.angle = Owner.angle;
a.pitch = Owner.pitch;
a.vel += x*a.speed;
a.vel += dt_Utility.GetPlayerViewDir(Owner)*a.speed;
return true;
}
States
@ -677,14 +673,12 @@ Class BetaFlare : UnrealInventory
override bool Use( bool pickup )
{
if ( pickup || bActive || (charge < defaultcharge) ) return false;
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(Owner.angle,Owner.pitch,Owner.roll);
Vector3 origin = level.Vec3Offset(Owner.Vec2OffsetZ(0,0,Owner.player.viewz),x*10-z*8);
Vector3 origin = dt_Utility.GetFireOffset(Owner,10,0,-8);
let a = Spawn(ThrownClass,origin);
a.target = Owner;
a.angle = Owner.angle;
a.pitch = Owner.pitch;
a.vel += x*a.speed;
a.vel += dt_Utility.GetPlayerViewDir(Owner)*a.speed;
for ( Inventory i=Owner.Inv; i; i=i.Inv )
{
if ( !(i is 'BetaFlare') ) continue;
@ -1046,7 +1040,7 @@ Class Forcefield : UnrealInventory
override bool Use( bool pickup )
{
if ( pickup ) return false;
Vector3 origin = Owner.Vec2OffsetZ(0,0,Owner.player.viewz);
Vector3 origin = dt_Utility.GetPlayerEye(Owner);
FLineTraceData d;
Owner.LineTrace(Owner.angle,90,Owner.pitch,TRF_ABSPOSITION,origin.z,origin.x,origin.y,data:d);
if ( d.HitType != TRACE_HitNone ) origin = level.Vec3Offset(d.HitLocation,-d.HitDir*(GetDefaultByType("ForceFieldEffect").radius+8));
@ -1193,8 +1187,8 @@ Class UFlashLight1 : DynamicLight
Destroy();
return;
}
if ( target.player ) SetOrigin(target.Vec2OffsetZ(0,0,target.player.viewz),true);
else SetOrigin(target.vec3Offset(0,0,target.height*0.75),true);
if ( target.player ) SetOrigin(dt_Utility.GetPlayerEye(target),true);
else SetOrigin(target.Vec3Offset(0,0,target.height*0.75),true);
A_SetAngle(target.angle,SPF_INTERPOLATE);
A_SetPitch(target.pitch,SPF_INTERPOLATE);
if ( UnrealInventory(master) )
@ -1467,7 +1461,7 @@ Class SentryItem : UnrealInventory
tracer.SetStateLabel("PackUp");
return false;
}
Vector3 origin = Owner.Vec2OffsetZ(0,0,Owner.player.viewz);
Vector3 origin = dt_Utility.GetPlayerEye(Owner);
FLineTraceData d;
Owner.LineTrace(Owner.angle,80,Owner.pitch,TRF_ABSPOSITION,origin.z,origin.x,origin.y,data:d);
if ( d.HitType != TRACE_HitNone )
@ -2218,7 +2212,7 @@ Class SentryGunItem : UnrealInventory
override bool Use( bool pickup )
{
if ( pickup ) return false;
Vector3 origin = Owner.Vec2OffsetZ(0,0,Owner.player.viewz);
Vector3 origin = dt_Utility.GetPlayerEye(Owner);
FLineTraceData d;
Owner.LineTrace(Owner.angle,60,Owner.pitch,TRF_ABSPOSITION,origin.z,origin.x,origin.y,data:d);
if ( d.HitType != TRACE_HitNone )

View file

@ -893,20 +893,19 @@ Class UFlamethrower : UnrealWeapon
invoker.FireEffect();
A_AlertMonsters();
UTMainHandler.DoFlash(self,Color(32,255,128,0),1);
Vector3 x, y, z, x2, y2, z2;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),15*x-2.3*y-2.7*z);
Vector3 x, y, z;
Vector3 origin = dt_Utility.GetFireOffset(self,15,-2.3,-2.7);
for ( int i=0; i<2; i++ )
{
double a = FRandom[FlameT](0,360), s = FRandom[FlameT](0,.05);
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
Vector3 dir = dt_Utility.ConeSpread(x2,y2,z2,a,s);
[x, y, z] = dt_Utility.GetPlayerAxesAutoAimed(self);
Vector3 dir = dt_Utility.ConeSpread(x,y,z,a,s);
Actor p = Spawn("UFlame",origin);
if ( p.waterlevel > 0 )
{
p.Destroy();
s = FRandom[FlameT](0,.12);
dir = dt_Utility.ConeSpread(x2,y2,z2,a,s);
dir = dt_Utility.ConeSpread(x,y,z,a,s);
p = Spawn("UNapalmSplash",origin);
p.scale *= 0.2;
p.angle = atan2(dir.y,dir.x);
@ -980,9 +979,7 @@ Class UFlamethrower : UnrealWeapon
A_StartSound("flamet/altfire",CHAN_WEAPON,volume:Dampener.Active(self)?.1:1.,pitch:max(.5,1.2-invoker.chargesize/10.));
if ( self is 'UTPlayer' ) UTPlayer(self).PlayAttacking3();
A_QuakeEx(1+int(0.5*invoker.chargesize),1+int(0.5*invoker.chargesize),1+int(0.5*invoker.chargesize),5+int(1.2*invoker.chargesize),0,64,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05+0.01*invoker.chargesize);
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2.3*y-2.7*z);
Vector3 origin = dt_Utility.GetFireOffset(self,10,-2.3,-2.7);
Actor p = Spawn("UNapalmGlob",origin);
p.A_SetScale(0.5+invoker.chargesize/3.5);
p.angle = angle;

View file

@ -148,7 +148,7 @@ Class OLSMP : UnrealWeapon
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
A_OverlayRenderstyle(-2,STYLE_Add);
Vector3 x, y, z, x2, y2, z2;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
[x, y, z] = dt_Utility.GetPlayerAxes(self);
if ( alt )
{
vel -= x*(player.onground?2.:0.8);
@ -159,10 +159,9 @@ Class OLSMP : UnrealWeapon
vel -= x*(player.onground?2.2:1.);
vel.z += (player.onground?.5:.15);
}
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x);
origin = level.Vec3Offset(origin,-z-y*4);
Vector3 origin = dt_Utility.GetFireOffset(self,10,-4,-1);
double a = FRandom[Automag](0,360), s = FRandom[Automag](0,alt?(0.05+invoker.altaccuracy):0.05);
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
[x2, y2, z2] = dt_Utility.GetPlayerAxesAutoAimed(self);
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);
@ -352,8 +351,8 @@ Class OLSMP : UnrealWeapon
if ( self is 'UTPlayer' )
UTPlayer(self).PlayReloading();
Vector3 x, y, z, origin;
[x,y,z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.-y*4.-z*18.);
[x,y,z] = dt_Utility.GetPlayerAxes(self);
origin = dt_Utility.GetFireOffset(self,4,-4,-18);
let c = Spawn("OLSMPMag",origin);
c.angle = angle;
c.pitch = pitch;

View file

@ -435,9 +435,7 @@ Class Peacemaker : UnrealWeapon
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
invoker.FireEffect();
A_StartSound("peace/throw",CHAN_WEAPON);
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+y*5-z*3);
Vector3 origin = dt_Utility.GetFireOffset(self,10,5,-3);
let p = Spawn("PeaceBarrel",origin);
if ( bAlt ) p.bAMBUSH = true;
p.special1 = invoker.special2;

View file

@ -247,9 +247,9 @@ Class QuadShot : UnrealWeapon
return;
}
Vector3 x, y, z, x2, y2, z2;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-z*2);
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
[x, y, z] = dt_Utility.GetPlayerAxes(self);
Vector3 origin = dt_Utility.GetFireOffset(self,10,0,-2);
[x2, y2, z2] = dt_Utility.GetPlayerAxesAutoAimed(self);
double a, s;
Vector3 dir;
if ( bAlt )
@ -317,8 +317,8 @@ Class QuadShot : UnrealWeapon
action void A_DropShells()
{
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),-x*4+y*8-z*8);
[x, y, z] = dt_Utility.GetPlayerAxes(self);
Vector3 origin = dt_Utility.GetFireOffset(self,-4,8,-8);
for ( int i=0; i<(4-invoker.clipcount); i++ )
{
let c = Spawn("QCasing",origin);

View file

@ -246,11 +246,9 @@ Class Razorjack : UnrealWeapon
UTMainHandler.DoFlash(self,Color(16,255,0,255),1);
A_AlertMonsters();
A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08);
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = Vec2OffsetZ(0,0,player.viewz);
if ( bAlt ) origin = level.Vec3Offset(origin,x*10-y*4-z*5);
else origin = level.Vec3Offset(origin,x*10-z*9);
Vector3 origin;
if ( bAlt ) origin = dt_Utility.GetFireOffset(self,10,-4,-5);
else origin = dt_Utility.GetFireOffset(self,10,0,-9);
Actor p;
p = Spawn("RazorBlade",origin);
if ( bAlt )

View file

@ -135,11 +135,12 @@ Class URifle : UnrealWeapon
let l = Spawn("SniperLight",pos);
l.target = self;
Vector3 x, y, z, x2, y2, z2, dir;
[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*3-z*2);
[x, y, z] = dt_Utility.GetPlayerAxes(self);
Vector3 origin;
if ( zoomed ) origin = dt_Utility.GetFireOffset(self,10,0,0);
else origin = dt_Utility.GetFireOffset(self,10,-3,-2);
FLineTraceData d;
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
[x2, y2, z2] = dt_Utility.GetPlayerAxesAutoAimed(self);
if ( alt ) dir = dt_Utility.ConeSpread(x2,y2,z2,FRandom[Rifle](0,360),FRandom[Rifle](0.,.25));
else dir = x2;
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);

View file

@ -153,9 +153,7 @@ Class ViewStingerChunk : StingerChunk
Destroy();
return;
}
Vector3 x, y, z;
[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 = dt_Utility.GetFireOffset(target,ofs.x,ofs.y,ofs.z);
SetOrigin(origin,true);
bInvisible = (players[consoleplayer].camera != target);
if ( isFrozen() ) return;
@ -597,9 +595,7 @@ Class Stinger : UnrealWeapon
UTMainHandler.DoFlash(self,Color(16,0,64,255),1);
if ( !Dampener.Active(self) ) A_AlertMonsters();
A_QuakeEx(1,1,1,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),5*x-8*y-8*z);
Vector3 origin = dt_Utility.GetFireOffset(self,5,-8,-8);
Actor p = Spawn("StingerProjectile",origin);
p.angle = angle;
p.pitch = BulletSlope();
@ -642,9 +638,8 @@ Class Stinger : UnrealWeapon
if ( !Dampener.Active(self) ) A_AlertMonsters();
A_QuakeEx(1,1,1,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),5*x-8*y-8*z);
[x, y, z] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
[x, y, z] = dt_Utility.GetPlayerAxesAutoAimed(self);
Vector3 origin = dt_Utility.GetFireOffset(self,5,-8,-8);
Actor p;
double a, s;
Vector3 dir;

View file

@ -362,9 +362,7 @@ Class Stunner : UnrealWeapon
invoker.FireEffect();
A_QuakeEx(1+int(0.5*invoker.chargesize),1+int(0.5*invoker.chargesize),1+int(0.5*invoker.chargesize),5+int(1.2*invoker.chargesize),0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05+0.01*invoker.chargesize);
A_Overlay(-2,"Null");
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*10-z*5);
Vector3 origin = dt_Utility.GetFireOffset(self,10,0,-5);
let p = Spawn("StunProj",origin);
p.angle = angle;
p.pitch = BulletSlope();
@ -379,7 +377,7 @@ Class Stunner : UnrealWeapon
if ( d.HitLocation.z >= (d.HitActor.pos.z+d.HitActor.height*0.81) )
dmg = d.HitActor.DamageMobj(invoker,self,dmg*2,'Decapitated',DMG_THRUSTLESS);
else dmg = d.HitActor.DamageMobj(invoker,self,dmg,'impact',DMG_THRUSTLESS);
UTMainHandler.DoKnockback(d.HitActor,x,4000*invoker.chargesize);
UTMainHandler.DoKnockback(d.HitActor,d.HitDir,4000*invoker.chargesize);
if ( d.HitActor.bNOBLOOD )
{
let p = Spawn("StunnerImpact",d.HitLocation-d.HitDir*4);

View file

@ -656,10 +656,7 @@ Class UBioRifle : UnrealWeapon
if ( !Dampener.Active(self) ) A_AlertMonsters();
if ( bAlt ) A_QuakeEx(1+int(0.5*invoker.chargesize),1+int(0.5*invoker.chargesize),1+int(0.5*invoker.chargesize),5+int(1.2*invoker.chargesize),0,64,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05+0.01*invoker.chargesize);
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_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-4*y-5*z);
Vector3 origin = dt_Utility.GetFireOffset(self,10,-4,-5);
Actor p;
if ( bAlt )
{

View file

@ -419,9 +419,9 @@ Class Eightball : UnrealWeapon
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_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2*z);
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
[x, y, z] = dt_Utility.GetPlayerAxes(self);
Vector3 origin = dt_Utility.GetFireOffset(self,10,0,-2);
[x2, y2, z2] = dt_Utility.GetPlayerAxesAutoAimed(self);
Actor p;
if ( weap.bAltFire )
{
@ -502,8 +502,8 @@ Class Eightball : UnrealWeapon
while ( a = Actor(t.Next()) )
{
if ( !a.bSHOOTABLE || (a.Health <= 0) || a.bKilled || !a.bIsMonster || a.bCorpse || (a == self) || isTeammate(a) || !CheckSight(a) ) continue;
Vector3 viewdir = dt_Utility.Vec3FromAngle(angle,pitch);
Vector3 reldir = level.Vec3Diff(Vec2OffsetZ(0,0,player.viewz),a.Vec2OffsetZ(0,0,a.pos.z+a.height*0.5));
Vector3 viewdir = dt_Utility.GetPlayerViewDir(self);
Vector3 reldir = level.Vec3Diff(dt_Utility.GetPlayerEye(self),a.Vec2OffsetZ(0,0,a.pos.z+a.height*0.5));
double reldist = reldir.length();
if ( reldist > 2000 ) continue;
if ( reldir.unit() dot viewdir < 0.99 ) continue;

View file

@ -203,9 +203,8 @@ Class UFlakCannon : UnrealWeapon
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_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-5*y-4*z);
[x, y, z] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
Vector3 origin = dt_Utility.GetFireOffset(self,10,-5,-4);
[x, y, z] = dt_Utility.GetPlayerAxesAutoAimed(self);
Vector3 offsets[8]; // vanilla adds these to each chunk
offsets[0] = (0,0,0);
offsets[1] = -z;
@ -259,10 +258,7 @@ Class UFlakCannon : UnrealWeapon
UTMainHandler.DoFlash(self,Color(32,255,96,0),1);
if ( !Dampener.Active(self) ) A_AlertMonsters();
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_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-5*y-4*z);
Vector3 origin = dt_Utility.GetFireOffset(self,10,-5,-4);
Actor p = Spawn("UFlakSlug",origin);
p.angle = angle;
p.pitch = BulletSlope();
@ -345,8 +341,8 @@ Class UFlakCannon : UnrealWeapon
FLKE S 4
{
Vector3 x, y, z, origin;
[x,y,z] = dt_Utility.GetAxes(angle,pitch,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.-y*3.-z*8.);
[x,y,z] = dt_Utility.GetPlayerAxes(self);
origin = dt_Utility.GetFireOffset(self,4,-3,-8);
let c = Spawn("UFlakMag",origin);
c.angle = angle;
c.pitch = pitch;

View file

@ -206,14 +206,12 @@ Class Seeds : UnrealInventory
override bool Use( bool pickup )
{
if ( pickup ) return false;
Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(Owner.angle,Owner.pitch,Owner.roll);
Vector3 origin = level.Vec3Offset(Owner.Vec2OffsetZ(0,0,Owner.player.viewz),x*10-z*8);
Vector3 origin = dt_Utility.GetFireOffset(self,10,0,-8);
let a = Spawn("SeedProj",origin);
a.target = Owner;
a.angle = Owner.angle;
a.pitch = Owner.pitch;
a.vel += x*a.speed;
a.vel += dt_Utility.Vec3FromAngle(a.angle,a.pitch)*a.speed;
return true;
}
States

View file

@ -50,10 +50,10 @@ Class UMinigun : UnrealWeapon
l.target = self;
if ( !alt ) MinigunLight(l).cnt--;
Vector3 x, y, z, x2, y2, z2;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-y*3-z*3);
[x, y, z] = dt_Utility.GetPlayerAxes(self);
Vector3 origin = dt_Utility.GetFireOffset(self,10,-3,-3);
double a = FRandom[Minigun](0,360), s = FRandom[Minigun](0,alt?0.05:0.02);
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
[x2, y2, z2] = dt_Utility.GetPlayerAxesAutoAimed(self);
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

@ -844,7 +844,7 @@ Class UnrealInventory : Inventory
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_Utility.GetAxes(dropper.angle,dropper.pitch,dropper.roll);
[x, y, z] = dt_Utility.GetPlayerAxes(dropper);
vel = x*12.0;
vel.z += 4.0;
angle = dropper.angle;

View file

@ -847,7 +847,8 @@ Class UnrealHUD : BaseStatusBar
}
lastwep = CPlayer.PendingWeapon;
vtracer.ignore = CPlayer.mo;
vtracer.trace(CPlayer.mo.Vec2OffsetZ(0,0,CPlayer.viewz),CPlayer.mo.CurSector,dt_Utility.Vec3FromAngle(CPlayer.mo.angle,CPlayer.mo.pitch),1000,0);
Vector3 origin = dt_Utility.GetPlayerEye(CPlayer.mo);
vtracer.trace(origin,level.PointInSector(origin.xy),dt_Utility.GetPlayerViewDir(CPlayer.mo),1000,0);
if ( vtracer.Results.HitType != TRACE_HitActor ) return;
lastseen = vtracer.Results.HitActor;
lastseentic = gametic;

View file

@ -157,9 +157,7 @@ Class UTranslocator : UnrealWeapon
if ( !weap ) return;
A_StartSound("telehand/throw",CHAN_WEAPON);
invoker.FireEffect();
Vector3 x, y, z;
[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 = dt_Utility.GetFireOffset(self,10,-8,-12);
let p = Spawn("UTranslocatorModule",origin);
p.target = self;
p.angle = angle;