Additional branding changes.

This commit is contained in:
Mari the Deer 2022-01-15 15:37:19 +01:00
commit be1f1d083f
16 changed files with 196 additions and 37 deletions

View file

@ -213,7 +213,7 @@ extend Class SWWMHandler
return;
}
// dump the values of all mod RNGs (might help someday to track down what desyncs)
String msg = String.Format("\cxSWWM GZ RNG dump for player %d (\c-%s\cx):\c-",consoleplayer,players[consoleplayer].GetUserName());
String msg = String.Format("\cxRNG dump for player %d (\c-%s\cx):\c-",consoleplayer,players[consoleplayer].GetUserName());
msg.AppendFormat("\n\n\cfPlay RNG (will cause desyncs if mismatched):\c-\n");
msg.AppendFormat("\nBlood: %08x",Random2[Blood]());
msg.AppendFormat("\nBoolet: %08x",Random2[Boolet]());
@ -336,20 +336,26 @@ extend Class SWWMHandler
// drop the swapweapon if we own it first
if ( swwm_swapweapons && (item is 'SWWMWeapon') && (sw = SWWMWeapon(def).HasSwapWeapon(players[e.Args[0]].mo)) )
{
// special case, otherwise candy gun won't drop itself
if ( sw is 'CandyGun' ) CandyGun(sw).swapdrop = true;
bool swapto = (sw == players[e.Args[0]].ReadyWeapon) || (sw.SisterWeapon && (sw.Sisterweapon == players[e.Args[0]].ReadyWeapon));
int ngun = sw.Amount;
double ang = -15*(ngun-1);
for ( int i=0; i<ngun; i++ )
if ( ngun == 2 )
{
let d = players[e.Args[0]].mo.DropInventory(sw);
if ( !d || (ngun <= 1) ) continue;
// adjust angle for multi-drops
d.angle = players[e.Args[0]].mo.angle+ang;
d.vel.xy = Actor.RotateVector((5,0),d.angle);
d.vel.z = 1;
d.vel += players[e.Args[0]].mo.vel;
ang += 30;
// create a dual giver to drop
let dg = SWWMDualWeaponGiver(Spawn("SWWMDualWeaponGiver",players[e.Args[0]].mo.pos+(0,0,10)));
dg.angle = players[e.Args[0]].mo.angle;
dg.VelFromAngle(5.);
dg.vel.z += 1.
dg.vel += players[e.Args[0]].mo.vel;
// transfer both guns
dg.giveme[0] = SWWMWeapon(sw.CreateTossable(1));
dg.giveme[0].AttachToOwner(dg);
dg.giveme[1] = SWWMWeapon(sw.CreateTossable(1));
dg.giveme[1].AttachToOwner(dg);
dg.SetPickupState();
}
else user.DropInventory(sw); // just drop it
// don't autoswitch just yet (hacky)
if ( swapto )
{
@ -543,7 +549,7 @@ extend Class SWWMHandler
{
t.result = (players[e.Args[0]].PendingWeapon==Weapon(i));
// dual wield gun support
if ( (i is 'ExplodiumGun') && (players[e.Args[0]].PendingWeapon==Weapon(i).SisterWeapon) )
if ( (i is 'SWWMWeapon') && (players[e.Args[0]].PendingWeapon==Weapon(i).SisterWeapon) )
t.result = true;
}
else t.result = rslt;