Fix friendly fire blocking self-damage.

This commit is contained in:
Mari the Deer 2022-08-17 19:03:19 +02:00
commit a87c249bc0
2 changed files with 3 additions and 3 deletions

View file

@ -33,7 +33,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.IsFriend(Owner) || !ff ) return;
if ( !source || (source == Owner) || !source.IsFriend(Owner) || !ff ) return;
// 1: block incoming friendly damage
// 2: also block outgoing friendly damage
if ( (passive && ff) || (!passive && (ff == 2)) )