Mercurial > mm7
diff Actor.cpp @ 1650:b0a2b8525483
Merge
author | Grumpy7 |
---|---|
date | Wed, 18 Sep 2013 06:32:15 +0200 |
parents | 7182930263b3 |
children | 8251e59fd7c1 |
line wrap: on
line diff
--- a/Actor.cpp Wed Sep 18 06:30:53 2013 +0200 +++ b/Actor.cpp Wed Sep 18 06:32:15 2013 +0200 @@ -17,7 +17,6 @@ #include "ObjectList.h" #include "Overlays.h" #include "Events.h" -#include "IndoorCamera.h" #include "FactionTable.h" #include "TurnEngine.h" #include "MapInfo.h" @@ -26,6 +25,7 @@ #include "LOD.h" #include "Party.h" #include "GUIWindow.h" +#include "Outdoor_stuff.h" #include "MM7.h" #include "SpriteObject.h" @@ -2927,7 +2927,7 @@ actor->uCurrentActionLength = 8 * pSpriteFrameTable->pSpriteSFrames[actor->pSpriteIDs[ANIM_Bored]].uAnimLength; - v7 = stru_5C6E00->Atan2(actor->vPosition.x - pIndoorCamera->pos.x, actor->vPosition.y - pIndoorCamera->pos.y); + v7 = stru_5C6E00->Atan2(actor->vPosition.x - pGame->pIndoorCameraD3D->vPartyPos.x, actor->vPosition.y - pGame->pIndoorCameraD3D->vPartyPos.y); v9 = stru_5C6E00->uIntegerPi + actor->uYawAngle + ((signed int)stru_5C6E00->uIntegerPi >> 3) - v7; if ( BYTE1(v9) & 7 ) // turned away - just stand @@ -3144,8 +3144,8 @@ v18 = -16; v7->uYawAngle = stru_5C6E00->Atan2( - pParty->vPosition.x + fixpoint_sub0(stru_5C6E00->Cos(v18 + stru_5C6E00->uIntegerPi + v10->uYawAngle), v10->uDistanceXZ) - v7->vPosition.x, - pParty->vPosition.y + fixpoint_sub0(stru_5C6E00->Sin(v18 + stru_5C6E00->uIntegerPi + v10->uYawAngle), v10->uDistanceXZ) - v7->vPosition.y); + pParty->vPosition.x + fixpoint_mul(stru_5C6E00->Cos(v18 + stru_5C6E00->uIntegerPi + v10->uYawAngle), v10->uDistanceXZ) - v7->vPosition.x, + pParty->vPosition.y + fixpoint_mul(stru_5C6E00->Sin(v18 + stru_5C6E00->uIntegerPi + v10->uYawAngle), v10->uDistanceXZ) - v7->vPosition.y); if ( uActionLength ) v7->uCurrentActionLength = uActionLength; else