From 7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f Mon Sep 17 00:00:00 2001
From: Howaner <franzi.moos@googlemail.com>
Date: Sat, 26 Apr 2014 00:32:30 +0200
Subject: Add entity invulnerable

---
 src/Entities/Boat.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'src/Entities/Boat.cpp')

diff --git a/src/Entities/Boat.cpp b/src/Entities/Boat.cpp
index 921252253..31bfe3dc3 100644
--- a/src/Entities/Boat.cpp
+++ b/src/Entities/Boat.cpp
@@ -33,9 +33,12 @@ void cBoat::SpawnOn(cClientHandle & a_ClientHandle)
 
 
 
-void cBoat::DoTakeDamage(TakeDamageInfo & TDI)
+bool cBoat::DoTakeDamage(TakeDamageInfo & TDI)
 {
-	super::DoTakeDamage(TDI);
+	if (!super::DoTakeDamage(TDI))
+	{
+		return false;
+	}
 
 	if (GetHealth() == 0)
 	{
@@ -50,6 +53,7 @@ void cBoat::DoTakeDamage(TakeDamageInfo & TDI)
 		}
 		Destroy(true);
 	}
+	return true;
 }
 
 
-- 
cgit v1.2.3


From 2423fbf2efa39e28cc348acc11b9269e573dcdef Mon Sep 17 00:00:00 2001
From: madmaxoft <github@xoft.cz>
Date: Thu, 17 Jul 2014 22:15:34 +0200
Subject: Normalized comments.

This was mostly done automatically and then visually inspected for obvious errors.
All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
---
 src/Entities/Boat.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/Entities/Boat.cpp')

diff --git a/src/Entities/Boat.cpp b/src/Entities/Boat.cpp
index 31bfe3dc3..2e9e77b44 100644
--- a/src/Entities/Boat.cpp
+++ b/src/Entities/Boat.cpp
@@ -94,7 +94,7 @@ void cBoat::Tick(float a_Dt, cChunk & a_Chunk)
 	super::Tick(a_Dt, a_Chunk);
 	BroadcastMovementUpdate();
 
-	SetSpeed(GetSpeed() * 0.97); // Slowly decrease the speed
+	SetSpeed(GetSpeed() * 0.97);  // Slowly decrease the speed
 
 	if ((POSY_TOINT < 0) || (POSY_TOINT > cChunkDef::Height))
 	{
-- 
cgit v1.2.3


From 5e198c673009cf8ca9d92cf59848999bc96bbc37 Mon Sep 17 00:00:00 2001
From: madmaxoft <github@xoft.cz>
Date: Thu, 17 Jul 2014 22:50:58 +0200
Subject: Basic style fixes.

---
 src/Entities/Boat.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/Entities/Boat.cpp')

diff --git a/src/Entities/Boat.cpp b/src/Entities/Boat.cpp
index 2e9e77b44..8ff8866a1 100644
--- a/src/Entities/Boat.cpp
+++ b/src/Entities/Boat.cpp
@@ -104,7 +104,7 @@ void cBoat::Tick(float a_Dt, cChunk & a_Chunk)
 	if (IsBlockWater(m_World->GetBlock(POSX_TOINT, POSY_TOINT, POSZ_TOINT)))
 	{
 		if (GetSpeedY() < 2)
-		{	
+		{
 			AddSpeedY(0.2);
 		}
 	}
-- 
cgit v1.2.3