changeset 1353:8f69f77a0067

Player::PlayEmotion removed unused variables, deleted a useless secion of code (unused calculations)
author Grumpy7
date Sat, 13 Jul 2013 12:35:02 +0200
parents 88f80476c99c
children 05becb008006
files Player.cpp
diffstat 1 files changed, 4 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/Player.cpp	Sat Jul 13 11:56:57 2013 +0200
+++ b/Player.cpp	Sat Jul 13 12:35:02 2013 +0200
@@ -595,14 +595,6 @@
 //----- (00494A25) --------------------------------------------------------
 void Player::PlayEmotion(CHARACTER_EXPRESSION_ID new_expression, int a3)
 {
-  //signed int v3; // eax@1
-  //CHARACTER_EXPRESSION_ID v4; // dx@1
-  signed int v5; // edi@15
-  PlayerFrame *v6; // esi@17
-  signed int v7; // eax@20
-
-  //LOWORD(v3) = this->expression;
-  //v4 = expr;
   unsigned int v3 = expression;
   if (expression == CHARACTER_EXPRESSION_DEAD || expression == CHARACTER_EXPRESSION_ERADICATED)
   {
@@ -622,32 +614,15 @@
       }
     }
   }
-  //LOWORD(v3) = a3;
-  v5 = 0;
-  this->uExpressionTimeLength = a3;
   this->uExpressionTimePassed = 0;
   if ( !a3 )
   {
-    if ( (signed int)pPlayerFrameTable->uNumFrames <= 0 )
-    {
-LABEL_20:
-      v7 = 0;
-    }
-    else
-    {
-      v6 = pPlayerFrameTable->pFrames;
-      while ( v6->expression != new_expression )
-      {
-        ++v5;
-        ++v6;
-        if ( v5 >= (signed int)pPlayerFrameTable->uNumFrames )
-          goto LABEL_20;
-      }
-      v7 = v5;
-    }
-    //v4 = expr;
     this->uExpressionTimeLength = 8 * pPlayerFrameTable->pFrames[a3].uAnimLength;
   }
+  else
+  {
+    this->uExpressionTimeLength = 0;
+  }
   expression = new_expression;
   viewparams->bRedrawGameUI = 1;
 }