Smol things.
This commit is contained in:
parent
1b01b611cb
commit
5755ed1319
3 changed files with 20 additions and 14 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r329 \cu(Sun 7 Mar 13:51:24 CET 2021)\c-";
|
||||
SWWM_SHORTVER="\cw0.9.11b-pre r329 \cu(2021-03-07 13:51:24)\c-";
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r329 \cu(Sun 7 Mar 17:37:55 CET 2021)\c-";
|
||||
SWWM_SHORTVER="\cw0.9.11b-pre r329 \cu(2021-03-07 17:37:55)\c-";
|
||||
|
|
|
|||
|
|
@ -1606,9 +1606,9 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
}
|
||||
}
|
||||
|
||||
private void DrawInvIcon( Inventory i, double xx, double yy, double alpha = 1., bool forceamt = false, bool aspowerup = false )
|
||||
private bool DrawInvIcon( Inventory i, double xx, double yy, double alpha = 1., bool forceamt = false, bool aspowerup = false )
|
||||
{
|
||||
if ( !i || !i.Icon.IsValid() ) return;
|
||||
if ( !i || !i.Icon.IsValid() ) return false;
|
||||
Vector2 scl = TexMan.GetScaledSize(i.Icon);
|
||||
double mscl = min(1.,30./max(scl.x,scl.y));
|
||||
double dw = (ss.x/mscl), dh = (ss.y/mscl);
|
||||
|
|
@ -1619,7 +1619,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
String nstr = String.Format("%ds",Powerup(i).EffectTics/GameTicRate);
|
||||
int len = mTewiFont.mFont.StringWidth(nstr);
|
||||
Screen.DrawText(mTewiFont.mFont,Font.CR_FIRE,(xx+30)-len,(yy+30)-11,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,Powerup(i).IsBlinking()?alpha*.5:alpha);
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
if ( (i is 'SWWMLamp') && aspowerup )
|
||||
{
|
||||
|
|
@ -1627,7 +1627,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
String nstr = String.Format("%d%%",SWWMLamp(i).Charge);
|
||||
int len = mTewiFont.mFont.StringWidth(nstr);
|
||||
Screen.DrawText(mTewiFont.mFont,Font.CR_FIRE,(xx+30)-len,(yy+30)-11,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,SWWMLamp(i).isBlinking()?alpha*.5:alpha);
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
Screen.DrawTexture(i.Icon,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_TopOffset,0,DTA_LeftOffset,0);
|
||||
if ( (i.Amount > 1) || forceamt )
|
||||
|
|
@ -1638,6 +1638,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
int len = mTewiFont.mFont.StringWidth(nstr);
|
||||
Screen.DrawText(mTewiFont.mFont,Font.CR_FIRE,(xx+30)-len,(yy+30)-11,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alpha);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void DrawInventory()
|
||||
|
|
@ -1650,7 +1651,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
for ( Inventory i=CPlayer.mo.Inv; i; i=i.Inv )
|
||||
{
|
||||
if ( (i.Amount <= 0) || (!(i is 'SWWMArmor') && !(i is 'BasicArmor')) ) continue;
|
||||
DrawInvIcon(i,xx,yy,forceamt:true);
|
||||
if ( !DrawInvIcon(i,xx,yy,forceamt:true) ) continue;
|
||||
yy -= 34;
|
||||
drewarmor = true;
|
||||
}
|
||||
|
|
@ -1666,8 +1667,8 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
continue;
|
||||
}
|
||||
if ( !(i is 'Powerup') || (Powerup(i).EffectTics <= 0) || !(Powerup(i).Icon) ) continue;
|
||||
DrawInvIcon(i,xx,yy);
|
||||
yy -= 34;
|
||||
if ( DrawInvIcon(i,xx,yy) )
|
||||
yy -= 34;
|
||||
}
|
||||
// inventory box / bar
|
||||
if ( !CPlayer.mo.InvSel ) return;
|
||||
|
|
@ -1774,7 +1775,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
// for SWWM weapons I made a function for this at least
|
||||
if ( (inv is 'SWWMWeapon') && SWWMWeapon(inv).ReportHUDAmmo() )
|
||||
hasammo = true;
|
||||
else if ( !(inv is 'SWWMWeapon') && ((!Weapon(inv).Ammo1 || (Weapon(inv).Ammo1.Amount > 0)) || (Weapon(inv).Ammo2 && (Weapon(inv).Ammo2.Amount > 0))) )
|
||||
else if ( !(inv is 'SWWMWeapon') && ((!Weapon(inv).Ammo1 || (Weapon(inv).Ammo1.Amount > 0) || Weapon(inv).bAMMO_OPTIONAL) || (Weapon(inv).Ammo2 && ((Weapon(inv).Ammo2.Amount > 0) || Weapon(inv).bALT_AMMO_OPTIONAL))) )
|
||||
hasammo = true;
|
||||
}
|
||||
if ( !hasammo ) ncolor = Font.CR_RED;
|
||||
|
|
|
|||
|
|
@ -129,6 +129,8 @@ Class ParryField : Actor
|
|||
[x, y, z] = swwm_CoordUtil.GetAxes(master.pitch,master.angle,master.roll);
|
||||
origin = level.Vec3Offset(master.Vec2OffsetZ(0,0,master.player.viewz),x*20);
|
||||
SetOrigin(origin,false);
|
||||
let raging = RagekitPower(master.FindInventory("RagekitPower"));
|
||||
let s = Demolitionist(master).mystats;
|
||||
// check for projectiles to deflect
|
||||
let ti = ThinkerIterator.Create("Actor");
|
||||
Actor a;
|
||||
|
|
@ -152,13 +154,16 @@ Class ParryField : Actor
|
|||
a.target = master;
|
||||
}
|
||||
if ( a.bSKULLFLY ) a.bBLASTED = true; // blast lost souls
|
||||
a.GiveInventory("ParriedBuff",1);
|
||||
let buff = a.FindInventory("ParriedBuff");
|
||||
if ( !buff )
|
||||
{
|
||||
buff = Inventory(Spawn("ParriedBuff"));
|
||||
buff.AttachToOwner(a);
|
||||
}
|
||||
double mvel = a.vel.length();
|
||||
double nspeed = min(100,mvel*FRandom[Parry](1.2,1.4)+20);
|
||||
a.angle = atan2(dir.y,dir.x);
|
||||
a.pitch = asin(-dir.z);
|
||||
let raging = RagekitPower(master.FindInventory("RagekitPower"));
|
||||
if ( raging )
|
||||
{
|
||||
buff.special1 = 2;
|
||||
|
|
@ -174,7 +179,6 @@ Class ParryField : Actor
|
|||
i.bAMBUSH = true;
|
||||
A_QuakeEx(3,3,3,10,0,64,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:.2);
|
||||
A_StartSound("demolitionist/parry",CHAN_WEAPON);
|
||||
let s = Demolitionist(master).mystats;
|
||||
if ( special1 >= special2 ) // perfect parry
|
||||
{
|
||||
// increased homing
|
||||
|
|
@ -362,6 +366,8 @@ extend Class SWWMWeapon
|
|||
}
|
||||
action void A_Melee( int dmg = 40, String hitsound = "", double rangemul = 1. )
|
||||
{
|
||||
let raging = RagekitPower(FindInventory("RagekitPower"));
|
||||
if ( raging ) rangemul += .2;
|
||||
Vector3 origin = Vec3Offset(0,0,player.viewheight);
|
||||
Vector3 dir = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),sin(-pitch));
|
||||
// check for usables
|
||||
|
|
@ -390,7 +396,6 @@ extend Class SWWMWeapon
|
|||
invoker.wallponch = false;
|
||||
// check for shootables
|
||||
SWWMBulletTrail.DoTrail(self,origin,dir,DEFMELEERANGE*rangemul,0);
|
||||
let raging = RagekitPower(FindInventory("RagekitPower"));
|
||||
int maxang = raging?18:12;
|
||||
for ( int i=0; i<maxang; i++ )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue