Voodoo dolls are annoying.
This commit is contained in:
parent
ccf8226f9e
commit
8833db9591
7 changed files with 31 additions and 11 deletions
|
|
@ -117,6 +117,7 @@ extend Class SWWMHandler
|
|||
// combat hit chatter
|
||||
private void DoCombatHit( WorldEvent e )
|
||||
{
|
||||
if ( (e.DamageSource is 'SWWMVoodooDoll') || (e.Thing is 'SWWMVoodooDoll') ) return;
|
||||
if ( (e.DamageSource.bISMONSTER || e.DamageSource.player || (e.DamageSource is 'ScriptedMarine')) && (e.Thing == players[consoleplayer].mo) && (e.Thing.Health > 0) )
|
||||
{
|
||||
if ( !lastcombat || (gametic > lastcombat+20) )
|
||||
|
|
@ -160,7 +161,7 @@ extend Class SWWMHandler
|
|||
s.kills++;
|
||||
s.AddWeaponKill(inflictor,e.Thing,e.DamageType);
|
||||
}
|
||||
if ( src == players[consoleplayer].mo )
|
||||
if ( (src == players[consoleplayer].mo) && !(e.Thing is 'SWWMVoodooDoll') )
|
||||
{
|
||||
highesttic = gametic;
|
||||
if ( !lastcombat || (gametic > lastcombat+20) )
|
||||
|
|
|
|||
|
|
@ -1491,10 +1491,10 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
}
|
||||
// ignore unowned (can happen?)
|
||||
if ( !ct.Owner ) continue;
|
||||
// ignore player trackers
|
||||
if ( ct.Owner.player ) continue;
|
||||
// ignore player trackers unless voodoo dolls
|
||||
if ( ct.Owner.player && (ct.Owner.player.mo == ct.Owner) ) continue;
|
||||
// ignore local player or camera
|
||||
if ( (ct.Owner.player == CPlayer) || (ct.Owner == cam) ) continue;
|
||||
if ( (ct.Owner == CPlayer.mo) || (ct.Owner == cam) ) continue;
|
||||
// ignore trackers not of this player
|
||||
if ( ct.myplayer != CPlayer ) continue;
|
||||
// ignore trackers clearly outside of player view
|
||||
|
|
@ -1523,7 +1523,8 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
if ( swwm_bigtags ) tag = "\cx★\c- "..tag.." \cx★\c-";
|
||||
else tag = "\cx*\c- "..tag.." \cx*\c-"; // miniwi has no stars
|
||||
}
|
||||
if ( ct.Owner.IsFriend(CPlayer.mo) ) tag = "\cg♥\c- "..tag.." \cg♥\c-";
|
||||
// voodoo dolls aren't friends
|
||||
if ( ct.Owner.IsFriend(CPlayer.mo) && !ct.Owner.player ) tag = "\cg♥\c- "..tag.." \cg♥\c-";
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,vpos.x-fnt.StringWidth(tag)/2,barpos.y-(fnt.GetHeight()+2),tag,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
}
|
||||
Screen.DrawTexture(EnemyBTex,false,barpos.x,barpos.y,DTA_VirtualWidthF,ss1.x,DTA_VirtualHeightF,ss1.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
|
|
@ -1554,10 +1555,10 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
}
|
||||
// ignore unowned (can happen?)
|
||||
if ( !ct.Owner ) continue;
|
||||
// ignore non-player trackers
|
||||
if ( !ct.Owner.player ) continue;
|
||||
// ignore non-player trackers and voodoo dolls
|
||||
if ( !ct.Owner.player || (ct.Owner.player.mo != ct.Owner) ) continue;
|
||||
// ignore local player or camera
|
||||
if ( (ct.Owner.player == CPlayer) || (ct.Owner == cam) ) continue;
|
||||
if ( (ct.Owner == CPlayer.mo) || (ct.Owner == cam) ) continue;
|
||||
// ignore trackers not of this player
|
||||
if ( ct.myplayer != CPlayer ) continue;
|
||||
// ignore trackers clearly outside of player view
|
||||
|
|
|
|||
|
|
@ -231,6 +231,22 @@ Class SWWMQuickCombatTracker : Inventory
|
|||
else mytag = "";
|
||||
}
|
||||
|
||||
override void AttachToOwner( Actor other )
|
||||
{
|
||||
// GROSS HACK TO ATTACH TO VOODOO DOLLS
|
||||
if ( other.player && (other.player.mo != other) )
|
||||
{
|
||||
BecomeItem();
|
||||
Owner = other;
|
||||
inv = Owner.inv;
|
||||
Owner.inv = self;
|
||||
// we unfortunately can't access this, but hopefully it shouldn't be necessary
|
||||
//InventoryID = Owner.InventoryID++;
|
||||
return;
|
||||
}
|
||||
Super.AttachToOwner(other);
|
||||
}
|
||||
|
||||
static SWWMQuickCombatTracker Update( SWWMHandler hnd, PlayerInfo p, Actor target, int damage = 0 )
|
||||
{
|
||||
// no-damage entities get no healthbars
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ Class Demolitionist : PlayerPawn
|
|||
+NOBLOOD;
|
||||
+DONTGIB;
|
||||
+NOICEDEATH;
|
||||
+NOSKIN;
|
||||
+DONTMORPH;
|
||||
+DONTDRAIN;
|
||||
+DONTCORPSE;
|
||||
|
|
@ -4005,6 +4006,7 @@ Class SWWMVoodooDoll : PlayerPawn
|
|||
+DONTGIB;
|
||||
+NOICEDEATH;
|
||||
+DONTCORPSE;
|
||||
+NOSKIN;
|
||||
-FRIENDLY;
|
||||
}
|
||||
States
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ Class SayaCollar : SWWMArmor
|
|||
override void ModifyDamage( int damage, Name damageType, out int newdamage, bool passive, Actor inflictor, Actor source, int flags )
|
||||
{
|
||||
int ff = swwm_friendlyfire;
|
||||
if ( !source || (source == Owner) || !source.IsFriend(Owner) || !ff ) return;
|
||||
if ( !source || (source == Owner) || (source.player == Owner.player) || !source.IsFriend(Owner) || !ff ) return;
|
||||
// 1: block incoming friendly damage
|
||||
// 2: also block outgoing friendly damage
|
||||
if ( (passive && ff) || (!passive && (ff == 2)) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue