Unknown asset attacker fix

This commit is contained in:
ChocoTaco1 2020-03-26 12:52:12 -04:00
parent 7ae6d57a4e
commit 9746621ea3
2 changed files with 18 additions and 8 deletions

View file

@ -1556,10 +1556,15 @@ function CTFGame::awardScoreStaticShapeDestroy(%game, %cl, %obj)
default: default:
return; return;
} }
if(isObject(%cl))
{
teamDestroyMessage(%cl, 'MsgDestroyed', %tMsg, %cl.name, %obj.nameTag); teamDestroyMessage(%cl, 'MsgDestroyed', %tMsg, %cl.name, %obj.nameTag);
messageClient(%cl, %msgType, %clMsg, %value, %dataName); messageClient(%cl, %msgType, %clMsg, %value, %dataName);
%game.recalcScore(%cl); %game.recalcScore(%cl);
%game.shareScore(%scorer, %value); %game.shareScore(%scorer, %value);
}
else //when the asset attacker is unknown
teamDestroyMessage(%cl, 'MsgDestroyed', %tMsg, "A teammate", %obj.nameTag);
} }
///////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////

View file

@ -1741,10 +1741,15 @@ function SCtFGame::awardScoreStaticShapeDestroy(%game, %cl, %obj)
default: default:
return; return;
} }
if(isObject(%cl))
{
teamDestroyMessage(%cl, 'MsgDestroyed', %tMsg, %cl.name, %obj.nameTag); teamDestroyMessage(%cl, 'MsgDestroyed', %tMsg, %cl.name, %obj.nameTag);
messageClient(%cl, %msgType, %clMsg, %value, %dataName); messageClient(%cl, %msgType, %clMsg, %value, %dataName);
%game.recalcScore(%cl); %game.recalcScore(%cl);
%game.shareScore(%scorer, %value); %game.shareScore(%scorer, %value);
}
else //when the asset attacker is unknown
teamDestroyMessage(%cl, 'MsgDestroyed', %tMsg, "A teammate", %obj.nameTag);
} }
///////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////