--- a/CMakeLists.txt Mon Nov 04 01:23:20 2013 +0400
+++ b/CMakeLists.txt Sun Nov 03 22:53:37 2013 +0100
@@ -72,13 +72,13 @@
include(${CMAKE_MODULE_PATH}/compilerchecks.cmake)
#set default compiler flags
-add_flag_append(CMAKE_C_FLAGS "-Wall -pipe -fPIC")
+add_flag_append(CMAKE_C_FLAGS "-Wall -pipe")
add_flag_append(CMAKE_C_FLAGS_RELEASE "-Os")
add_flag_append(CMAKE_C_FLAGS_DEBUG "-Wextra -O0")
-add_flag_append(CMAKE_CXX_FLAGS "-Wall -pipe -fPIC")
+add_flag_append(CMAKE_CXX_FLAGS "-Wall -pipe")
add_flag_append(CMAKE_CXX_FLAGS_RELEASE "-Os")
add_flag_append(CMAKE_CXX_FLAGS_DEBUG "-Wextra -O0")
-add_flag_append(CMAKE_Pascal_FLAGS "-Cs2000000 -fPIC")
+add_flag_append(CMAKE_Pascal_FLAGS "-Cs2000000")
add_flag_append(CMAKE_Pascal_FLAGS_DEBUG "-O- -gv")
add_flag_append(CMAKE_Pascal_FLAGS_RELEASE "-Os -Xs")
--- a/cmake_modules/platform.cmake Mon Nov 04 01:23:20 2013 +0400
+++ b/cmake_modules/platform.cmake Sun Nov 03 22:53:37 2013 +0100
@@ -110,3 +110,9 @@
message(FATAL_ERROR "Static linking is not supported on Windows")
endif()
endif(WIN32)
+
+if(UNIX)
+ add_flag_append(CMAKE_C_FLAGS "-fPIC")
+ add_flag_append(CMAKE_CXX_FLAGS "-fPIC")
+ add_flag_append(CMAKE_Pascal_FLAGS "-fPIC")
+endif(UNIX)
--- a/hedgewars/uGears.pas Mon Nov 04 01:23:20 2013 +0400
+++ b/hedgewars/uGears.pas Sun Nov 03 22:53:37 2013 +0100
@@ -167,7 +167,9 @@
var t: PGear;
i, AliveCount: LongInt;
s: shortstring;
+ prevtime: LongWord;
begin
+prevtime:= TurnTimeLeft;
ScriptCall('onGameTick');
if GameTicks mod 20 = 0 then ScriptCall('onGameTick20');
if GameTicks = NewTurnTick then
@@ -463,7 +465,7 @@
inc(hiTicks) // we do not recieve a message for this
end;
AddRandomness(CheckSum);
-
+TurnClockActive:= prevtime <> TurnTimeLeft;
inc(GameTicks)
end;
--- a/hedgewars/uGearsHedgehog.pas Mon Nov 04 01:23:20 2013 +0400
+++ b/hedgewars/uGearsHedgehog.pas Sun Nov 03 22:53:37 2013 +0100
@@ -1266,7 +1266,7 @@
if (Gear^.Message and (gmAllStoppable or gmLJump or gmHJump) = 0)
and (Gear^.State and (gstHHJumping or gstHHHJump or gstAttacking) = 0)
and ((Gear^.Hedgehog = nil) or ((Gear^.Hedgehog^.Effects[heFrozen] = 0) or (Gear^.Hedgehog^.Effects[heFrozen] > 255)))
- and (not Gear^.dY.isNegative) and (TurnTimeLeft > 0) and (TestCollisionYwithGear(Gear, 1) and lfIce <> 0) then
+ and (not Gear^.dY.isNegative) and TurnClockActive and (TestCollisionYwithGear(Gear, 1) and lfIce <> 0) then
begin
slope:= CalcSlopeBelowGear(Gear);
if slope.QWordValue > 730144440 then // ignore mild slopes
--- a/hedgewars/uVariables.pas Mon Nov 04 01:23:20 2013 +0400
+++ b/hedgewars/uVariables.pas Sun Nov 03 22:53:37 2013 +0100
@@ -87,6 +87,7 @@
LeftImpactTimer : LongWord;
RightImpactTimer: LongWord;
TurnTimeLeft : Longword;
+ TurnClockActive : boolean;
TagTurnTimeLeft : Longword;
ReadyTimeLeft : Longword;
cSuddenDTurns : LongInt;
@@ -2461,6 +2462,7 @@
LeftImpactTimer := 0;
RightImpactTimer := 0;
TurnTimeLeft := 0;
+ TurnClockActive := true;
TagTurnTimeLeft := 0;
cSuddenDTurns := 15;
cDamagePercent := 100;