--- a/hedgewars/CCHandlers.inc Wed Sep 13 19:26:16 2006 +0000
+++ b/hedgewars/CCHandlers.inc Thu Sep 14 17:20:50 2006 +0000
@@ -47,8 +47,15 @@
end;
procedure chAddTeam(var s: shortstring);
+const TeamsCount: Longword = 0;
begin
-if isDeveloperMode then AddTeam;
+if isDeveloperMode then
+ begin
+ inc(TeamsCount);
+ TryDo(TeamsCount <= 5, 'Too many teams', true);
+ AddTeam
+ end;
+
if GameType in [gmtDemo, gmtSave] then CurrentTeam.ExtDriven:= true
end;
--- a/hedgewars/uGears.pas Wed Sep 13 19:26:16 2006 +0000
+++ b/hedgewars/uGears.pas Thu Sep 14 17:20:50 2006 +0000
@@ -79,7 +79,7 @@
implementation
uses uWorld, uMisc, uStore, uConsole, uSound, uTeams, uRandom, uCollisions,
- uLand, uIO, uLandGraphics, uAIMisc, uLocale;
+ uLand, uIO, uLandGraphics, uAIMisc, uLocale, uAI;
var RopePoints: record
Count: Longword;
HookAngle: integer;
@@ -207,7 +207,7 @@
end;
gtCase: begin
Result.Radius:= 16;
- Result.Elasticity:= 0.6
+ Result.Elasticity:= 0.4
end;
gtDEagleShot: begin
Result.Radius:= 1;
@@ -263,6 +263,8 @@
begin
team:= PHedgehog(Gear.Hedgehog).Team;
PHedgehog(Gear.Hedgehog).Gear:= nil;
+ if CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog].Gear = Gear then
+ FreeActionsList; // to avoid ThinkThread on drawned gear
RecountTeamHealth(team);
end;
{$IFDEF DEBUGFILE}AddFileLog('DeleteGear: handle = '+inttostr(integer(Gear)));{$ENDIF}