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). 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 ## What's In
@ -81,4 +81,4 @@ This mod requires GZDoom 4.9 or later, and runs on top of Doom Tournament. Like
- ASMD behavior described in the Unreal novels (green energy beam that bounces off mirrors and water). - ASMD behavior described in the Unreal novels (green energy beam that bounces off mirrors and water).
- Quadshot partial reload animations. - Quadshot partial reload animations.
- Skaarj Trooper player model. - Skaarj Trooper player model.
- Return to Na Pali weapons and items. - Return to Na Pali weapons and items.

View file

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

View file

@ -5,7 +5,7 @@ Model "UPlayerMale3"
SurfaceSkin 0 0 "Male3/Dante.png" SurfaceSkin 0 0 "Male3/Dante.png"
SurfaceSkin 0 1 "GunPick1.png" SurfaceSkin 0 1 "GunPick1.png"
Scale 0.2 0.2 0.2 Scale 0.2 0.2 0.2
Offset 2.5 -7 21 Offset 2.5 7 21
RollOffset -90 RollOffset -90
AngleOffset -90 AngleOffset -90
IGNORETRANSLATION 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/unrealcommon.zsc"
#include "zscript/dispersionpistol.zsc" #include "zscript/dispersionpistol.zsc"

View file

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

View file

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

View file

@ -264,14 +264,14 @@ Class Betamag : UnrealWeapon
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_Utility.GetAxes(angle,pitch,roll); [x, y, z] = dt_Utility.GetPlayerAxes(self);
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*2.5+ydir*y*1.5); Vector3 origin;
else origin = level.Vec3Offset(origin,-z*1.5+ydir*y*2); 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.); 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); 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); 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);
@ -409,7 +409,8 @@ Class Betamag : UnrealWeapon
invoker.slavedown = false; invoker.slavedown = false;
if ( !invoker.slaveactive && (CountInv("Betamag") > 1) ) 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")); player.setpsprite(2,ResolveState("LeftReady"));
} }
} }
@ -445,7 +446,8 @@ Class Betamag : UnrealWeapon
A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM); A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM);
if ( !invoker.slaveactive && (CountInv("Betamag") > 1) ) 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")); player.setpsprite(2,ResolveState("LeftReady"));
} }
} }

View file

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

View file

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

View file

@ -574,9 +574,7 @@ Class DispersionPistol : UnrealWeapon
A_OverlayRenderstyle(PSP_FLASH,STYLE_Add); A_OverlayRenderstyle(PSP_FLASH,STYLE_Add);
if ( !Dampener.Active(self) ) A_AlertMonsters(gameinfo.gametype&GAME_Strife?120:0); 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); A_QuakeEx(2,2,2,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z; Vector3 origin = dt_Utility.GetFireOffset(self,10,-3,-3);
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-3*y-3*z);
Actor p = Spawn(proj,origin); Actor p = Spawn(proj,origin);
p.angle = angle; p.angle = angle;
p.pitch = BulletSlope(); p.pitch = BulletSlope();
@ -648,9 +646,7 @@ Class DispersionPistol : UnrealWeapon
if ( !Dampener.Active(self) ) A_AlertMonsters(gameinfo.gametype&GAME_Strife?120:0); if ( !Dampener.Active(self) ) A_AlertMonsters(gameinfo.gametype&GAME_Strife?120:0);
int qs = int(1+invoker.chargesize*0.3); int qs = int(1+invoker.chargesize*0.3);
A_QuakeEx(qs,qs,qs,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1); A_QuakeEx(qs,qs,qs,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z; Vector3 origin = dt_Utility.GetFireOffset(self,10,-3,-3);
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-3*y-3*z);
Actor p = Spawn(proj,origin); Actor p = Spawn(proj,origin);
p.angle = angle; p.angle = angle;
p.pitch = BulletSlope(); 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); 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); else A_QuakeEx(1,1,1,2,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
if ( !Dampener.Active(self) ) A_AlertMonsters(); if ( !Dampener.Active(self) ) A_AlertMonsters();
Vector3 x, y, z, x2, y2, z2, dir; Vector3 x, y, z, dir;
double a, s; double a, s;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll); Vector3 origin = dt_Utility.GetFireOffset(self,10,-3,-1);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-3*y-z); [x, y, z] = dt_Utility.GetPlayerAxesAutoAimed(self);
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll);
for ( int i=0; i<(bAlt?1:3); i++ ) for ( int i=0; i<(bAlt?1:3); i++ )
{ {
a = FRandom[FlameGun](0,360); a = FRandom[FlameGun](0,360);
s = FRandom[FlameGun](0,bAlt?0.:.06); 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); let p = Spawn(bAlt?"UFireball2":"UFireball",origin);
p.angle = atan2(dir.y,dir.x); p.angle = atan2(dir.y,dir.x);
p.pitch = asin(-dir.z); p.pitch = asin(-dir.z);

View file

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

View file

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

View file

@ -893,20 +893,19 @@ Class UFlamethrower : UnrealWeapon
invoker.FireEffect(); invoker.FireEffect();
A_AlertMonsters(); A_AlertMonsters();
UTMainHandler.DoFlash(self,Color(32,255,128,0),1); UTMainHandler.DoFlash(self,Color(32,255,128,0),1);
Vector3 x, y, z, x2, y2, z2; Vector3 x, y, z;
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll); Vector3 origin = dt_Utility.GetFireOffset(self,15,-2.3,-2.7);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),15*x-2.3*y-2.7*z);
for ( int i=0; i<2; i++ ) for ( int i=0; i<2; i++ )
{ {
double a = FRandom[FlameT](0,360), s = FRandom[FlameT](0,.05); double a = FRandom[FlameT](0,360), s = FRandom[FlameT](0,.05);
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll); [x, y, z] = dt_Utility.GetPlayerAxesAutoAimed(self);
Vector3 dir = dt_Utility.ConeSpread(x2,y2,z2,a,s); Vector3 dir = dt_Utility.ConeSpread(x,y,z,a,s);
Actor p = Spawn("UFlame",origin); Actor p = Spawn("UFlame",origin);
if ( p.waterlevel > 0 ) if ( p.waterlevel > 0 )
{ {
p.Destroy(); p.Destroy();
s = FRandom[FlameT](0,.12); 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 = Spawn("UNapalmSplash",origin);
p.scale *= 0.2; p.scale *= 0.2;
p.angle = atan2(dir.y,dir.x); 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.)); 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(); 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); 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; Vector3 origin = dt_Utility.GetFireOffset(self,10,-2.3,-2.7);
[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);
Actor p = Spawn("UNapalmGlob",origin); Actor p = Spawn("UNapalmGlob",origin);
p.A_SetScale(0.5+invoker.chargesize/3.5); p.A_SetScale(0.5+invoker.chargesize/3.5);
p.angle = angle; p.angle = angle;

View file

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

View file

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

View file

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

View file

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

View file

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

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

View file

@ -362,9 +362,7 @@ Class Stunner : UnrealWeapon
invoker.FireEffect(); 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_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"); A_Overlay(-2,"Null");
Vector3 x, y, z; Vector3 origin = dt_Utility.GetFireOffset(self,10,0,-5);
[x, y, z] = dt_Utility.GetAxes(angle,pitch,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*10-z*5);
let p = Spawn("StunProj",origin); let p = Spawn("StunProj",origin);
p.angle = angle; p.angle = angle;
p.pitch = BulletSlope(); p.pitch = BulletSlope();
@ -379,7 +377,7 @@ Class Stunner : UnrealWeapon
if ( d.HitLocation.z >= (d.HitActor.pos.z+d.HitActor.height*0.81) ) if ( d.HitLocation.z >= (d.HitActor.pos.z+d.HitActor.height*0.81) )
dmg = d.HitActor.DamageMobj(invoker,self,dmg*2,'Decapitated',DMG_THRUSTLESS); dmg = d.HitActor.DamageMobj(invoker,self,dmg*2,'Decapitated',DMG_THRUSTLESS);
else dmg = d.HitActor.DamageMobj(invoker,self,dmg,'impact',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 ) if ( d.HitActor.bNOBLOOD )
{ {
let p = Spawn("StunnerImpact",d.HitLocation-d.HitDir*4); 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 ( !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); 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); else A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05);
Vector3 x, y, z; Vector3 origin = dt_Utility.GetFireOffset(self,10,-4,-5);
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);
Actor p; Actor p;
if ( bAlt ) 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); 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_Utility.GetAxes(angle,pitch,roll); [x, y, z] = dt_Utility.GetPlayerAxes(self);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-2*z); Vector3 origin = dt_Utility.GetFireOffset(self,10,0,-2);
[x2, y2, z2] = dt_Utility.GetAxes(angle,BulletSlope(),roll); [x2, y2, z2] = dt_Utility.GetPlayerAxesAutoAimed(self);
Actor p; Actor p;
if ( weap.bAltFire ) if ( weap.bAltFire )
{ {
@ -502,8 +502,8 @@ Class Eightball : UnrealWeapon
while ( a = Actor(t.Next()) ) while ( a = Actor(t.Next()) )
{ {
if ( !a.bSHOOTABLE || (a.Health <= 0) || a.bKilled || !a.bIsMonster || a.bCorpse || (a == self) || isTeammate(a) || !CheckSight(a) ) continue; 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 viewdir = dt_Utility.GetPlayerViewDir(self);
Vector3 reldir = level.Vec3Diff(Vec2OffsetZ(0,0,player.viewz),a.Vec2OffsetZ(0,0,a.pos.z+a.height*0.5)); Vector3 reldir = level.Vec3Diff(dt_Utility.GetPlayerEye(self),a.Vec2OffsetZ(0,0,a.pos.z+a.height*0.5));
double reldist = reldir.length(); double reldist = reldir.length();
if ( reldist > 2000 ) continue; if ( reldist > 2000 ) continue;
if ( reldir.unit() dot viewdir < 0.99 ) 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); 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_Utility.GetAxes(angle,pitch,roll); Vector3 origin = dt_Utility.GetFireOffset(self,10,-5,-4);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-5*y-4*z); [x, y, z] = dt_Utility.GetPlayerAxesAutoAimed(self);
[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;
@ -259,10 +258,7 @@ Class UFlakCannon : UnrealWeapon
UTMainHandler.DoFlash(self,Color(32,255,96,0),1); UTMainHandler.DoFlash(self,Color(32,255,96,0),1);
if ( !Dampener.Active(self) ) A_AlertMonsters(); if ( !Dampener.Active(self) ) A_AlertMonsters();
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 origin = dt_Utility.GetFireOffset(self,10,-5,-4);
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);
Actor p = Spawn("UFlakSlug",origin); Actor p = Spawn("UFlakSlug",origin);
p.angle = angle; p.angle = angle;
p.pitch = BulletSlope(); p.pitch = BulletSlope();
@ -345,8 +341,8 @@ Class UFlakCannon : UnrealWeapon
FLKE S 4 FLKE S 4
{ {
Vector3 x, y, z, origin; Vector3 x, y, z, origin;
[x,y,z] = dt_Utility.GetAxes(angle,pitch,roll); [x,y,z] = dt_Utility.GetPlayerAxes(self);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.-y*3.-z*8.); origin = dt_Utility.GetFireOffset(self,4,-3,-8);
let c = Spawn("UFlakMag",origin); let c = Spawn("UFlakMag",origin);
c.angle = angle; c.angle = angle;
c.pitch = pitch; c.pitch = pitch;

View file

@ -206,14 +206,12 @@ Class Seeds : UnrealInventory
override bool Use( bool pickup ) override bool Use( bool pickup )
{ {
if ( pickup ) return false; if ( pickup ) return false;
Vector3 x, y, z; Vector3 origin = dt_Utility.GetFireOffset(self,10,0,-8);
[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);
let a = Spawn("SeedProj",origin); let a = Spawn("SeedProj",origin);
a.target = Owner; a.target = Owner;
a.angle = Owner.angle; a.angle = Owner.angle;
a.pitch = Owner.pitch; a.pitch = Owner.pitch;
a.vel += x*a.speed; a.vel += dt_Utility.Vec3FromAngle(a.angle,a.pitch)*a.speed;
return true; return true;
} }
States States

View file

@ -50,10 +50,10 @@ Class UMinigun : UnrealWeapon
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_Utility.GetAxes(angle,pitch,roll); [x, y, z] = dt_Utility.GetPlayerAxes(self);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x-y*3-z*3); Vector3 origin = dt_Utility.GetFireOffset(self,10,-3,-3);
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_Utility.GetAxes(angle,BulletSlope(),roll); [x2, y2, z2] = dt_Utility.GetPlayerAxesAutoAimed(self);
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

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

View file

@ -847,7 +847,8 @@ Class UnrealHUD : BaseStatusBar
} }
lastwep = CPlayer.PendingWeapon; lastwep = CPlayer.PendingWeapon;
vtracer.ignore = CPlayer.mo; 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; if ( vtracer.Results.HitType != TRACE_HitActor ) return;
lastseen = vtracer.Results.HitActor; lastseen = vtracer.Results.HitActor;
lastseentic = gametic; lastseentic = gametic;

View file

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