hedgewars/uGearsUtils.pas
changeset 11852 38e7206a5df4
parent 11827 4600dcb9db4f
child 11853 6a0d6b00dac8
--- a/hedgewars/uGearsUtils.pas	Thu Sep 15 23:16:49 2016 +0200
+++ b/hedgewars/uGearsUtils.pas	Fri Sep 16 00:01:43 2016 +0200
@@ -57,6 +57,7 @@
 
 function WorldWrap(var Gear: PGear): boolean;
 
+function IsHogLocal(HH: PHedgehog): boolean;
 
 
 function MakeHedgehogsStep(Gear: PGear) : boolean;
@@ -1589,4 +1590,9 @@
     PlaySound(sndMelonImpact, true)
 end;
 
+function IsHogLocal(HH: PHedgehog): boolean;
+begin
+    IsHogLocal:= (not (HH^.Team^.ExtDriven or (HH^.BotLevel > 0))) or (HH^.Team^.Clan^.ClanIndex = LocalClan);
+end;
+
 end.