comparison mm7_3.cpp @ 128:45e18b55ae0c

Слияние
author Ritor1
date Mon, 11 Feb 2013 21:29:01 +0600
parents 48bea61a12a5
children 1c471f3629fb
comparison
equal deleted inserted replaced
127:9daf9c85b0c4 128:45e18b55ae0c
2551 v71 = 1; 2551 v71 = 1;
2552 v81 = pParty->uWalkSpeed; 2552 v81 = pParty->uWalkSpeed;
2553 angle = pParty->sRotationY; 2553 angle = pParty->sRotationY;
2554 _view_angle = pParty->sRotationX; 2554 _view_angle = pParty->sRotationX;
2555 v82 = (unsigned __int64)(pEventTimer->dt_in_some_format 2555 v82 = (unsigned __int64)(pEventTimer->dt_in_some_format
2556 * (signed __int64)((signed int)(pParty->field_20_prolly_turn_speed * stru_5C6E00->uIntegerPi) 2556 * (signed __int64)((signed int)(pParty->y_rotation_speed * stru_5C6E00->uIntegerPi)
2557 / 180)) >> 16; 2557 / 180)) >> 16;
2558 LABEL_87: 2558 LABEL_87:
2559 while ( pPartyActionQueue->uNumActions ) 2559 while ( pPartyActionQueue->uNumActions )
2560 { 2560 {
2561 switch ( pPartyActionQueue->Next() ) 2561 switch ( pPartyActionQueue->Next() )
3000 int v3; // eax@14 3000 int v3; // eax@14
3001 Player **v4; // esi@21 3001 Player **v4; // esi@21
3002 int v5; // eax@24 3002 int v5; // eax@24
3003 int v6; // esi@45 3003 int v6; // esi@45
3004 ODMFace *v7; // ecx@45 3004 ODMFace *v7; // ecx@45
3005 unsigned int v8; // eax@71 3005 //unsigned int v8; // eax@71
3006 double v9; // st7@72 3006 double v9; // st7@72
3007 signed __int64 v10; // qax@74 3007 //signed __int64 v10; // qax@74
3008 double v11; // st7@75 3008 double v11; // st7@75
3009 int v12; // ecx@77 3009 int v12; // ecx@77
3010 int v13; // eax@84 3010 int v13; // eax@84
3011 double v14; // st7@84 3011 double v14; // st7@84
3012 int v15; // eax@87 3012 int v15; // eax@87
3111 unsigned int v114; // [sp+50h] [bp-44h]@1 3111 unsigned int v114; // [sp+50h] [bp-44h]@1
3112 int _walk_speed; // [sp+54h] [bp-40h]@48 3112 int _walk_speed; // [sp+54h] [bp-40h]@48
3113 int v116; // [sp+58h] [bp-3Ch]@1 3113 int v116; // [sp+58h] [bp-3Ch]@1
3114 int v117; // [sp+5Ch] [bp-38h]@1 3114 int v117; // [sp+5Ch] [bp-38h]@1
3115 int v118; // [sp+60h] [bp-34h]@1 3115 int v118; // [sp+60h] [bp-34h]@1
3116 Player **v119; // [sp+64h] [bp-30h]@4 3116 //Player **v119; // [sp+64h] [bp-30h]@4
3117 int _angle_x; // [sp+68h] [bp-2Ch]@48 3117 int _angle_x; // [sp+68h] [bp-2Ch]@48
3118 int v121; // [sp+6Ch] [bp-28h]@1 3118 int v121; // [sp+6Ch] [bp-28h]@1
3119 unsigned int v122; // [sp+70h] [bp-24h]@180 3119 unsigned int v122; // [sp+70h] [bp-24h]@180
3120 int v123; // [sp+74h] [bp-20h]@1 3120 int v123; // [sp+74h] [bp-20h]@1
3121 int v124; // [sp+78h] [bp-1Ch]@1 3121 int v124; // [sp+78h] [bp-1Ch]@1
3142 v124 = 0; 3142 v124 = 0;
3143 v108 = 0; 3143 v108 = 0;
3144 v102 = 0; 3144 v102 = 0;
3145 v127 = 0; 3145 v127 = 0;
3146 bWaterWalk = 0; 3146 bWaterWalk = 0;
3147 if ( SHIDWORD(pParty->pPartyBuffs[5].uExpireTime) < 0 3147 if (!pParty->FeatherFallActive())
3148 || SHIDWORD(pParty->pPartyBuffs[5].uExpireTime) <= 0 && LODWORD(pParty->pPartyBuffs[5].uExpireTime) <= 0 ) 3148 //SHIDWORD(pParty->pPartyBuffs[5].uExpireTime) < 0
3149 //|| SHIDWORD(pParty->pPartyBuffs[5].uExpireTime) <= 0 && LODWORD(pParty->pPartyBuffs[5].uExpireTime) <= 0 )
3149 { 3150 {
3150 bFeatherFall = 0; 3151 bFeatherFall = 0;
3151 v119 = &pPlayers[1]; 3152 /*v119 = &pPlayers[1];
3152 while ( !(*v119)->WearsItem(536, 16) ) 3153 while ( !(*v119)->WearsItem(536, 16) )
3153 { 3154 {
3154 ++v119; 3155 ++v119;
3155 if ( (signed int)v119 > (signed int)&pPlayers[4] ) 3156 if ( (signed int)v119 > (signed int)&pPlayers[4] )
3156 goto LABEL_9; 3157 goto LABEL_9;
3157 } 3158 }*/
3158 } 3159 for (int i = 0; i < 4; ++i)
3159 bFeatherFall = 1; 3160 if (pParty->pPlayers[i].WearsItem(536, 16)) // seems like flying boots
3160 LABEL_9: 3161 {
3161 if ( (signed __int64)pParty->pPartyBuffs[18].uExpireTime <= 0 ) 3162 bFeatherFall = 1;
3162 { 3163 break;
3163 LOBYTE(pParty->uFlags) &= 0x7Fu; 3164 }
3164 } 3165 }
3165 else 3166 // bFeatherFall = 1;
3166 { 3167 //LABEL_9:
3167 LOBYTE(pParty->uFlags) &= 0x7Fu; 3168 LOBYTE(pParty->uFlags) &= 0x7Fu;
3169 if (pParty->WaterWalkActive())
3170 {
3171 //LOBYTE(pParty->uFlags) &= 0x7Fu;
3168 bWaterWalk = 1; 3172 bWaterWalk = 1;
3169 *(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u; 3173 *(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u;
3170 if ( !(pParty->pPartyBuffs[18].uFlags & 1) 3174 if (!(pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uFlags & 1) &&
3171 && pParty->pPlayers[pParty->pPartyBuffs[18].uCaster-1].sMana <= 0 )//*(int *)&pParty->pArtifactsFound[6972 * pParty->pPartyBuffs[18].uCaster + 10] <= 0 ) 3175 pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uCaster-1].sMana <= 0 )//*(int *)&pParty->pArtifactsFound[6972 * pParty->pPartyBuffs[18].uCaster + 10] <= 0 )
3172 bWaterWalk = 0; 3176 bWaterWalk = 0;
3173 } 3177 }
3174 v3 = sub_46D49E_prolly_get_world_y_under_party(v116, v117, v123, pParty->uPartyHeight, &v130, &v108, bWaterWalk); 3178 v3 = sub_46D49E_prolly_get_world_y_under_party(v116, v117, v123, pParty->uPartyHeight, &v130, &v108, bWaterWalk);
3175 v111 = v3; 3179 v111 = v3;
3176 if ( bFeatherFall ) 3180 if ( bFeatherFall )
3252 } 3256 }
3253 _walk_speed = pParty->uWalkSpeed; 3257 _walk_speed = pParty->uWalkSpeed;
3254 _angle_y = pParty->sRotationY; 3258 _angle_y = pParty->sRotationY;
3255 _angle_x = pParty->sRotationX; 3259 _angle_x = pParty->sRotationX;
3256 v126 = pEventTimer->dt_in_some_format; 3260 v126 = pEventTimer->dt_in_some_format;
3257 v119 = (Player **)((unsigned __int64)(pEventTimer->dt_in_some_format 3261 /*v119 = (Player **)((unsigned __int64)(pEventTimer->dt_in_some_format
3258 * (signed __int64)((signed int)(pParty->field_20_prolly_turn_speed 3262 * (signed __int64)((signed int)(pParty->field_20_prolly_turn_speed
3259 * stru_5C6E00->uIntegerPi) 3263 * stru_5C6E00->uIntegerPi)
3260 / 180)) >> 16); 3264 / 180)) >> 16);*/
3265 __int64 dturn = (unsigned __int64)(pEventTimer->dt_in_some_format * (signed __int64)((signed int)(pParty->y_rotation_speed * stru_5C6E00->uIntegerPi) / 180)) >> 16;
3261 LABEL_118: 3266 LABEL_118:
3262 while ( pPartyActionQueue->uNumActions ) 3267 while ( pPartyActionQueue->uNumActions )
3263 { 3268 {
3264 switch ( pPartyActionQueue->Next() ) 3269 switch ( pPartyActionQueue->Next() )
3265 { 3270 {
3324 } 3329 }
3325 } 3330 }
3326 } 3331 }
3327 goto LABEL_118; 3332 goto LABEL_118;
3328 case PARTY_TurnLeft: 3333 case PARTY_TurnLeft:
3329 v8 = uTurnSpeed; 3334 //v8 = uTurnSpeed;
3330 if ( uTurnSpeed ) 3335 if ( uTurnSpeed )
3331 goto LABEL_80; 3336 {
3332 v9 = (double)(signed int)v119 * fTurnSpeedMultiplier; 3337 v12 = uTurnSpeed + _angle_y;
3333 goto LABEL_73; 3338 _angle_y = stru_5C6E00->uDoublePiMask & v12;
3339 }
3340 else
3341 {
3342 v9 = (double)dturn * fTurnSpeedMultiplier;
3343 _angle_y = stru_5C6E00->uDoublePiMask & (_angle_y + (unsigned __int64)(signed __int64)v9);
3344 }
3345 break;
3346
3334 case PARTY_TurnRight: 3347 case PARTY_TurnRight:
3335 LODWORD(v10) = uTurnSpeed; 3348 //LODWORD(v10) = uTurnSpeed;
3336 if ( uTurnSpeed ) 3349 if ( uTurnSpeed )
3337 goto LABEL_77; 3350 {
3338 v11 = (double)(signed int)v119 * fTurnSpeedMultiplier; 3351 v12 = _angle_y - uTurnSpeed;
3339 goto LABEL_76; 3352 _angle_y = stru_5C6E00->uDoublePiMask & v12;
3353 }
3354 else
3355 {
3356 v11 = (double)dturn * fTurnSpeedMultiplier;
3357 v12 = _angle_y - (signed __int64)v11;
3358 _angle_y = stru_5C6E00->uDoublePiMask & v12;
3359 }
3360 break;
3361
3340 case PARTY_FastTurnLeft: 3362 case PARTY_FastTurnLeft:
3341 v8 = uTurnSpeed;
3342 if ( uTurnSpeed ) 3363 if ( uTurnSpeed )
3343 { 3364 {
3344 LABEL_80: 3365 v12 = uTurnSpeed + _angle_y;
3345 v12 = v8 + _angle_y;
3346 LABEL_78:
3347 _angle_y = stru_5C6E00->uDoublePiMask & v12; 3366 _angle_y = stru_5C6E00->uDoublePiMask & v12;
3348 } 3367 }
3349 else 3368 else
3350 { 3369 {
3351 v9 = (fTurnSpeedMultiplier + fTurnSpeedMultiplier) * (double)(signed int)v119; 3370 v9 = (fTurnSpeedMultiplier + fTurnSpeedMultiplier) * (double)dturn;
3352 LABEL_73:
3353 _angle_y = stru_5C6E00->uDoublePiMask & (_angle_y + (unsigned __int64)(signed __int64)v9); 3371 _angle_y = stru_5C6E00->uDoublePiMask & (_angle_y + (unsigned __int64)(signed __int64)v9);
3354 } 3372 }
3355 goto LABEL_118; 3373 break;
3374
3356 case PARTY_FastTurnRight: 3375 case PARTY_FastTurnRight:
3357 LODWORD(v10) = uTurnSpeed;
3358 if ( !uTurnSpeed ) 3376 if ( !uTurnSpeed )
3359 { 3377 {
3360 v11 = (fTurnSpeedMultiplier + fTurnSpeedMultiplier) * (double)(signed int)v119; 3378 v11 = (fTurnSpeedMultiplier + fTurnSpeedMultiplier) * (double)dturn;
3361 LABEL_76: 3379 v12 = _angle_y - (signed __int64)v11;
3362 v10 = (signed __int64)v11; 3380 _angle_y = stru_5C6E00->uDoublePiMask & v12;
3363 } 3381 }
3364 LABEL_77: 3382 else
3365 v12 = _angle_y - v10; 3383 {
3366 goto LABEL_78; 3384 v12 = _angle_y - uTurnSpeed;
3385 _angle_y = stru_5C6E00->uDoublePiMask & v12;
3386 }
3387 break;
3388
3367 case PARTY_StrafeLeft: 3389 case PARTY_StrafeLeft:
3368 v13 = stru_5C6E00->SinCos(_angle_y - stru_5C6E00->uIntegerHalfPi); 3390 v13 = stru_5C6E00->SinCos(_angle_y - stru_5C6E00->uIntegerHalfPi);
3369 v14 = (double)_walk_speed; 3391 v14 = (double)_walk_speed;
3370 v126 = v13; 3392 v126 = v13;
3371 *(float *)&v128 = v14; 3393 *(float *)&v128 = v14;
3688 v40 = ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.field_58.z) >> 16) + v123; 3710 v40 = ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.field_58.z) >> 16) + v123;
3689 } 3711 }
3690 v122 = v40; 3712 v122 = v40;
3691 sub_46D49E_prolly_get_world_y_under_party(_angle_x, _angle_y, v40, pParty->uPartyHeight, &v130, &v108, 0); 3713 sub_46D49E_prolly_get_world_y_under_party(_angle_x, _angle_y, v40, pParty->uPartyHeight, &v130, &v108, 0);
3692 v129 = sub_46D49E_prolly_get_world_y_under_party(_angle_x, v117, v40, pParty->uPartyHeight, &v130, &v97, 0); 3714 v129 = sub_46D49E_prolly_get_world_y_under_party(_angle_x, v117, v40, pParty->uPartyHeight, &v130, &v97, 0);
3693 v119 = (Player **)sub_46D49E_prolly_get_world_y_under_party( 3715 auto v119 = sub_46D49E_prolly_get_world_y_under_party(
3694 v116, 3716 v116,
3695 _angle_y, 3717 _angle_y,
3696 v40, 3718 v40,
3697 pParty->uPartyHeight, 3719 pParty->uPartyHeight,
3698 &v130, 3720 &v130,
3708 v44 = 1; 3730 v44 = 1;
3709 if ( bUnderwater || !v107 ) 3731 if ( bUnderwater || !v107 )
3710 goto LABEL_197; 3732 goto LABEL_197;
3711 if ( v127 && v129 > v123 ) 3733 if ( v127 && v129 > v123 )
3712 v44 = 0; 3734 v44 = 0;
3713 if ( v118 && (signed int)v119 > v123 ) 3735 if ( v118 && v119 > v123 )
3714 v43 = 0; 3736 v43 = 0;
3715 if ( v44 ) 3737 if ( v44 )
3716 goto LABEL_197; 3738 goto LABEL_197;
3717 if ( v43 ) 3739 if ( v43 )
3718 goto LABEL_198; 3740 goto LABEL_198;
3789 v51 = __OFSUB__(v48, 32); 3811 v51 = __OFSUB__(v48, 32);
3790 v49 = v48 == 32; 3812 v49 = v48 == 32;
3791 v50 = v48 - 32 < 0; 3813 v50 = v48 - 32 < 0;
3792 v52 = v47->pFacePlane.vNormal.z; 3814 v52 = v47->pFacePlane.vNormal.z;
3793 v129 = (unsigned __int8)(v50 ^ v51 | v49); 3815 v129 = (unsigned __int8)(v50 ^ v51 | v49);
3794 v119 = (Player **)(v52 < 46378); 3816 v119 = v52 < 46378;
3795 if ( bUnderwater == 1 ) 3817 if ( bUnderwater == 1 )
3796 v119 = 0; 3818 v119 = 0;
3797 v53 = v47->uPolygonType; 3819 v53 = v47->uPolygonType;
3798 if ( v53 == 3 ) 3820 if ( v53 == 3 )
3799 { 3821 {