Missing Plasma Blaster collision sizes.

This commit is contained in:
Mari the Deer 2022-10-20 20:27:20 +02:00
commit 2f00137a30
3 changed files with 36 additions and 2 deletions

View file

@ -23,6 +23,8 @@ Class PlasmaBlast : SWWMWeapon
PlasmaBlast.ClipCount 8;
+WEAPON.EXPLOSIVE;
+SWWMWEAPON.HASSCRTEX;
Radius 10;
Height 24;
}
States
{

View file

@ -67,6 +67,38 @@ extend Class SWWMHandler
if ( mo ) mo.bWalking = e.Args[0];
return;
}
else if ( e.Name ~== "swwmsetradius" )
{
if ( multiplayer && (e.player != Net_Arbitrator) )
{
if ( e.player == consoleplayer )
Console.Printf("Only the net arbitrator can call this event.");
return;
}
let mo = players[e.player].mo;
if ( !mo ) return;
FLineTraceData d;
mo.LineTrace(mo.angle,10000.,mo.pitch,TRF_ABSPOSITION|TRF_THRUBLOCK|TRF_THRUHITSCAN|TRF_ALLACTORS,mo.player.viewz,mo.pos.x,mo.pos.y,d);
if ( d.HitType != TRACE_HitActor ) return;
Console.Printf("Change %s radius from %g to %g.",d.HitActor.GetTag(),d.HitActor.radius,e.Args[0]);
d.HitActor.A_SetSize(e.Args[0],-1);
}
else if ( e.Name ~== "swwmsetheight" )
{
if ( multiplayer && (e.player != Net_Arbitrator) )
{
if ( e.player == consoleplayer )
Console.Printf("Only the net arbitrator can call this event.");
return;
}
let mo = players[e.player].mo;
if ( !mo ) return;
FLineTraceData d;
mo.LineTrace(mo.angle,10000.,mo.pitch,TRF_ABSPOSITION|TRF_THRUBLOCK|TRF_THRUHITSCAN|TRF_ALLACTORS,mo.player.viewz,mo.pos.x,mo.pos.y,d);
if ( d.HitType != TRACE_HitActor ) return;
Console.Printf("Change %s height from %g to %g.",d.HitActor.GetTag(),d.HitActor.height,e.Args[0]);
d.HitActor.A_SetSize(-1,e.Args[0]);
}
else if ( e.Name ~== "swwmfixitemcaps" )
{
// this command is only really needed when I update item max amounts mid-playthrough