Began working on Rocket Launcher.

Corrected some stuff and tweaked models and offsets again.
Added gib impact sounds (Droplets compat).
Made Translocator module throwing work like in UT (same math, even).
Corrected sludge wall sticking, uses projection now rather than a cheap trace.
This commit is contained in:
Marisa the Magician 2018-05-30 01:36:38 +02:00
commit a6ccec0997
19 changed files with 356 additions and 60 deletions

View file

@ -81,8 +81,9 @@ Model "UTRocketLauncher"
SurfaceSkin 0 3 "Eight_t4.png"
SurfaceSkin 0 4 "miniammoledbase.png"
Scale -0.24 0.12 0.24
Offset 2.0 -11.0 -9.5
Offset 2.0 -12.0 -10.5
AngleOffset 90
RollOffset -3
// Select
FrameIndex EBLS A 0 0

View file

@ -742,7 +742,7 @@ Model "FlakCannon"
AngleOffset 90
PitchOffset 90
Scale 0.08 0.08 0.08
Offset 7.4 -25.0 -7.5
Offset 7.4 -25.0 -8.5
FrameIndex FMUZ A 2 0
}
@ -758,9 +758,9 @@ Model "FlakCannon"
SurfaceSkin 0 4 "flakammoledbase.png"
AngleOffset 90
PitchOffset 180
RollOffset 174.375
RollOffset 178
Scale 0.28 -0.14 0.28
Offset 8.6 -10.4 -12.8
Offset 8.6 -10.4 -13.8
// select
FrameIndex FLKS A 0 0

View file

@ -16,7 +16,7 @@ Model "BioGel"
Path "models"
Model 0 "BioGelm_d.3d"
Skin 0 "Jgreen.png"
Scale 0.08 0.096 0.08
Scale 0.096 0.08 0.08
PitchOffset -90
USEACTORPITCH
USEACTORROLL
@ -88,7 +88,7 @@ Model "BioSplash"
Path "models"
Model 0 "BioGelm_d.3d"
Skin 0 "Jgreen.png"
Scale 0.08 0.096 0.08
Scale 0.096 0.08 0.08
PitchOffset -90
USEACTORPITCH
USEACTORROLL
@ -160,7 +160,7 @@ Model "BioGlob"
Path "models"
Model 0 "BioGelm_d.3d"
Skin 0 "Jgreen.png"
Scale 0.08 0.096 0.08
Scale 0.096 0.08 0.08
PitchOffset -90
USEACTORPITCH
USEACTORROLL

View file

@ -181,7 +181,7 @@ Model "PulseGun"
AngleOffset 90
PitchOffset 90
Scale 0.08 0.08 0.08
Offset 8.5 -25.0 -4.5
Offset 8.5 -25.0 -3.5
FrameIndex PMUZ A 2 0
}
@ -195,7 +195,7 @@ Model "PulseGun"
SurfaceSkin 0 2 "JPulseGun_03.png"
AngleOffset 90
Scale 0.26 -0.195 0.26
Offset 0.0 -7.5 -8.0
Offset 0.0 -7.5 -7.0
// Select
FrameIndex PGNS A 0 2

View file

@ -28,7 +28,7 @@ Model "Ripper2"
Skin 1 "JRazorw.png"
Scale 0.2 0.2 0.24
AngleOffset 90
ZOffset 6
ZOffset 10
FrameIndex RZRP B 1 0
}
@ -86,7 +86,7 @@ Model "Ripper2"
SurfaceSkin 0 3 "JRazor5.png"
SurfaceSkin 0 4 "JRazor3.png"
Scale 0.16 -0.08 0.16
Offset 6.4 -9.8 -7.9
Offset 6.4 -9.8 -8.4
AngleOffset 90
// Select

View file

@ -33,7 +33,7 @@ Model "Translocator"
SurfaceSkin 1 1 "tloc2_.png"
Scale 0.046 0.046 0.0552
AngleOffset -90
ZOffset 6
ZOffset 1
FrameIndex TLCP B 1 0
}
@ -48,8 +48,9 @@ Model "Translocator"
SurfaceSkin 0 3 "tloc4.png"
Scale 0.11 -0.055 0.11
Offset -19.8 -22.8 -31.2
AngleOffset -94.21875
PitchOffset 3.55555555556
AngleOffset -95
PitchOffset 5
RollOffset -5
// select
FrameIndex TLCS A 0 18

View file

@ -120,6 +120,14 @@ misc/gibbed5 gib5
$random misc/gibbed { misc/gibbed1 misc/gibbed2 misc/gibbed3 misc/gibbed4 misc/gibbed5 }
// universal gibs compat
$alias UniversalGibs/Gib misc/gibbed
// droplets compat
misc/gibp1 gibp1
misc/gibp2 gibp3
misc/gibp3 gibp4
misc/gibp4 gibp5
misc/gibp5 gibp6
$random misc/gibp { misc/gibp1 misc/gibp2 misc/gibp3 misc/gibp4 misc/gibp5 }
$alias blood/hit misc/gibp
impact/select imppick
impact/pull impaltst

BIN
sounds/gibP1.ogg Normal file

Binary file not shown.

BIN
sounds/gibP3.ogg Normal file

Binary file not shown.

BIN
sounds/gibP4.ogg Normal file

Binary file not shown.

BIN
sounds/gibP5.ogg Normal file

Binary file not shown.

BIN
sounds/gibP6.ogg Normal file

Binary file not shown.

View file

@ -255,11 +255,12 @@ Class BioGel : Actor
atside = 0;
normal *= -1;
}
Vector3 orig = (BlockingLine.v1.p.x,BlockingLine.v1.p.y,0);
Vector3 onwall = pos-(normal dot (pos-orig))*normal;
SetOrigin(onwall+normal*0.5,false);
angle = atan2(normal.y,normal.x);
pitch = 0;
roll = 180; // otherwise it slides upwards (UT changes roll like this too)
LineTrace(angle+180,172,0,TRF_THRUACTORS,data:d);
SetOrigin(d.HitLocation+normal*0.5,false);
if ( waterlevel > 0 ) hittype = HIT_FLOOR;
else hittype = HIT_WALL;
}
@ -345,6 +346,7 @@ Class BioGel : Actor
+SKYEXPLODE;
+FORCERADIUSDMG;
+FORCEXYBILLBOARD;
+MOVEWITHSECTOR;
}
States
{

View file

@ -38,6 +38,10 @@ Class UTRocketAmmo2 : UTRocketAmmo
Class UTRocket : Actor
{
Default
{
Obituary "%o was smacked down by %k's Rocket Launcher.";
}
States
{
Spawn:
@ -48,6 +52,10 @@ Class UTRocket : Actor
Class UTGrenade : Actor
{
Default
{
Obituary "%o was smacked down by %k's Rocket Launcher.";
}
States
{
Spawn:
@ -58,12 +66,49 @@ Class UTGrenade : Actor
Class UTRocketLauncher : UTWeapon
{
int loaded;
Actor LockedTarget;
// consumes 1 ammo
action void A_LoadRocket()
{
Weapon weap = Weapon(invoker);
if ( !weap ) return;
if ( weap.Ammo1.Amount <= 0 ) return;
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
}
// refire that is ignored if there's no ammo
action void A_LoadedRefire( statelabel flash = null )
{
Weapon weap = Weapon(invoker);
if ( !weap ) return;
if ( weap.Ammo1.Amount <= 0 ) return;
A_Refire(flash);
}
// fire all the rockets (or grenades)
action void A_FireRockets( int num )
{
Weapon weap = Weapon(invoker);
if ( !weap ) return;
if ( weap.bAltFire ) A_PlaySound("utrl/altfire",CHAN_WEAPON);
else A_PlaySound("utrl/fire",CHAN_WEAPON);
invoker.FireEffect();
UTMainHandler.DoFlash(self,Color(64,255,0,0),1);
A_AlertMonsters();
A_QuakeEx(2+num,2+num,2+num,6+num,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1+num*0.05);
// TODO
}
// lock-on check (TODO)
Actor CheckTarget()
{
return null;
}
Default
{
Tag "Rocket Launcher";
//Obituary "%o was smacked down by %k's Rocket Launcher.";
Inventory.PickupMessage "You got the Rocket Launcher.";
Weapon.UpSound "utrl/select";
Weapon.SlotNumber 9;
@ -94,23 +139,253 @@ Class UTRocketLauncher : UTWeapon
}
Wait;
Fire:
EBF1 ABCDEFGH 1;
EBF2 ABCDEFGHIJK 1;
EBF3 ABCDEFGHIJ 1;
EBF4 ABCDEFGHIJK 1;
EBF5 ABCDEFGHIJKLM 1;
EBF6 ABCDEFGHIJKLMNOP 1;
EBR1 ABCDEFG 1;
EBR2 ABCDEFG 1;
EBR3 ABCDEFG 1;
EBR4 ABCDEFG 1;
EBR5 ABCDEFG 1;
EBL1 ABCDEFG 1;
EBL2 ABCDEFG 1;
EBL3 ABCDEFG 1;
EBL4 ABCDEFG 1;
EBL5 ABCDEFG 1;
EBL6 ABCDEF 1;
AltFire:
// one is loaded already
EBLI A 3 A_LoadRocket();
EBLI A 0 A_LoadedRefire(1);
Goto FireOne;
// load two
EBLI A 2;
EBL1 A 0;
EBR1 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR1 B 0 A_Refire(1);
Goto FireOne;
EBR1 B 2;
EBR1 C 0 A_Refire(1);
Goto FireOne;
EBR1 C 2;
EBR1 D 0 A_Refire(1);
Goto FireOne;
EBR1 D 2;
EBR1 E 0 A_Refire(1);
Goto FireOne;
EBR1 E 2;
EBR1 F 0 A_Refire(1);
Goto FireOne;
EBR1 F 2;
EBR1 G 0 A_Refire(1);
Goto FireOne;
EBR1 G 2;
EBL2 A 0 A_Refire(1);
Goto FireOne;
EBL2 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL2 B 0 A_Refire(1);
Goto FireOne;
EBL2 B 3;
EBL2 C 0 A_Refire(1);
Goto FireOne;
EBL2 C 3;
EBL2 D 0 A_Refire(1);
Goto FireOne;
EBL2 D 3;
EBL2 E 0 A_Refire(1);
Goto FireOne;
EBL2 E 3;
EBL2 F 0 A_Refire(1);
Goto FireOne;
EBL2 F 3;
EBL2 G 0 A_Refire(1);
Goto FireOne;
EBL2 G 3 A_LoadRocket();
EBR2 A 0 A_LoadedRefire(1);
Goto FireTwo;
// load three
EBR2 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR2 B 0 A_Refire(1);
Goto FireTwo;
EBR2 B 2;
EBR2 C 0 A_Refire(1);
Goto FireTwo;
EBR2 C 2;
EBR2 D 0 A_Refire(1);
Goto FireTwo;
EBR2 D 2;
EBR2 E 0 A_Refire(1);
Goto FireTwo;
EBR2 E 2;
EBR2 F 0 A_Refire(1);
Goto FireTwo;
EBR2 F 2;
EBR2 G 0 A_Refire(1);
Goto FireTwo;
EBR2 G 2;
EBL3 A 0 A_Refire(1);
Goto FireTwo;
EBL3 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL3 B 0 A_Refire(1);
Goto FireTwo;
EBL3 B 3;
EBL3 C 0 A_Refire(1);
Goto FireTwo;
EBL3 C 3;
EBL3 D 0 A_Refire(1);
Goto FireTwo;
EBL3 D 3;
EBL3 E 0 A_Refire(1);
Goto FireTwo;
EBL3 E 3;
EBL3 F 0 A_Refire(1);
Goto FireTwo;
EBL3 F 3;
EBL3 G 0 A_Refire(1);
Goto FireTwo;
EBL3 G 3 A_LoadRocket();
EBR3 A 0 A_LoadedRefire(1);
Goto FireThree;
// load four
EBR3 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR3 B 0 A_Refire(1);
Goto FireThree;
EBR3 B 2;
EBR3 C 0 A_Refire(1);
Goto FireThree;
EBR3 C 2;
EBR3 D 0 A_Refire(1);
Goto FireThree;
EBR3 D 2;
EBR3 E 0 A_Refire(1);
Goto FireThree;
EBR3 E 2;
EBR3 F 0 A_Refire(1);
Goto FireThree;
EBR3 F 2;
EBR3 G 0 A_Refire(1);
Goto FireThree;
EBR3 G 2;
EBL4 A 0 A_Refire(1);
Goto FireThree;
EBL4 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL4 B 0 A_Refire(1);
Goto FireThree;
EBL4 B 3;
EBL4 C 0 A_Refire(1);
Goto FireThree;
EBL4 C 3;
EBL4 D 0 A_Refire(1);
Goto FireThree;
EBL4 D 3;
EBL4 E 0 A_Refire(1);
Goto FireThree;
EBL4 E 3;
EBL4 F 0 A_Refire(1);
Goto FireThree;
EBL4 F 3;
EBL4 G 0 A_Refire(1);
Goto FireThree;
EBL4 G 3 A_LoadRocket();
EBR4 A 0 A_LoadedRefire(1);
Goto FireFour;
// load five
EBR4 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR4 B 0 A_Refire(1);
Goto FireFour;
EBR4 B 2;
EBR4 C 0 A_Refire(1);
Goto FireFour;
EBR4 C 2;
EBR4 D 0 A_Refire(1);
Goto FireFour;
EBR4 D 2;
EBR4 E 0 A_Refire(1);
Goto FireFour;
EBR4 E 2;
EBR4 F 0 A_Refire(1);
Goto FireFour;
EBR4 F 2;
EBR4 G 0 A_Refire(1);
Goto FireFour;
EBR4 G 2;
EBL5 A 0 A_Refire(1);
Goto FireFour;
EBL5 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL5 B 0 A_Refire(1);
Goto FireFour;
EBL5 B 3;
EBL5 C 0 A_Refire(1);
Goto FireFour;
EBL5 C 3;
EBL5 D 0 A_Refire(1);
Goto FireFour;
EBL5 D 3;
EBL5 E 0 A_Refire(1);
Goto FireFour;
EBL5 E 3;
EBL5 F 0 A_Refire(1);
Goto FireFour;
EBL5 F 3;
EBL5 G 0 A_Refire(1);
Goto FireFour;
EBL5 G 3 A_LoadRocket();
EBR5 A 0 A_LoadedRefire(1);
Goto FireFive;
// load six
EBR5 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR5 B 0 A_Refire(1);
Goto FireFive;
EBR5 B 2;
EBR5 C 0 A_Refire(1);
Goto FireFive;
EBR5 C 2;
EBR5 D 0 A_Refire(1);
Goto FireFive;
EBR5 D 2;
EBR5 E 0 A_Refire(1);
Goto FireFive;
EBR5 E 2;
EBR5 F 0 A_Refire(1);
Goto FireFive;
EBR5 F 2;
EBR5 G 0 A_Refire(1);
Goto FireFive;
EBR5 G 2;
EBL6 A 0 A_Refire(1);
Goto FireFive;
EBL6 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL6 B 0 A_Refire(1);
Goto FireFive;
EBL6 B 3;
EBL6 C 0 A_Refire(1);
Goto FireFive;
EBL6 C 3;
EBL6 D 0 A_Refire(1);
Goto FireFive;
EBL6 D 3;
EBL6 E 0 A_Refire(1);
Goto FireFive;
EBL6 E 3;
EBL6 F 0 A_Refire(1);
Goto FireFive;
EBL6 F 3 A_LoadRocket();
Goto FireSix;
FireOne:
EBF1 A 0 A_FireRockets(1);
EBF1 ABCDEFGH 2;
EBLI A 2;
Goto Idle;
FireTwo:
EBF2 A 0 A_FireRockets(2);
EBF2 ABCDEFGHIJK 2;
EBLI A 2;
Goto Idle;
FireThree:
EBF3 A 0 A_FireRockets(3);
EBF3 ABCDEFGHIJ 2;
EBLI A 2;
Goto Idle;
FireFour:
EBF4 A 0 A_FireRockets(4);
EBF4 ABCDEFGHIJK 2;
EBLI A 2;
Goto Idle;
FireFive:
EBF5 A 0 A_FireRockets(5);
EBF5 ABCDEFGHIJKLM 2;
EBLI A 2;
Goto Idle;
FireSix:
EBF6 A 0 A_FireRockets(6);
EBF6 ABCDEFGHIJKLMNOP 2;
EBLI A 2;
Goto Idle;
Deselect:
EBLD ABCDEFGHIJK 1;

View file

@ -482,7 +482,7 @@ Class FlakCannon : UTWeapon
action void A_Loading( bool first = false )
{
if ( first ) A_PlaySound("flak/load",CHAN_WEAPON);
else A_PlaySound("flak/reload",CHAN_5);
else A_PlaySound("flak/reload",CHAN_6);
}
action void A_FireChunks()
{

View file

@ -105,7 +105,7 @@ Class Minigun : UTWeapon
invoker.bcnt = alt?3:5;
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
invoker.FireEffect();
UTMainHandler.DoFlash(self,Color(64,255,255,0),1);
UTMainHandler.DoFlash(self,Color(32,255,255,0),1);
A_AlertMonsters();
if ( alt ) A_QuakeEx(3,3,3,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.12);
else A_QuakeEx(2,2,2,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08);
@ -407,7 +407,8 @@ Class Minigun : UTWeapon
MGU2 ABCDEFGHIJKLM 1;
Goto Idle;
Deselect:
MGND ABCDEFGHIJ 2;
MGND A 2 A_StopSound(CHAN_WEAPON);
MGND BCDEFGHIJ 2;
MGND J 1 A_Lower(int.max);
Wait;
MuzzleFlash:

View file

@ -61,7 +61,7 @@ Class DamageAmplifier : Powerup
Default
{
Powerup.Duration -30;
Powerup.Duration -60;
Powerup.Color "EE00FF", 0.15;
}
@ -219,11 +219,6 @@ Class PowerUTInvisibility : PowerInvisibility
Super.EndEffect();
PrintPickupMessage(true,"Invisibility has worn off.");
}
override bool isBlinking()
{
// don't cause blinking, it bugs out models
return false;
}
}
Class UTInvisibility : PowerupGiver replaces BlurSphere
@ -347,6 +342,11 @@ Class UTJumpBoots : Inventory replaces RadSuit
Owner.TakeInventory("PowerJumpBoots_HighJump",1);
Owner.TakeInventory("PowerJumpBoots_IronFeet",1);
}
override void OwnerDied()
{
Super.OwnerDied();
DepleteOrDestroy();
}
States
{
Spawn:

View file

@ -197,7 +197,7 @@ Class PulseBoltCap : Actor
+NOGRAVITY;
+NOCLIP;
+DONTSPLASH;
Scale 0.25;
Scale 0.15;
}
States
{
@ -217,7 +217,7 @@ Class PulseBoltHit : Actor
+NOGRAVITY;
+NOCLIP;
+DONTSPLASH;
Scale 0.25;
Scale 0.15;
}
States
{
@ -293,8 +293,8 @@ Class PulseBolt : Actor
weffect.Destroy();
weffect = null;
}
if ( !weffect ) weffect = Spawn("PulseBoltHit",t.Results.HitPos);
else weffect.SetOrigin(t.Results.HitPos,true);
if ( !weffect ) weffect = Spawn("PulseBoltHit",t.Results.HitPos-t.Results.HitVector);
else weffect.SetOrigin(t.Results.HitPos-t.Results.HitVector,true);
A_SprayDecal("BoltScorch",beamsize+8);
if ( next )
{
@ -325,8 +325,8 @@ Class PulseBolt : Actor
weffect.Destroy();
weffect = null;
}
if ( !weffect ) weffect = Spawn("PulseBoltCap",t.Results.HitPos);
else weffect.SetOrigin(t.Results.HitPos,true);
if ( !weffect ) weffect = Spawn("PulseBoltCap",t.Results.HitPos-t.Results.HitVector);
else weffect.SetOrigin(t.Results.HitPos-t.Results.HitVector,true);
}
else
{
@ -350,8 +350,8 @@ Class PulseBolt : Actor
{
frame = parent.frame;
SetOrigin(parent.Vec3Offset(x.x*beamsize,x.y*beamsize,x.z*beamsize),true);
A_SetAngle(parent.angle,SPF_INTERPOLATE);
A_SetPitch(parent.pitch,SPF_INTERPOLATE);
A_SetAngle(parent.angle);
A_SetPitch(parent.pitch);
CheckBeam(x);
}
Default
@ -363,6 +363,7 @@ Class PulseBolt : Actor
+NOGRAVITY;
+NOCLIP;
+DONTSPLASH;
+INTERPOLATEANGLES;
}
States
{
@ -390,12 +391,12 @@ Class StarterBolt : PulseBolt
if ( target.player )
{
[x, y, z] = Matrix4.GetAxes(target.pitch,target.angle,target.roll);
origin = (0,0,target.player.viewz-target.pos.z)+5.0*x+3.0*y-1.5*z;
origin = (0,0,target.player.viewz-target.pos.z)+5.0*x+3.0*y-1.0*z;
}
else origin = (0,0,target.missileheight);
SetOrigin(target.Vec3Offset(origin.x,origin.y,origin.z),true);
A_SetAngle(target.angle,SPF_INTERPOLATE);
A_SetPitch(target.BulletSlope(),SPF_INTERPOLATE);
A_SetAngle(target.angle);
A_SetPitch(target.BulletSlope());
frame++;
if ( frame > 4 ) frame = 0;
CheckBeam(x);
@ -436,7 +437,7 @@ Class PulseGun : UTWeapon
A_AlertMonsters();
Vector3 x, y, z;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+4.5*y-2.4*z;
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+4.5*y-1.9*z;
int numpt = Random[Pulse](2,5);
for ( int i=0; i<numpt; i++ )
{
@ -476,7 +477,7 @@ Class PulseGun : UTWeapon
Vector3 x, y, z;
double a;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+4.0*y-2.0*z;
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+4.0*y-1.5*z;
origin += y*cos(invoker.sangle)*2.0+z*sin(invoker.sangle)*2.0;
invoker.sangle += 100;
Actor p = Spawn("PulseBall",origin);
@ -503,6 +504,11 @@ Class PulseGun : UTWeapon
A_StopSound(CHAN_WEAPON);
if ( invoker.beam ) invoker.beam.Destroy();
}
override void OwnerDied()
{
Super.OwnerDied();
if ( beam ) beam.Destroy();
}
Default
{
Tag "Pulse Gun";

View file

@ -120,12 +120,13 @@ Class TranslocatorModule : Actor
{
Radius 2;
Height 2;
Speed 20;
Speed 25;
PROJECTILE;
-NOGRAVITY;
+USEBOUNCESTATE;
+SKYEXPLODE;
+HITTRACER;
+MOVEWITHSECTOR;
BounceType "Doom";
BounceFactor 0.5;
WallBounceFactor 0.5;
@ -287,8 +288,9 @@ Class Translocator : UTWeapon
p.target = self;
p.angle = angle;
p.pitch = BulletSlope();
p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*p.speed;
p.vel.z += 5;
Vector3 dir = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch));
dir.z += 0.35*(1-abs(dir.z));
p.vel = dir*p.speed;
invoker.module = p;
}