Mercurial > mm7
diff Player.cpp @ 1295:86a83e12d795
moving files
author | Ritor1 |
---|---|
date | Mon, 17 Jun 2013 17:34:01 +0600 |
parents | ce8ea73e7678 |
children | 5450af4f57ef |
line wrap: on
line diff
--- a/Player.cpp Mon Jun 17 09:09:30 2013 +0600 +++ b/Player.cpp Mon Jun 17 17:34:01 2013 +0600 @@ -9521,4 +9521,44 @@ pMouse->RemoveHoldingItem(); } } +} +//----- (0049387A) -------------------------------------------------------- +int CycleCharacter(unsigned int _this) +{ + signed int result; // eax@1 + signed int v2; // ecx@2 + signed int v3; // ecx@8 + + result = uActiveCharacter; + if ( _this ) + { + v2 = 0; + while ( 1 ) + { + --result; + if ( result < 1 ) + result = 4; + if ( !pPlayers[result]->uTimeToRecovery ) + break; + ++v2; + if ( v2 >= 4 ) + return uActiveCharacter; + } + } + else + { + v3 = 0; + while ( 1 ) + { + ++result; + if ( result > 4 ) + result = 1; + if ( !pPlayers[result]->uTimeToRecovery ) + break; + ++v3; + if ( v3 >= 4 ) + return uActiveCharacter; + } + } + return result; } \ No newline at end of file