mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 13:04:10 +00:00
petra: cancel guard assignation when relic lost
This was SVN commit r21697.
This commit is contained in:
@@ -494,6 +494,13 @@ m.GameTypeManager.prototype.assignGuardToCriticalEnt = function(gameState, guard
|
||||
if (guardEnt.getMetadata(PlayerID, "transport") !== undefined || !guardEnt.canGuard())
|
||||
return false;
|
||||
|
||||
if (criticalEntId && !this.criticalEnts.get(criticalEntId))
|
||||
{
|
||||
criticalEntId = undefined;
|
||||
if (guardEnt.getMetadata(PlayerID, "guardedEnt"))
|
||||
guardEnt.setMetadata(PlayerID, "guardedEnt", undefined);
|
||||
}
|
||||
|
||||
if (!criticalEntId)
|
||||
{
|
||||
let isHealer = guardEnt.hasClass("Healer");
|
||||
|
||||
Reference in New Issue
Block a user