Mercurial > mm7
comparison Chest.cpp @ 1407:d4f57df4c299
PlayerSpeechID and uSpeakingCharacter
author | Ritor1 |
---|---|
date | Tue, 23 Jul 2013 16:34:00 +0600 |
parents | d071e0e9ba75 |
children | 204cce84300b |
comparison
equal
deleted
inserted
replaced
1406:d071e0e9ba75 | 1407:d4f57df4c299 |
---|---|
50 BLVFace *pBLVFace; // eax@20 | 50 BLVFace *pBLVFace; // eax@20 |
51 int pObjectX; // ebx@21 | 51 int pObjectX; // ebx@21 |
52 int pObjectZ; // edi@21 | 52 int pObjectZ; // edi@21 |
53 double dir_x; // st7@23 | 53 double dir_x; // st7@23 |
54 double dir_y; // st6@23 | 54 double dir_y; // st6@23 |
55 double v20; // st7@23 | 55 double length_vector; // st7@23 |
56 int pDepth; // ecx@26 | 56 int pDepth; // ecx@26 |
57 Vec3_int_ v; // ST4C_12@28 | 57 Vec3_int_ v; // ST4C_12@28 |
58 bool flag_shout; // edi@28 | 58 bool flag_shout; // edi@28 |
59 int pSpriteID[4]; // [sp+84h] [bp-40h]@16 | 59 int pSpriteID[4]; // [sp+84h] [bp-40h]@16 |
60 Vec3_int_ pOut; // [sp+A0h] [bp-24h]@28 | 60 Vec3_int_ pOut; // [sp+A0h] [bp-24h]@28 |
114 } | 114 } |
115 } | 115 } |
116 dir_x = (double)pParty->vPosition.x - (double)pObjectX; | 116 dir_x = (double)pParty->vPosition.x - (double)pObjectX; |
117 dir_y = (double)pParty->vPosition.y - (double)pObjectY; | 117 dir_y = (double)pParty->vPosition.y - (double)pObjectY; |
118 dir_z = ( (double)pParty->sEyelevel + (double)pParty->vPosition.z ) - (double)pObjectZ; | 118 dir_z = ( (double)pParty->sEyelevel + (double)pParty->vPosition.z ) - (double)pObjectZ; |
119 v20 = sqrt( (dir_x * dir_x) + (dir_y * dir_y) + (dir_z * dir_z) ); | 119 length_vector = sqrt( (dir_x * dir_x) + (dir_y * dir_y) + (dir_z * dir_z) ); |
120 if ( v20 <= 1.0 ) | 120 if ( length_vector <= 1.0 ) |
121 { | 121 { |
122 *(float *)&sRotX = 0.0; | 122 *(float *)&sRotX = 0.0; |
123 *(float *)&sRotY = 0.0; | 123 *(float *)&sRotY = 0.0; |
124 } | 124 } |
125 else | 125 else |
127 sRotY = (signed __int64)sqrt(dir_x * dir_x + dir_y * dir_y); | 127 sRotY = (signed __int64)sqrt(dir_x * dir_x + dir_y * dir_y); |
128 sRotX = stru_5C6E00->Atan2((signed __int64)dir_x, (signed __int64)dir_y); | 128 sRotX = stru_5C6E00->Atan2((signed __int64)dir_x, (signed __int64)dir_y); |
129 sRotY = stru_5C6E00->Atan2(dir_y * dir_y, (signed __int64)dir_z); | 129 sRotY = stru_5C6E00->Atan2(dir_y * dir_y, (signed __int64)dir_z); |
130 } | 130 } |
131 pDepth = 256; | 131 pDepth = 256; |
132 if ( v20 < 256.0 ) | 132 if ( length_vector < 256.0 ) |
133 pDepth = (signed __int64)v20 / 4; | 133 pDepth = (signed __int64)length_vector / 4; |
134 v.x = pObjectX; | 134 v.x = pObjectX; |
135 v.y = pObjectY; | 135 v.y = pObjectY; |
136 v.z = pObjectZ; | 136 v.z = pObjectZ; |
137 Vec3_int_::Rotate(pDepth, sRotX, sRotY, v, &pOut.x, &pOut.z, &pOut.y); | 137 Vec3_int_::Rotate(pDepth, sRotX, sRotY, v, &pOut.x, &pOut.z, &pOut.y); |
138 sub_42F7EB_DropItemAt(pSpriteID[pRandom], pOut.x, pOut.z, pOut.y, 0, 1, 0, 48, 0); | 138 sub_42F7EB_DropItemAt(pSpriteID[pRandom], pOut.x, pOut.z, pOut.y, 0, 1, 0, 48, 0); |
168 chest->uFlags &= 0xFEu; | 168 chest->uFlags &= 0xFEu; |
169 if ( uActiveCharacter && !qword_A750D8 && !dword_507CD8 ) | 169 if ( uActiveCharacter && !qword_A750D8 && !dword_507CD8 ) |
170 { | 170 { |
171 qword_A750D8 = 256i64; | 171 qword_A750D8 = 256i64; |
172 PlayerSpeechID = SPEECH_5; | 172 PlayerSpeechID = SPEECH_5; |
173 word_A750E2 = uActiveCharacter; | 173 uSpeakingCharacter = uActiveCharacter; |
174 } | 174 } |
175 pIcons_LOD->RemoveTexturesPackFromTextureList(); | 175 pIcons_LOD->RemoveTexturesPackFromTextureList(); |
176 dword_507CD8 = 0; | 176 dword_507CD8 = 0; |
177 return false; | 177 return false; |
178 } | 178 } |