don't decrement 0 timer for air mines...
--- a/hedgewars/uGearsHandlersMess.pas Thu May 21 18:21:55 2015 +0900
+++ b/hedgewars/uGearsHandlersMess.pas Fri May 22 13:39:12 2015 -0400
@@ -1929,7 +1929,8 @@
Gear^.State:= Gear^.State and (not gstAttacking);
Gear^.Timer:= Gear^.WDTimer
end;
- dec(Gear^.Timer);
+ if Gear^.Timer > 0 then
+ dec(Gear^.Timer);
end
end
else // gsttmpFlag = 0
--- a/hedgewars/uRender.pas Thu May 21 18:21:55 2015 +0900
+++ b/hedgewars/uRender.pas Fri May 22 13:39:12 2015 -0400
@@ -469,7 +469,7 @@
tmpint := 1;
repeat
- begin
+ begin
// print up to 3 extentions per row
// ExtractWord will return empty string if index out of range
AddFileLog(TrimRight(
@@ -478,7 +478,7 @@
ExtractWord(tmpint+2, tmpstr, [' '])
));
tmpint := tmpint + 3;
- end;
+ end;
until (tmpint > tmpn);
{$ENDIF}
AddFileLog('');
@@ -487,26 +487,26 @@
{$IFDEF USE_VIDEO_RECORDING}
if GameType = gmtRecord then
- begin
+ begin
if glLoadExtension('GL_EXT_framebuffer_object') then
- begin
+ begin
CreateFramebuffer(defaultFrame, depthv, texv);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, defaultFrame);
AddFileLog('Using framebuffer for video recording.');
- end
+ end
else if AuxBufNum > 0 then
- begin
+ begin
glDrawBuffer(GL_AUX0);
glReadBuffer(GL_AUX0);
AddFileLog('Using auxiliary buffer for video recording.');
- end
+ end
else
- begin
+ begin
glDrawBuffer(GL_BACK);
glReadBuffer(GL_BACK);
AddFileLog('Warning: off-screen rendering is not supported; using back buffer but it may not work.');
+ end;
end;
- end;
{$ENDIF}
{$IFDEF GL2}
@@ -514,10 +514,10 @@
{$IFDEF PAS2C}
err := glewInit();
if err <> GLEW_OK then
- begin
+ begin
WriteLnToConsole('Failed to initialize GLEW.');
halt(HaltStartupError);
- end;
+ end;
{$ENDIF}
{$IFNDEF PAS2C}
@@ -544,7 +544,7 @@
{$IFDEF USE_S3D_RENDERING}
if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) then
- begin
+ begin
// prepare left and right frame buffers and associated textures
if glLoadExtension('GL_EXT_framebuffer_object') then
begin
@@ -559,7 +559,7 @@
end
else
cStereoMode:= smNone;
- end;
+ end;
// set up vertex/texture buffers for frame textures
texLRDtb[0].X:= 0.0;