changeset 2381:cb84b457527c

Feather fall check fixed
author zipi
date Sun, 22 Jun 2014 12:56:25 +0100
parents 56f87a5c402b
children 8c00bd4573a8 41c36ecc9f32
files Indoor.cpp
diffstat 1 files changed, 24 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Indoor.cpp	Sat Jun 21 00:42:34 2014 +0200
+++ b/Indoor.cpp	Sun Jun 22 12:56:25 2014 +0100
@@ -5791,6 +5791,7 @@
   }
 
   int fall_start;
+  /*
   if (!pParty->FeatherFallActive())// не активно падение пера
   {
     bFeatherFall = false;
@@ -5801,6 +5802,12 @@
     {
       fall_start = pParty->uFallStartY;
     }
+	else// was missing
+	{
+		fall_start = floor_level;
+		bFeatherFall = true;
+		pParty->uFallStartY = floor_level;
+	}
   }
   else// активно падение пера
   {
@@ -5809,6 +5816,23 @@
     pParty->uFallStartY = floor_level;
   }
 
+  Reworked condition below
+  */
+  if (pParty->FeatherFallActive()
+	  || pParty->pPlayers[0].WearsItemAnyWhere(ITEM_ARTIFACT_LADYS_ESCORT)
+	  || pParty->pPlayers[1].WearsItemAnyWhere(ITEM_ARTIFACT_LADYS_ESCORT)
+	  || pParty->pPlayers[2].WearsItemAnyWhere(ITEM_ARTIFACT_LADYS_ESCORT)
+	  || pParty->pPlayers[3].WearsItemAnyWhere(ITEM_ARTIFACT_LADYS_ESCORT))
+  {
+	  fall_start = floor_level;
+	  bFeatherFall = true;
+	  pParty->uFallStartY = floor_level;
+  }
+  else
+  {
+	  bFeatherFall = false;
+	  fall_start = pParty->uFallStartY;
+  }
 
   if (fall_start - party_z > 512 && !bFeatherFall && party_z <= floor_level + 1)//повреждение от падения с высоты
   {