comparison mm7_3.cpp @ 880:4568f1e4d61b

Слияние
author Ritor1
date Mon, 01 Apr 2013 18:52:19 +0600
parents cd355e4c6104 726f9c2ff381
children 1d7e7d61485b
comparison
equal deleted inserted replaced
879:cd355e4c6104 880:4568f1e4d61b
1112 _46E889_collide_against_bmodels(1u); 1112 _46E889_collide_against_bmodels(1u);
1113 v29 = WorldPosToGridCellZ(v0->vPosition.y); 1113 v29 = WorldPosToGridCellZ(v0->vPosition.y);
1114 v30 = WorldPosToGridCellX(v0->vPosition.x); 1114 v30 = WorldPosToGridCellX(v0->vPosition.x);
1115 _46E26D_collide_against_sprites(v30, v29); 1115 _46E26D_collide_against_sprites(v30, v29);
1116 _46EF01_collision_chech_player(0); 1116 _46EF01_collision_chech_player(0);
1117 _46ED8A_collide_against_sprite_objects(8 * v75 | OBJECT_Actor); 1117 _46ED8A_collide_against_sprite_objects(PID(OBJECT_Actor,v75));
1118 v31 = 0; 1118 v31 = 0;
1119 for ( i = 0; v31 < ai_arrays_size; ++v31 ) 1119 for ( i = 0; v31 < ai_arrays_size; ++v31 )
1120 { 1120 {
1121 v33 = ai_near_actors_ids[v31]; 1121 v33 = ai_near_actors_ids[v31];
1122 if ( v33 != v75 && _46DF1A_collide_against_actor(v33, 40) ) 1122 if ( v33 != v75 && _46DF1A_collide_against_actor(v33, 40) )
1176 //v34 = 0; 1176 //v34 = 0;
1177 if ( v0->pMonsterInfo.uHostilityType ) 1177 if ( v0->pMonsterInfo.uHostilityType )
1178 { 1178 {
1179 if ( v71 == 0 ) 1179 if ( v71 == 0 )
1180 { 1180 {
1181 Actor::_402968(v75, v38, 0, (AIDirection *)0); 1181 Actor::Flee(v75, v38, 0, (AIDirection *)0);
1182 } 1182 }
1183 else 1183 else
1184 { 1184 {
1185 Actor::AI_StandOrBored(v75, 4, 0, (AIDirection *)0); 1185 Actor::AI_StandOrBored(v75, 4, 0, (AIDirection *)0);
1186 } 1186 }
1189 { 1189 {
1190 Actor::AI_StandOrBored(v75, 4, 0, (AIDirection *)0); 1190 Actor::AI_StandOrBored(v75, 4, 0, (AIDirection *)0);
1191 } 1191 }
1192 else if ( pActors[v39].pMonsterInfo.uHostilityType == MonsterInfo::Hostility_Friendly ) 1192 else if ( pActors[v39].pMonsterInfo.uHostilityType == MonsterInfo::Hostility_Friendly )
1193 { 1193 {
1194 Actor::_402968(v75, v38, 0, (AIDirection *)0); 1194 Actor::Flee(v75, v38, 0, (AIDirection *)0);
1195 } 1195 }
1196 else 1196 else
1197 { 1197 {
1198 Actor::FaceObject(v75, v38, 0, (AIDirection *)0); 1198 Actor::FaceObject(v75, v38, 0, (AIDirection *)0);
1199 } 1199 }
1445 goto LABEL_35; 1445 goto LABEL_35;
1446 } 1446 }
1447 v10 = i; 1447 v10 = i;
1448 if ( !(v9 & 0x40) ) 1448 if ( !(v9 & 0x40) )
1449 goto LABEL_35; 1449 goto LABEL_35;
1450 _46BFFA_check_object_intercept(i, 8 * i | OBJECT_Item); 1450 _46BFFA_check_object_intercept(i, PID(OBJECT_Item,i));
1451 } 1451 }
1452 } 1452 }
1453 LABEL_36: 1453 LABEL_36:
1454 ; 1454 ;
1455 //v2 += 112; 1455 //v2 += 112;
2341 { 2341 {
2342 v7 = pOutdoor->pBModels[v108 >> 6].pFaces; 2342 v7 = pOutdoor->pBModels[v108 >> 6].pFaces;
2343 v6 = v108 & 0x3F; 2343 v6 = v108 & 0x3F;
2344 /*if ( *(char *)(v7->pFacePlane.vNormal.x + 308 * v6 + 31) & 4 ) 2344 /*if ( *(char *)(v7->pFacePlane.vNormal.x + 308 * v6 + 31) & 4 )
2345 { 2345 {
2346 pParty->field_6F4_packedid = 8 * v108 | OBJECT_BModel; 2346 pParty->field_6F4_packedid = PID(OBJECT_BModel,v108);
2347 v103 = *(short *)(v7->pFacePlane.vNormal.x + 308 * v6 + 292); 2347 v103 = *(short *)(v7->pFacePlane.vNormal.x + 308 * v6 + 292);
2348 }*/ 2348 }*/
2349 if ( BYTE3(v7[v6].uAttributes) & 4 ) 2349 if ( BYTE3(v7[v6].uAttributes) & 4 )
2350 { 2350 {
2351 pParty->floor_face_pid = PID(OBJECT_BModel, v108); 2351 pParty->floor_face_pid = PID(OBJECT_BModel, v108);
4766 v31->std__vector_000004_size = 0; 4766 v31->std__vector_000004_size = 0;
4767 LOBYTE(v31) = 0; 4767 LOBYTE(v31) = 0;
4768 if ( stru_F8AD28.uNumLightsApplied > 0 || pDecalBuilder->uNumDecals > 0 ) 4768 if ( stru_F8AD28.uNumLightsApplied > 0 || pDecalBuilder->uNumDecals > 0 )
4769 { 4769 {
4770 v31 = (LightmapBuilder *)(v50 ? 3 : v49 != 0 ? 5 : 0); 4770 v31 = (LightmapBuilder *)(v50 ? 3 : v49 != 0 ? 5 : 0);
4771 static_RenderBuildingsD3D_stru_73C834.GetFacePlaneAndClassify(pFace, (BSPVertexBuffer *)v56 - 1); 4771 static_RenderBuildingsD3D_stru_73C834.GetFacePlaneAndClassify(pFace, &v56->pVertices);
4772 if ( pDecalBuilder->uNumDecals > 0 ) 4772 if ( pDecalBuilder->uNumDecals > 0 )
4773 { 4773 {
4774 v40 = -1; 4774 v40 = -1;
4775 v39 = v31; 4775 v39 = v31;
4776 v38 = 0; 4776 v38 = 0;
6084 if ( v18 < 0 ) 6084 if ( v18 < 0 )
6085 v18 = pOutdoorCamera->shading_dist_mist; 6085 v18 = pOutdoorCamera->shading_dist_mist;
6086 6086
6087 v37 += ((unsigned __int64)(_this.ptr_38->field_10 * v13) >> 16); 6087 v37 += ((unsigned __int64)(_this.ptr_38->field_10 * v13) >> 16);
6088 v36 += ((unsigned __int64)(_this.ptr_38->field_1C * v13) >> 16); 6088 v36 += ((unsigned __int64)(_this.ptr_38->field_1C * v13) >> 16);
6089 v35 = 224 * pMiscTimer->uTotalGameTimeElapsed + (signed int)((unsigned __int64)(v37 * v18) >> 16) / 8; 6089 v35 = 224 * pMiscTimer->uTotalGameTimeElapsed + fixpoint_sub0(v37, v18) / 8;
6090 v36 = 224 * pMiscTimer->uTotalGameTimeElapsed + (signed int)((unsigned __int64)(v36 * v18) >> 16) / 8; 6090 v36 = 224 * pMiscTimer->uTotalGameTimeElapsed + fixpoint_sub0(v36, v18) / 8;
6091 6091
6092 //array_50AC10[i].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; 6092 //array_50AC10[i].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
6093 //array_50AC10[i].vWorldPosition.x = v36 / (_this.pTexture->uTextureHeight * 65536.0); 6093 //array_50AC10[i].vWorldPosition.x = v36 / (_this.pTexture->uTextureHeight * 65536.0);
6094 //array_50AC10[i].vWorldPosition.y = 1.0 / (pOutdoorCamera->shading_dist_mist >> 16); 6094 //array_50AC10[i].vWorldPosition.y = 1.0 / (pOutdoorCamera->shading_dist_mist >> 16);
6095 //array_50AC10[i].vWorldPosition.z = v35 / (_this.pTexture->uTextureWidth * 65536.0); 6095 //array_50AC10[i].vWorldPosition.z = v35 / (_this.pTexture->uTextureWidth * 65536.0);
6223 } 6223 }
6224 while ( !v44 ); 6224 while ( !v44 );
6225 uFaceID = v65; 6225 uFaceID = v65;
6226 } 6226 }
6227 v56 = 8 * uFaceID; 6227 v56 = 8 * uFaceID;
6228 LOBYTE(v56) = PID(uFaceID,OBJECT_BModel); 6228 LOBYTE(v56) = PID(OBJECT_BModel,uFaceID);
6229 v57 = v56; 6229 v57 = v56;
6230 v58 = pFace->GetTexture(); 6230 v58 = pFace->GetTexture();
6231 pRenderer->DrawIndoorPolygon(v3, pFace, pBitmaps_LOD->pHardwareTextures[pFace->uBitmapID], v58, v57, -1, 0); 6231 pRenderer->DrawIndoorPolygon(v3, pFace, pBitmaps_LOD->pHardwareTextures[pFace->uBitmapID], v58, v57, -1, 0);
6232 return; 6232 return;
6233 } 6233 }
7757 v9 = y_x1z1; 7757 v9 = y_x1z1;
7758 v10 = y_x2z2; 7758 v10 = y_x2z2;
7759 v15 = grid_x2 - a1; 7759 v15 = grid_x2 - a1;
7760 v13 = grid_z1 - a2; 7760 v13 = grid_z1 - a2;
7761 } 7761 }
7762 return v14 + v8 + fixpoint_mul(v13, (v10 - v8) * 128) + fixpoint_mul(v15, (v9 - v8) * 128); 7762 return v14 + v8 + fixpoint_sub0(v13, (v10 - v8) * 128) + fixpoint_sub0(v15, (v9 - v8) * 128);
7763 } 7763 }
7764 else 7764 else
7765 return y_x1z1; 7765 return y_x1z1;
7766 } 7766 }
7767 7767
11149 v15->world_y = a2; 11149 v15->world_y = a2;
11150 v15->world_z = a3; 11150 v15->world_z = a3;
11151 v15->uScreenSpaceX = a5; 11151 v15->uScreenSpaceX = a5;
11152 v15->uScreenSpaceY = a6; 11152 v15->uScreenSpaceY = a6;
11153 //v23 = 8 * uDecorationID; 11153 //v23 = 8 * uDecorationID;
11154 //LOBYTE(v23) = 8 * uDecorationID | OBJECT_Decoration; 11154 //LOBYTE(v23) = PID(OBJECT_Decoration,uDecorationID);
11155 11155
11156 //v15->sZValue = v22 + v23; 11156 //v15->sZValue = v22 + v23;
11157 v15->actual_z = HIWORD(x); 11157 v15->actual_z = HIWORD(x);
11158 v15->object_pid = 8 * uDecorationID | OBJECT_Decoration; 11158 v15->object_pid = PID(OBJECT_Decoration,uDecorationID);
11159 11159
11160 v15->uTintColor = 0; 11160 v15->uTintColor = 0;
11161 v15->pSpriteFrame = v12; 11161 v15->pSpriteFrame = v12;
11162 } 11162 }
11163 } 11163 }
11306 v3->uScreenSpaceX = v36; 11306 v3->uScreenSpaceX = v36;
11307 v22 = v35; 11307 v22 = v35;
11308 v3->uTintColor = 0; 11308 v3->uTintColor = 0;
11309 v3->uScreenSpaceY = v22; 11309 v3->uScreenSpaceY = v22;
11310 //v23 = 8 * i; 11310 //v23 = 8 * i;
11311 //LOBYTE(v23) = 8 * i | OBJECT_Item; 11311 //LOBYTE(v23) = PID(OBJECT_Item,i);
11312 v3->pSpriteFrame = v24; 11312 v3->pSpriteFrame = v24;
11313 //v12 = (p->uAttributes & 0x20) == 0; 11313 //v12 = (p->uAttributes & 0x20) == 0;
11314 //v3->sZValue = v21 + v23; 11314 //v3->sZValue = v21 + v23;
11315 v3->actual_z = HIWORD(x); 11315 v3->actual_z = HIWORD(x);
11316 v3->object_pid = 8 * i | OBJECT_Item; 11316 v3->object_pid = PID(OBJECT_Item,i);
11317 if (p->uAttributes & 0x20) 11317 if (p->uAttributes & 0x20)
11318 { 11318 {
11319 if ( !pRenderer->pRenderD3D ) 11319 if ( !pRenderer->pRenderD3D )
11320 v3->sZValue = 0; 11320 v3->sZValue = 0;
11321 } 11321 }
14968 v19 = 0; 14968 v19 = 0;
14969 for ( i = 0; v18 < v45; i = v18 ) 14969 for ( i = 0; v18 < v45; i = v18 )
14970 { 14970 {
14971 v20 = &pActors[ai_near_actors_ids[v18]]; 14971 v20 = &pActors[ai_near_actors_ids[v18]];
14972 if ( v20->uAttributes & 0x8000 14972 if ( v20->uAttributes & 0x8000
14973 || (v21 = sub_4070EF_prolly_collide_objects(PID(ai_near_actors_ids[v18],OBJECT_Actor), 4u), v18 = i, v21) ) 14973 || (v21 = sub_4070EF_prolly_collide_objects(PID(OBJECT_Actor,ai_near_actors_ids[v18]), 4u), v18 = i, v21) )
14974 { 14974 {
14975 v22 = ai_near_actors_ids[v18]; 14975 v22 = ai_near_actors_ids[v18];
14976 v20->uAttributes |= 0x8000u; 14976 v20->uAttributes |= 0x8000u;
14977 ai_array_4F6638_actor_ids[v19] = v22; 14977 ai_array_4F6638_actor_ids[v19] = v22;
14978 ai_array_4F5E68[v19++] = ai_near_actors_distances[v18]; 14978 ai_array_4F5E68[v19++] = ai_near_actors_distances[v18];
15102 int v33; // eax@144 15102 int v33; // eax@144
15103 int v34; // eax@147 15103 int v34; // eax@147
15104 char v35; // al@150 15104 char v35; // al@150
15105 unsigned int v36; // edi@152 15105 unsigned int v36; // edi@152
15106 signed int v37; // eax@154 15106 signed int v37; // eax@154
15107 unsigned __int8 v38; // sf@158 15107 //unsigned __int8 v38; // sf@158
15108 unsigned __int8 v39; // of@158 15108 //unsigned __int8 v39; // of@158
15109 //signed int v40; // edx@166 15109 //signed int v40; // edx@166
15110 //unsigned int v41; // ecx@166 15110 //unsigned int v41; // ecx@166
15111 double v42; // st7@176 15111 double v42; // st7@176
15112 double v43; // st6@176 15112 double v43; // st6@176
15113 //bool v44; // eax@189 15113 //bool v44; // eax@189
15114 bool v45; // eax@192 15114 bool v45; // eax@192
15115 unsigned __int8 v46; // cl@197 15115 unsigned __int8 v46; // cl@197
15116 double v47; // st7@206 15116 double v47; // st7@206
15117 double v48; // st7@207 15117 //double v48; // st7@207
15118 //char v49; // zf@208 15118 //char v49; // zf@208
15119 //char v50; // zf@214 15119 //char v50; // zf@214
15120 //signed int v51; // edx@219 15120 //signed int v51; // edx@219
15121 //unsigned int v52; // ecx@219 15121 //unsigned int v52; // ecx@219
15122 __int16 v53; // fps@224 15122 __int16 v53; // fps@224
15123 unsigned __int8 v54; // c0@224 15123 //unsigned __int8 v54; // c0@224
15124 unsigned __int8 v55; // c3@224 15124 //unsigned __int8 v55; // c3@224
15125 double v56; // st7@226 15125 //double v56; // st7@226
15126 AIDirection *v57; // eax@246 15126 AIDirection *v57; // eax@246
15127 double v58; // st7@246 15127 double v58; // st7@246
15128 //signed int v59; // [sp-18h] [bp-C8h]@213 15128 //signed int v59; // [sp-18h] [bp-C8h]@213
15129 //int v60; // [sp-14h] [bp-C4h]@144 15129 //int v60; // [sp-14h] [bp-C4h]@144
15130 //int v61; // [sp-14h] [bp-C4h]@168 15130 //int v61; // [sp-14h] [bp-C4h]@168
15151 //int v82; // [sp+A0h] [bp-10h]@45 15151 //int v82; // [sp+A0h] [bp-10h]@45
15152 //unsigned int uActorID; // [sp+A4h] [bp-Ch]@32 15152 //unsigned int uActorID; // [sp+A4h] [bp-Ch]@32
15153 unsigned int v84; // [sp+A8h] [bp-8h]@11 15153 unsigned int v84; // [sp+A8h] [bp-8h]@11
15154 signed int target_pid; // [sp+ACh] [bp-4h]@83 15154 signed int target_pid; // [sp+ACh] [bp-4h]@83
15155 AIState uAIState; 15155 AIState uAIState;
15156 int v38;
15156 15157
15157 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) 15158 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
15158 MakeActorAIList_ODM(); 15159 MakeActorAIList_ODM();
15159 else 15160 else
15160 MakeActorAIList_BLV(); 15161 MakeActorAIList_BLV();
15194 v5->sCurrentHP = v7; 15195 v5->sCurrentHP = v7;
15195 if ( v6 ) 15196 if ( v6 )
15196 { 15197 {
15197 if ( v7 >= 0 ) 15198 if ( v7 >= 0 )
15198 { 15199 {
15199 Actor::_4030AD(v84, 4, 0); 15200 Actor::Stun(v84, 4, 0);
15200 } 15201 }
15201 else 15202 else
15202 { 15203 {
15203 Actor::Die(v84); 15204 Actor::Die(v84);
15204 if ( v5->pMonsterInfo.uExp ) 15205 if ( v5->pMonsterInfo.uExp )
15277 // || LODWORD(pActor->pActorBuffs[3].uExpireTime) <= v12) ) 15278 // || LODWORD(pActor->pActorBuffs[3].uExpireTime) <= v12) )
15278 actor->uActorHeight = pMonsterList->pMonsters[actor->pMonsterInfo.uID - 1].uMonsterHeight; 15279 actor->uActorHeight = pMonsterList->pMonsters[actor->pMonsterInfo.uID - 1].uMonsterHeight;
15279 if ( (signed __int64)actor->pActorBuffs[ACTOR_BUFF_CHARM].uExpireTime > 0 ) 15280 if ( (signed __int64)actor->pActorBuffs[ACTOR_BUFF_CHARM].uExpireTime > 0 )
15280 actor->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly; 15281 actor->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
15281 // not sure 15282 // not sure
15282 else // if ( (signed __int64)v21->pActorBuffs[ACTOR_BUFF_CHARM].uExpireTime < 0 ) 15283 else if ( (signed __int64)actor->pActorBuffs[ACTOR_BUFF_CHARM].uExpireTime < 0 )
15283 actor->pMonsterInfo.uHostilityType = pMonsterStats->pInfos[actor->pMonsterInfo.uID].uHostilityType; 15284 actor->pMonsterInfo.uHostilityType = pMonsterStats->pInfos[actor->pMonsterInfo.uID].uHostilityType;
15284 15285
15285 if ((signed __int64)actor->pActorBuffs[ACTOR_BUFF_PARALYZED].uExpireTime > 0 15286 if ((signed __int64)actor->pActorBuffs[ACTOR_BUFF_PARALYZED].uExpireTime > 0
15286 || (signed __int64)actor->pActorBuffs[ACTOR_BUFF_STONED].uExpireTime > 0) 15287 || (signed __int64)actor->pActorBuffs[ACTOR_BUFF_STONED].uExpireTime > 0)
15287 continue; 15288 continue;
15364 if ( (signed __int64)v21->pActorBuffs[ACTOR_BUFF_SHRINK].uExpireTime < 0 ) 15365 if ( (signed __int64)v21->pActorBuffs[ACTOR_BUFF_SHRINK].uExpireTime < 0 )
15365 v21->uActorHeight = pMonsterList->pMonsters[v21->pMonsterInfo.uID - 1].uMonsterHeight; 15366 v21->uActorHeight = pMonsterList->pMonsters[v21->pMonsterInfo.uID - 1].uMonsterHeight;
15366 if ( (signed __int64)v21->pActorBuffs[ACTOR_BUFF_CHARM].uExpireTime > 0 ) 15367 if ( (signed __int64)v21->pActorBuffs[ACTOR_BUFF_CHARM].uExpireTime > 0 )
15367 v21->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly; 15368 v21->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
15368 // not sure 15369 // not sure
15369 else // if ( (signed __int64)v21->pActorBuffs[ACTOR_BUFF_CHARM].uExpireTime < 0 ) 15370 else if ( (signed __int64)v21->pActorBuffs[ACTOR_BUFF_CHARM].uExpireTime < 0 )
15370 v21->pMonsterInfo.uHostilityType = pMonsterStats->pInfos[v21->pMonsterInfo.uID].uHostilityType; 15371 v21->pMonsterInfo.uHostilityType = pMonsterStats->pInfos[v21->pMonsterInfo.uID].uHostilityType;
15371 if ( (signed __int64)v21->pActorBuffs[2].uExpireTime < 0 ) 15372 if ( (signed __int64)v21->pActorBuffs[2].uExpireTime < 0 )
15372 { 15373 {
15373 v21->uAIState = Removed; 15374 v21->uAIState = Removed;
15374 continue; 15375 continue;
15381 v27 = pMiscTimer->uTimeElapsed; 15382 v27 = pMiscTimer->uTimeElapsed;
15382 v28 = v21->pMonsterInfo.uRecoveryTime; 15383 v28 = v21->pMonsterInfo.uRecoveryTime;
15383 v21->uCurrentActionTime += pMiscTimer->uTimeElapsed; 15384 v21->uCurrentActionTime += pMiscTimer->uTimeElapsed;
15384 if ( (signed int)v28 > 0 ) 15385 if ( (signed int)v28 > 0 )
15385 v21->pMonsterInfo.uRecoveryTime = v28 - v27; 15386 v21->pMonsterInfo.uRecoveryTime = v28 - v27;
15386 if ( v21->pMonsterInfo.uRecoveryTime< 0 ) 15387 if ( v21->pMonsterInfo.uRecoveryTime < 0 )
15387 v21->pMonsterInfo.uRecoveryTime = 0; 15388 v21->pMonsterInfo.uRecoveryTime = 0;
15388 if ( !(v21->uAttributes & 0x8000) ) 15389 if ( !(v21->uAttributes & 0x8000) )
15389 v21->uAttributes |= 0x8000; 15390 v21->uAttributes |= 0x8000;
15390 a1 = 8 * actor_id | OBJECT_Actor; 15391 a1 = PID(OBJECT_Actor,actor_id);
15391 v30 = Actor::GetDirectionInfo(8 * actor_id | OBJECT_Actor, target_pid, &a3, 0); 15392 v30 = Actor::GetDirectionInfo(PID(OBJECT_Actor,actor_id), target_pid, &a3, 0);
15392 memcpy(&v75, v30, sizeof(v75)); 15393 memcpy(&v75, v30, sizeof(v75));
15393 memcpy(&pDir, &v75, sizeof(pDir)); 15394 memcpy(&pDir, &v75, sizeof(pDir));
15394 uAIState = v21->uAIState; 15395 uAIState = v21->uAIState;
15395 /*if ( v21->pMonsterInfo.uHostilityType != MonsterInfo::Hostility_Friendly 15396 /*if ( v21->pMonsterInfo.uHostilityType != MonsterInfo::Hostility_Friendly
15396 && (signed int)v21->pMonsterInfo.uRecoveryTime <= 0 15397 && (signed int)v21->pMonsterInfo.uRecoveryTime <= 0
15426 ); 15427 );
15427 } 15428 }
15428 else if ( v21->uAIState == AttackingRanged1 ) 15429 else if ( v21->uAIState == AttackingRanged1 )
15429 { 15430 {
15430 v34 = v21->pMonsterInfo.uMissleAttack1Type; 15431 v34 = v21->pMonsterInfo.uMissleAttack1Type;
15431 Actor::_404874(actor_id, &pDir, v34, 0); 15432 Actor::RangedAttack(actor_id, &pDir, v34, 0);
15432 } 15433 }
15433 else if ( v21->uAIState == AttackingRanged2 ) 15434 else if ( v21->uAIState == AttackingRanged2 )
15434 { 15435 {
15435 v34 = v21->pMonsterInfo.uMissleAttack2Type; 15436 v34 = v21->pMonsterInfo.uMissleAttack2Type;
15436 Actor::_404874(actor_id, &pDir, v34, 1); 15437 Actor::RangedAttack(actor_id, &pDir, v34, 1);
15437 } 15438 }
15438 else if ( v21->uAIState == AttackingRanged3 ) 15439 else if ( v21->uAIState == AttackingRanged3 )
15439 { 15440 {
15440 v65 = v21->pMonsterInfo.uSpellSkillAndMastery1; 15441 v65 = v21->pMonsterInfo.uSpellSkillAndMastery1;
15441 v33 = v21->pMonsterInfo.uSpell1ID; 15442 v33 = v21->pMonsterInfo.uSpell1ID;
15442 Actor::_404AC7(actor_id, &pDir, v33, 2, v65); 15443 Actor::SpellAttack(actor_id, &pDir, v33, 2, v65);
15443 } 15444 }
15444 else if ( v21->uAIState == AttackingRanged4 ) 15445 else if ( v21->uAIState == AttackingRanged4 )
15445 { 15446 {
15446 v65 = v21->pMonsterInfo.uSpellSkillAndMastery2; 15447 v65 = v21->pMonsterInfo.uSpellSkillAndMastery2;
15447 v33 = v21->pMonsterInfo.uSpell2ID; 15448 v33 = v21->pMonsterInfo.uSpell2ID;
15448 Actor::_404AC7(actor_id, &pDir, v33, 3, v65); 15449 Actor::SpellAttack(actor_id, &pDir, v33, 3, v65);
15449 } 15450 }
15450 } 15451 }
15451 15452
15452 v36 = v75.uDistance; 15453 v36 = v75.uDistance;
15453 if ( v21->pMonsterInfo.uHostilityType == MonsterInfo::Hostility_Friendly) 15454 if ( v21->pMonsterInfo.uHostilityType == MonsterInfo::Hostility_Friendly)
15460 } 15461 }
15461 else 15462 else
15462 { 15463 {
15463 v37 = 4; 15464 v37 = 4;
15464 } 15465 }
15466 v38=0;
15465 if ( v37 == 2 ) 15467 if ( v37 == 2 )
15466 { 15468 {
15467 v39 = __OFSUB__(v36, 1024); 15469 //v39 = __OFSUB__(v36, 1024);
15468 v38 = ((v36 - 1024) & 0x80000000u) != 0; 15470 //v38 = ((v36 - 1024) & 0x80000000u) != 0;
15471 v38 = 1024;
15469 } 15472 }
15470 else if ( v37 == 3 ) 15473 else if ( v37 == 3 )
15471 { 15474 {
15472 v39 = __OFSUB__(v36, 2560); 15475 //v39 = __OFSUB__(v36, 2560);
15473 v38 = ((v36 - 2560) & 0x80000000u) != 0; 15476 //v38 = ((v36 - 2560) & 0x80000000u) != 0;
15477 v38 = 2560;
15474 } 15478 }
15475 else if ( v37 == 4 ) 15479 else if ( v37 == 4 )
15476 { 15480 {
15477 v39 = __OFSUB__(v36, 5120); 15481 //v39 = __OFSUB__(v36, 5120);
15478 v38 = ((v36 - 5120) & 0x80000000u) != 0; 15482 //v38 = ((v36 - 5120) & 0x80000000u) != 0;
15483 v38 = 5120;
15479 } 15484 }
15480 if ( v37 >= 1 && v37 <= 4 && v38 ^ v39 || v37 == 1 ) 15485 if ( v37 >= 1 && v37 <= 4 && v36 < v38 || v37 == 1 )
15481 v21->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Long; 15486 v21->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Long;
15482 } 15487 }
15483 15488
15484 if ( (signed __int64)v21->pActorBuffs[4].uExpireTime > 0 ) 15489 if ( (signed __int64)v21->pActorBuffs[4].uExpireTime > 0 )
15485 { 15490 {
15489 } 15494 }
15490 else 15495 else
15491 { 15496 {
15492 //peasents after attacked 15497 //peasents after attacked
15493 //guard after attacked 15498 //guard after attacked
15494 Actor::_402968(actor_id, target_pid, 0, &pDir); 15499 Actor::Flee(actor_id, target_pid, 0, &pDir);
15495 } 15500 }
15496 continue; 15501 continue;
15497 } 15502 }
15498 15503
15499 if ( /*v21->pMonsterInfo.uHostilityType == MonsterInfo::Hostility_Long &&*/ target_pid ) // temporary 15504 if ( v21->pMonsterInfo.uHostilityType == MonsterInfo::Hostility_Long && target_pid )
15500 { 15505 {
15501 15506
15502 if ( v21->pMonsterInfo.uAIType == 1 ) 15507 if ( v21->pMonsterInfo.uAIType == 1 )
15503 { 15508 {
15504 if ( v21->pMonsterInfo.uMovementType == 5 ) 15509 if ( v21->pMonsterInfo.uMovementType == 5 )
15505 { 15510 {
15506 Actor::AI_Stand(actor_id, target_pid, (signed __int64)((double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333), &pDir); 15511 Actor::AI_Stand(actor_id, target_pid, (signed __int64)((double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333), &pDir);
15507 } 15512 }
15508 else 15513 else
15509 { 15514 {
15510 Actor::_402968(actor_id, target_pid, 0, &pDir); 15515 Actor::Flee(actor_id, target_pid, 0, &pDir);
15511 continue; 15516 continue;
15512 } 15517 }
15513 15518
15514 } 15519 }
15515 if ( !(v21->uAttributes & 0x020000) ) 15520 if ( !(v21->uAttributes & 0x020000) )
15522 v43 = (double)(signed int)v21->pMonsterInfo.uHP * 0.1; 15527 v43 = (double)(signed int)v21->pMonsterInfo.uHP * 0.1;
15523 v84 = v21->sCurrentHP; 15528 v84 = v21->sCurrentHP;
15524 v42 = (double)(signed int)v84; 15529 v42 = (double)(signed int)v84;
15525 if ( v43 > v42 && (signed int)v36 < 10240 ) 15530 if ( v43 > v42 && (signed int)v36 < 10240 )
15526 { 15531 {
15527 Actor::_402968(actor_id, target_pid, 0, &pDir); 15532 Actor::Flee(actor_id, target_pid, 0, &pDir);
15528 continue; 15533 continue;
15529 } 15534 }
15530 } 15535 }
15531 } 15536 }
15532 15537
15544 { 15549 {
15545 if ( v21->pMonsterInfo.uMissleAttack1Type ) 15550 if ( v21->pMonsterInfo.uMissleAttack1Type )
15546 { 15551 {
15547 if ( (signed int)v21->pMonsterInfo.uRecoveryTime <= 0 ) 15552 if ( (signed int)v21->pMonsterInfo.uRecoveryTime <= 0 )
15548 { 15553 {
15549 Actor::_403476(actor_id, target_pid, &pDir); 15554 Actor::MissileAttack1(actor_id, target_pid, &pDir);
15550 } 15555 }
15551 else if ( v21->pMonsterInfo.uMovementType == 5 ) 15556 else if ( v21->pMonsterInfo.uMovementType == 5 )
15552 { 15557 {
15553 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333; 15558 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333;
15554 v64 = (signed __int64)v47; 15559 v64 = (signed __int64)v47;
15555 Actor::AI_Stand(actor_id, target_pid, v64, &pDir); 15560 Actor::AI_Stand(actor_id, target_pid, v64, &pDir);
15556 } 15561 }
15557 else 15562 else
15558 { 15563 {
15559 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333; 15564 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333;
15560 if ( !(v54 | v55) ) 15565 if ( v80 * 307.2 > (double)v81 )
15561 { 15566 {
15562 v64 = (signed __int64)v47; 15567 v64 = (signed __int64)v47;
15563 Actor::AI_Stand(actor_id, target_pid, v64, &pDir); 15568 Actor::AI_Stand(actor_id, target_pid, v64, &pDir);
15564 continue;
15565 } 15569 }
15566 Actor::_402AD7(actor_id, target_pid, actor_id, (signed __int64)v47, &pDir); 15570 else
15571 {
15572 Actor::Pursue1(actor_id, target_pid, actor_id, (signed __int64)v47, &pDir);
15573 }
15567 } 15574 }
15568 } 15575 }
15569 else 15576 else
15570 { 15577 {
15571 v56 = v80 * 307.2; 15578 if ( (double)v81 >= v80 * 307.2 )
15572 if ( (double)v81 >= v56 )
15573 { 15579 {
15574 if ( v81 >= 1024 ) 15580 if ( v81 >= 1024 )
15575 { 15581 {
15576 if ( v21->pMonsterInfo.uMovementType == 5 ) 15582 if ( v21->pMonsterInfo.uMovementType == 5 )
15577 { 15583 {
15580 Actor::AI_Stand(actor_id, target_pid, v64, &pDir); 15586 Actor::AI_Stand(actor_id, target_pid, v64, &pDir);
15581 } 15587 }
15582 else 15588 else
15583 { 15589 {
15584 //monsters 15590 //monsters
15585 Actor::_402686(actor_id, target_pid, 0, &pDir); 15591 Actor::Pursue3(actor_id, target_pid, 0, &pDir);
15586 } 15592 }
15587 } 15593 }
15588 else if ( v21->pMonsterInfo.uMovementType == 5 ) 15594 else if ( v21->pMonsterInfo.uMovementType == 5 )
15589 { 15595 {
15590 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333; 15596 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333;
15591 v64 = (signed __int64)v47; 15597 v64 = (signed __int64)v47;
15592 Actor::AI_Stand(actor_id, target_pid, v64, &pDir); 15598 Actor::AI_Stand(actor_id, target_pid, v64, &pDir);
15593 } 15599 }
15594 else 15600 else
15595 { 15601 {
15596 v70 = (signed __int64)v56; 15602 v70 = (signed __int64)v80 * 307.2;
15597 //monsters 15603 //monsters
15598 //guard after player runs away 15604 //guard after player runs away
15599 // follow player 15605 // follow player
15600 Actor::_40281C(actor_id, target_pid, 0, &pDir, v70); 15606 Actor::Pursue2(actor_id, target_pid, 0, &pDir, v70);
15601 } 15607 }
15602 } 15608 }
15603 else if ( (signed int)v21->pMonsterInfo.uRecoveryTime > 0 ) 15609 else if ( (signed int)v21->pMonsterInfo.uRecoveryTime > 0 )
15604 { 15610 {
15605 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333; 15611 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333;
15607 Actor::AI_Stand(actor_id, target_pid, v64, &pDir); 15613 Actor::AI_Stand(actor_id, target_pid, v64, &pDir);
15608 } 15614 }
15609 else 15615 else
15610 { 15616 {
15611 //monsters 15617 //monsters
15612 Actor::_403C6C(actor_id, target_pid, &pDir); 15618 Actor::MeleeAttack(actor_id, target_pid, &pDir);
15613 } 15619 }
15614 } 15620 }
15615 continue; 15621 continue;
15616 } 15622 }
15617 else if ( v45 == 2 || v45 == 3 ) 15623 else if ( v45 == 2 || v45 == 3 )
15623 if ( v46 ) 15629 if ( v46 )
15624 { 15630 {
15625 if ( (signed int)v21->pMonsterInfo.uRecoveryTime <= 0 ) 15631 if ( (signed int)v21->pMonsterInfo.uRecoveryTime <= 0 )
15626 { 15632 {
15627 if ( v45 == 2 ) 15633 if ( v45 == 2 )
15628 Actor::_403854(actor_id, target_pid, &pDir); 15634 Actor::SpellAttack1(actor_id, target_pid, &pDir);
15629 else 15635 else
15630 Actor::_403A60(actor_id, target_pid, &pDir); 15636 Actor::SpellAttack2(actor_id, target_pid, &pDir);
15631 } 15637 }
15632 else if ( v80 * 307.2 > (double)v81 || v21->pMonsterInfo.uMovementType == 5 ) 15638 else if ( v80 * 307.2 > (double)v81 || v21->pMonsterInfo.uMovementType == 5 )
15633 { 15639 {
15634 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333; 15640 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333;
15635 v64 = (signed __int64)v47; 15641 v64 = (signed __int64)v47;
15636 Actor::AI_Stand(actor_id, target_pid, v64, &pDir); 15642 Actor::AI_Stand(actor_id, target_pid, v64, &pDir);
15637 } 15643 }
15638 else 15644 else
15639 { 15645 {
15640 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333; 15646 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333;
15641 Actor::_402AD7(actor_id, target_pid, actor_id, (signed __int64)v47, &pDir); 15647 Actor::Pursue1(actor_id, target_pid, actor_id, (signed __int64)v47, &pDir);
15642 } 15648 }
15643 } 15649 }
15644 else 15650 else
15645 { 15651 {
15646 v48 = v80 * 307.2; 15652 if ( (double)v81 >= v80 * 307.2 )
15647 if ( (double)v81 >= v48 )
15648 { 15653 {
15649 if ( v81 >= 1024 ) 15654 if ( v81 >= 1024 )
15650 { 15655 {
15651 if ( v21->pMonsterInfo.uMovementType == 5 ) 15656 if ( v21->pMonsterInfo.uMovementType == 5 )
15652 { 15657 {
15654 v64 = (signed __int64)v47; 15659 v64 = (signed __int64)v47;
15655 Actor::AI_Stand(actor_id, target_pid, v64, &pDir); 15660 Actor::AI_Stand(actor_id, target_pid, v64, &pDir);
15656 } 15661 }
15657 else 15662 else
15658 { 15663 {
15659 Actor::_402686(actor_id, target_pid, 256, &pDir); 15664 Actor::Pursue3(actor_id, target_pid, 256, &pDir);
15660 } 15665 }
15661 } 15666 }
15662 else if ( v21->pMonsterInfo.uMovementType == 5 ) 15667 else if ( v21->pMonsterInfo.uMovementType == 5 )
15663 { 15668 {
15664 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333; 15669 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333;
15665 v64 = (signed __int64)v47; 15670 v64 = (signed __int64)v47;
15666 Actor::AI_Stand(actor_id, target_pid, v64, &pDir); 15671 Actor::AI_Stand(actor_id, target_pid, v64, &pDir);
15667 } 15672 }
15668 else 15673 else
15669 { 15674 {
15670 v70 = (signed __int64)v48; 15675 v70 = (signed __int64)v80 * 307.2;
15671 Actor::_40281C(actor_id, target_pid, 0, &pDir, v70); 15676 Actor::Pursue2(actor_id, target_pid, 0, &pDir, v70);
15672 } 15677 }
15673 } 15678 }
15674 else if ( (signed int)v21->pMonsterInfo.uRecoveryTime > 0 ) 15679 else if ( (signed int)v21->pMonsterInfo.uRecoveryTime > 0 )
15675 { 15680 {
15676 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333; 15681 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333;
15677 v64 = (signed __int64)v47; 15682 v64 = (signed __int64)v47;
15678 Actor::AI_Stand(actor_id, target_pid, v64, &pDir); 15683 Actor::AI_Stand(actor_id, target_pid, v64, &pDir);
15679 } 15684 }
15680 else 15685 else
15681 { 15686 {
15682 Actor::_403C6C(actor_id, target_pid, &pDir); 15687 Actor::MeleeAttack(actor_id, target_pid, &pDir);
15683 } 15688 }
15684 } 15689 }
15685 continue; 15690 continue;
15686 } 15691 }
15687 } 15692 }
15715 Actor::AI_Stand(actor_id, 4, v64, &pDir); 15720 Actor::AI_Stand(actor_id, 4, v64, &pDir);
15716 } 15721 }
15717 } 15722 }
15718 else if ( !v21->pMonsterInfo.uMissleAttack2Type ) 15723 else if ( !v21->pMonsterInfo.uMissleAttack2Type )
15719 { 15724 {
15720 v56 = v80 * 307.2; 15725 if ( (double)v81 >= v80 * 307.2 )
15721 if ( (double)v81 >= v56 )
15722 { 15726 {
15723 if ( v81 >= 1024 ) 15727 if ( v81 >= 1024 )
15724 { 15728 {
15725 if ( v21->pMonsterInfo.uMovementType == 5 ) 15729 if ( v21->pMonsterInfo.uMovementType == 5 )
15726 { 15730 {
15728 v64 = (signed __int64)v47; 15732 v64 = (signed __int64)v47;
15729 Actor::AI_Stand(actor_id, target_pid, v64, &pDir); 15733 Actor::AI_Stand(actor_id, target_pid, v64, &pDir);
15730 } 15734 }
15731 else 15735 else
15732 { 15736 {
15733 Actor::_402686(actor_id, target_pid, 256, &pDir); 15737 Actor::Pursue3(actor_id, target_pid, 256, &pDir);
15734 } 15738 }
15735 } 15739 }
15736 else if ( v21->pMonsterInfo.uMovementType == 5 ) 15740 else if ( v21->pMonsterInfo.uMovementType == 5 )
15737 { 15741 {
15738 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333; 15742 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333;
15739 v64 = (signed __int64)v47; 15743 v64 = (signed __int64)v47;
15740 Actor::AI_Stand(actor_id, target_pid, v64, &pDir); 15744 Actor::AI_Stand(actor_id, target_pid, v64, &pDir);
15741 } 15745 }
15742 else 15746 else
15743 { 15747 {
15744 v70 = (signed __int64)v56; 15748 v70 = (signed __int64)v80 * 307.2;
15745 Actor::_40281C(actor_id, target_pid, 0, &pDir, v70); 15749 Actor::Pursue2(actor_id, target_pid, 0, &pDir, v70);
15746 } 15750 }
15747 } 15751 }
15748 else if ( (signed int)v21->pMonsterInfo.uRecoveryTime > 0 ) 15752 else if ( (signed int)v21->pMonsterInfo.uRecoveryTime > 0 )
15749 { 15753 {
15750 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333; 15754 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333;
15751 v64 = (signed __int64)v47; 15755 v64 = (signed __int64)v47;
15752 Actor::AI_Stand(actor_id, target_pid, v64, &pDir); 15756 Actor::AI_Stand(actor_id, target_pid, v64, &pDir);
15753 } 15757 }
15754 else 15758 else
15755 { 15759 {
15756 Actor::_403C6C(actor_id, target_pid, &pDir); 15760 Actor::MeleeAttack(actor_id, target_pid, &pDir);
15757 } 15761 }
15758 } 15762 }
15759 else if ( (signed int)v21->pMonsterInfo.uRecoveryTime > 0 ) 15763 else if ( (signed int)v21->pMonsterInfo.uRecoveryTime > 0 )
15760 { 15764 {
15761 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333; 15765 v47 = (double)(signed int)v21->pMonsterInfo.uRecoveryTime * 2.133333333333333;
15762 if ( !(v54 | v55) || v21->pMonsterInfo.uMovementType == 5 ) 15766 if ( v80 * 307.2 > (double)v81 || v21->pMonsterInfo.uMovementType == 5 )
15763 { 15767 {
15764 v64 = (signed __int64)v47; 15768 v64 = (signed __int64)v47;
15765 Actor::AI_Stand(actor_id, target_pid, v64, &pDir); 15769 Actor::AI_Stand(actor_id, target_pid, v64, &pDir);
15766 } 15770 }
15767 else 15771 else
15768 { 15772 {
15769 Actor::_402AD7(actor_id, target_pid, actor_id, (signed __int64)v47, &pDir); 15773 Actor::Pursue1(actor_id, target_pid, actor_id, (signed __int64)v47, &pDir);
15770 } 15774 }
15771 } 15775 }
15772 else 15776 else
15773 { 15777 {
15774 Actor::_40368B(actor_id, target_pid, &pDir); 15778 Actor::MissileAttack2(actor_id, target_pid, &pDir);
15775 } 15779 }
15776 } 15780 }
15777 } 15781 }
15778 } 15782 }
15779 15783
15926 } 15930 }
15927 v1->uActorQueueSize = v19; 15931 v1->uActorQueueSize = v19;
15928 result = v1->pQueue[0].uPackedID; 15932 result = v1->pQueue[0].uPackedID;
15929 if ( PID_TYPE(v1->pQueue[0].uPackedID) == OBJECT_Player) 15933 if ( PID_TYPE(v1->pQueue[0].uPackedID) == OBJECT_Player)
15930 { 15934 {
15931 result = (result >> 3) + 1; 15935 result = PID_ID(result) + 1;
15932 uActiveCharacter = result; 15936 uActiveCharacter = result;
15933 v1->field_18 |= 4u; 15937 v1->field_18 |= 4u;
15934 } 15938 }
15935 else 15939 else
15936 { 15940 {
15942 { 15946 {
15943 v17 = v1->pQueue; 15947 v17 = v1->pQueue;
15944 do 15948 do
15945 { 15949 {
15946 if ( PID_TYPE(v17->uPackedID) == OBJECT_Player) 15950 if ( PID_TYPE(v17->uPackedID) == OBJECT_Player)
15947 pParty->pPlayers[v17->uPackedID >> 3].uTimeToRecovery = (signed __int64)((double)v17->field_4 * 0.46875); 15951 pParty->pPlayers[PID_ID(v17->uPackedID)].uTimeToRecovery = (signed __int64)((double)v17->field_4 * 0.46875);
15948 ++v22; 15952 ++v22;
15949 ++v17; 15953 ++v17;
15950 result = v22; 15954 result = v22;
15951 } 15955 }
15952 while ( v22 < v1->uActorQueueSize ); 15956 while ( v22 < v1->uActorQueueSize );
16022 v3 = 0; 16026 v3 = 0;
16023 do 16027 do
16024 { 16028 {
16025 if ( v40->CanAct() ) 16029 if ( v40->CanAct() )
16026 { 16030 {
16027 *(&v1->field_0 + 4 * (v1->uActorQueueSize + 2)) = 8 * v3 | OBJECT_Player; 16031 *(&v1->field_0 + 4 * (v1->uActorQueueSize + 2)) = PID(OBJECT_Player,v3);
16028 v1->pQueue[v1->uActorQueueSize].field_C = 2; 16032 v1->pQueue[v1->uActorQueueSize].field_C = 2;
16029 v1->pQueue[v1->uActorQueueSize].uActionLength = 0; 16033 v1->pQueue[v1->uActorQueueSize].uActionLength = 0;
16030 pParty->pTurnBasedPlayerRecoveryTimes[v1->uActorQueueSize++] = 0; 16034 pParty->pTurnBasedPlayerRecoveryTimes[v1->uActorQueueSize++] = 0;
16031 } 16035 }
16032 ++v40; 16036 ++v40;
16052 if ( v7 & 0x8000 < 0 ) 16056 if ( v7 & 0x8000 < 0 )
16053 { 16057 {
16054 v8 = ai_near_actors_targets_pid[v5]; 16058 v8 = ai_near_actors_targets_pid[v5];
16055 LOBYTE(v7) = v7 | 0x80; 16059 LOBYTE(v7) = v7 | 0x80;
16056 v6->uAttributes = v7; 16060 v6->uAttributes = v7;
16057 v33 = 8 * v5 | OBJECT_Actor; 16061 v33 = PID(OBJECT_Actor,v5);
16058 memcpy(&v31, Actor::GetDirectionInfo(8 * v5 | OBJECT_Actor, v8, &a3, 0), sizeof(v31)); 16062 memcpy(&v31, Actor::GetDirectionInfo(PID(OBJECT_Actor,v5), v8, &a3, 0), sizeof(v31));
16059 memcpy(&v30, &v31, sizeof(v30)); 16063 memcpy(&v30, &v31, sizeof(v30));
16060 Actor::AI_StandOrBored(v37, 4, 32, &v30); 16064 Actor::AI_StandOrBored(v37, 4, 32, &v30);
16061 *(&v1->field_0 + 4 * (v1->uActorQueueSize + 2)) = v33; 16065 *(&v1->field_0 + 4 * (v1->uActorQueueSize + 2)) = v33;
16062 v1->pQueue[v1->uActorQueueSize].field_C = 2; 16066 v1->pQueue[v1->uActorQueueSize].field_C = 2;
16063 v1->pQueue[v1->uActorQueueSize++].uActionLength = 0; 16067 v1->pQueue[v1->uActorQueueSize++].uActionLength = 0;