Mercurial > mm7
comparison Outdoor.cpp @ 2148:af349bd395ff
ODM_ProcessPartyActions continue
author | Ritor1 |
---|---|
date | Tue, 07 Jan 2014 22:15:45 +0600 |
parents | 4393b60cd9e2 |
children | d44b7775fc06 |
comparison
equal
deleted
inserted
replaced
2147:4393b60cd9e2 | 2148:af349bd395ff |
---|---|
3660 unsigned int v76; // edi@293 | 3660 unsigned int v76; // edi@293 |
3661 bool v77; // edx@297 | 3661 bool v77; // edx@297 |
3662 bool v78; // ecx@303 | 3662 bool v78; // ecx@303 |
3663 int v79; // ecx@314 | 3663 int v79; // ecx@314 |
3664 __int16 v80; // dx@317 | 3664 __int16 v80; // dx@317 |
3665 int v81; // ebx@318 | 3665 //int v81; // ebx@318 |
3666 int v82; // ecx@318 | 3666 //int v82; // ecx@318 |
3667 int pTerrainHeight; // eax@321 | 3667 int pTerrainHeight; // eax@321 |
3668 int v86; // [sp-20h] [bp-B4h]@246 | 3668 int v86; // [sp-20h] [bp-B4h]@246 |
3669 int v87; // [sp-20h] [bp-B4h]@248 | 3669 int v87; // [sp-20h] [bp-B4h]@248 |
3670 signed int v88; // [sp-1Ch] [bp-B0h]@246 | 3670 signed int v88; // [sp-1Ch] [bp-B0h]@246 |
3671 unsigned int v89; // [sp-18h] [bp-ACh]@246 | 3671 unsigned int v89; // [sp-18h] [bp-ACh]@246 |
3676 int v96; // [sp-4h] [bp-98h]@246 | 3676 int v96; // [sp-4h] [bp-98h]@246 |
3677 int v97; // [sp+Ch] [bp-88h]@180 | 3677 int v97; // [sp+Ch] [bp-88h]@180 |
3678 Vec3_int_ v98; | 3678 Vec3_int_ v98; |
3679 bool high_fall_flag; // [sp+1Ch] [bp-78h]@33 | 3679 bool high_fall_flag; // [sp+1Ch] [bp-78h]@33 |
3680 int v102; // [sp+20h] [bp-74h]@1 | 3680 int v102; // [sp+20h] [bp-74h]@1 |
3681 int v103; // [sp+24h] [bp-70h]@1 | 3681 int trigger_id; // [sp+24h] [bp-70h]@1 |
3682 bool bFeatherFall; // [sp+28h] [bp-6Ch]@4 | 3682 bool bFeatherFall; // [sp+28h] [bp-6Ch]@4 |
3683 int v105; // [sp+2Ch] [bp-68h]@24 | 3683 int bonus; |
3684 int on_ground; // [sp+2Ch] [bp-68h]@24 | |
3684 bool bWaterWalk; // [sp+30h] [bp-64h]@1 | 3685 bool bWaterWalk; // [sp+30h] [bp-64h]@1 |
3685 int ceiling_height; // [sp+3Ch] [bp-58h]@28 | 3686 int ceiling_height; // [sp+3Ch] [bp-58h]@28 |
3686 int v110; // [sp+40h] [bp-54h]@180 | 3687 int v110; // [sp+40h] [bp-54h]@180 |
3687 int v111; // [sp+44h] [bp-50h]@14 | 3688 int v111; // [sp+44h] [bp-50h]@14 |
3688 bool hovering; // [sp+48h] [bp-4Ch]@1 | 3689 bool hovering; // [sp+48h] [bp-4Ch]@1 |
3699 int _angle_y; // [sp+7Ch] [bp-18h]@48 | 3700 int _angle_y; // [sp+7Ch] [bp-18h]@48 |
3700 int v128; // [sp+88h] [bp-Ch]@1 | 3701 int v128; // [sp+88h] [bp-Ch]@1 |
3701 int v129; // [sp+8Ch] [bp-8h]@92 | 3702 int v129; // [sp+8Ch] [bp-8h]@92 |
3702 | 3703 |
3703 v1 = 0; | 3704 v1 = 0; |
3704 v103 = 0; | 3705 trigger_id = 0; |
3705 v2 = 0; | 3706 v2 = 0; |
3706 //*(float *)&v128 = 0.0; | 3707 //*(float *)&v128 = 0.0; |
3707 v128 = 0; | 3708 v128 = 0; |
3708 v129 = 0; | 3709 v129 = 0; |
3709 pX = pParty->vPosition.x; | 3710 pX = pParty->vPosition.x; |
3763 { | 3764 { |
3764 if ( !pParty->pPlayers[i].HasEnchantedItemEquipped(72) && !pParty->pPlayers[i].WearsItem(ITEM_ARTIFACT_HERMES_SANDALS, EQUIP_BOOTS) ) | 3765 if ( !pParty->pPlayers[i].HasEnchantedItemEquipped(72) && !pParty->pPlayers[i].WearsItem(ITEM_ARTIFACT_HERMES_SANDALS, EQUIP_BOOTS) ) |
3765 { | 3766 { |
3766 pParty->pPlayers[i].ReceiveDamage( | 3767 pParty->pPlayers[i].ReceiveDamage( |
3767 (signed int)((pParty->uFallStartY - pZ) * (unsigned __int64)(pParty->pPlayers[i].GetMaxHealth() / 10)) / 256, DMGT_PHISYCAL); | 3768 (signed int)((pParty->uFallStartY - pZ) * (unsigned __int64)(pParty->pPlayers[i].GetMaxHealth() / 10)) / 256, DMGT_PHISYCAL); |
3768 v105 = 20 - pParty->pPlayers[i].GetParameterBonus(pParty->pPlayers[i].GetActualEndurance()); | 3769 bonus = 20 - pParty->pPlayers[i].GetParameterBonus(pParty->pPlayers[i].GetActualEndurance()); |
3769 pParty->pPlayers[i].SetRecoveryTime((signed __int64)((double)v105 * flt_6BE3A4_debug_recmod1 * 2.133333333333333)); | 3770 pParty->pPlayers[i].SetRecoveryTime((signed __int64)((double)bonus * flt_6BE3A4_debug_recmod1 * 2.133333333333333)); |
3770 } | 3771 } |
3771 } | 3772 } |
3772 } | 3773 } |
3773 | 3774 |
3774 ceiling_height = -1; | 3775 ceiling_height = -1; |
3775 if ( pParty->bFlying ) | 3776 if ( pParty->bFlying ) |
3776 ceiling_height = GetCeilingHeight(pX, pY, pZ + pParty->uPartyHeight, (int)&v102);//высота потолка | 3777 ceiling_height = GetCeilingHeight(pX, pY, pZ + pParty->uPartyHeight, (int)&v102);//высота потолка |
3777 //v107 = bmodel_standing_on_pid == 0; | 3778 //v107 = bmodel_standing_on_pid == 0; |
3778 v105 = v111 + 1; | 3779 on_ground = v111 + 1; |
3779 if ( pZ <= v111 + 1 ) | 3780 if ( pZ <= on_ground )//полёт: посадка |
3780 { | 3781 { |
3781 ceiling_height = -1; | 3782 ceiling_height = -1; |
3782 pParty->bFlying = false; | 3783 pParty->bFlying = false; |
3783 } | 3784 } |
3784 else | 3785 else |
3791 pParty->walk_sound_timer -= pEventTimer->uTimeElapsed; | 3792 pParty->walk_sound_timer -= pEventTimer->uTimeElapsed; |
3792 else | 3793 else |
3793 pParty->walk_sound_timer = 0; | 3794 pParty->walk_sound_timer = 0; |
3794 } | 3795 } |
3795 | 3796 |
3796 if (!bUnderwater && pParty->pPartyBuffs[PARTY_BUFF_FLY].uExpireTime <= 0) | 3797 if (!bUnderwater && pParty->pPartyBuffs[PARTY_BUFF_FLY].uExpireTime <= 0)// конец действия полёта |
3797 pParty->bFlying = false; | 3798 pParty->bFlying = false; |
3798 if (!hovering) | 3799 |
3800 if (!hovering)// | |
3799 { | 3801 { |
3800 if ( pParty->floor_face_pid != PID(OBJECT_BModel, bmodel_standing_on_pid) ) | 3802 if ( pParty->floor_face_pid != PID(OBJECT_BModel, bmodel_standing_on_pid) ) |
3801 { | 3803 { |
3802 if (bmodel_standing_on_pid) | 3804 if (bmodel_standing_on_pid) |
3803 { | 3805 { |
3811 v103 = *(short *)(v7->pFacePlane.vNormal.x + 308 * v6 + 292); | 3813 v103 = *(short *)(v7->pFacePlane.vNormal.x + 308 * v6 + 292); |
3812 }*/ | 3814 }*/ |
3813 if ( face[v6].uAttributes & FACE_PRESSURE_PLATE ) | 3815 if ( face[v6].uAttributes & FACE_PRESSURE_PLATE ) |
3814 { | 3816 { |
3815 pParty->floor_face_pid = PID(OBJECT_BModel, bmodel_standing_on_pid); | 3817 pParty->floor_face_pid = PID(OBJECT_BModel, bmodel_standing_on_pid); |
3816 v103 = face[v6].sCogTriggeredID; // | 3818 trigger_id = face[v6].sCogTriggeredID; // |
3817 } | 3819 } |
3818 } | 3820 } |
3819 } | 3821 } |
3820 } | 3822 } |
3821 pParty->floor_face_pid = PID(OBJECT_BModel, bmodel_standing_on_pid); | 3823 pParty->floor_face_pid = PID(OBJECT_BModel, bmodel_standing_on_pid); |
3822 } | 3824 } |
3825 | |
3823 _walk_speed = pParty->uWalkSpeed; | 3826 _walk_speed = pParty->uWalkSpeed; |
3824 _angle_y = pParty->sRotationY; | 3827 _angle_y = pParty->sRotationY; |
3825 _angle_x = pParty->sRotationX; | 3828 _angle_x = pParty->sRotationX; |
3826 //v126 = pEventTimer->dt_in_some_format; | 3829 //v126 = pEventTimer->dt_in_some_format; |
3827 /*v119 = (Player **)((unsigned __int64)(pEventTimer->dt_in_some_format | 3830 /*v119 = (Player **)((unsigned __int64)(pEventTimer->dt_in_some_format |
4133 v129 = (unsigned __int64)(4i64 * stru_5C6E00->Cos(GetTickCount())) >> 16; | 4136 v129 = (unsigned __int64)(4i64 * stru_5C6E00->Cos(GetTickCount())) >> 16; |
4134 pZ = v113 + v129; | 4137 pZ = v113 + v129; |
4135 if ( pModel ) | 4138 if ( pModel ) |
4136 pZ = v113; | 4139 pZ = v113; |
4137 if (pParty->FlyActive()) | 4140 if (pParty->FlyActive()) |
4138 stru_5E4C90_MapPersistVars._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uOverlayID + 119] &= 0xFEu; | 4141 stru_5E4C90_MapPersistVars._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uOverlayID + 119] &= 0xFE; |
4139 pParty->uFallStartY = pZ; | 4142 pParty->uFallStartY = pZ; |
4140 } | 4143 } |
4141 else | 4144 else |
4142 { | 4145 { |
4143 if ( is_on_water && pParty->uFallSpeed ) | 4146 if ( is_on_water && pParty->uFallSpeed ) |
4145 pParty->uFallSpeed = 0; | 4148 pParty->uFallSpeed = 0; |
4146 pZ = v111; | 4149 pZ = v111; |
4147 pParty->uFallStartY = v111; | 4150 pParty->uFallStartY = v111; |
4148 v113 = pZ; | 4151 v113 = pZ; |
4149 if (pParty->FlyActive()) | 4152 if (pParty->FlyActive()) |
4150 stru_5E4C90_MapPersistVars._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uOverlayID + 119] |= 1u; | 4153 stru_5E4C90_MapPersistVars._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uOverlayID + 119] |= 1; |
4151 } | 4154 } |
4152 } | 4155 } |
4153 else | 4156 else |
4154 { | 4157 { |
4155 v113 = pZ; | 4158 v113 = pZ; |
4156 if (pParty->FlyActive()) | 4159 if (pParty->FlyActive()) |
4157 stru_5E4C90_MapPersistVars._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uOverlayID + 119] |= 1u; | 4160 stru_5E4C90_MapPersistVars._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uOverlayID + 119] |= 1; |
4158 } | 4161 } |
4159 //LABEL_141: | 4162 |
4160 if (hovering && !pParty->bFlying)//расчёт скорости падения | 4163 if (hovering && !pParty->bFlying)//расчёт скорости падения |
4161 { | 4164 { |
4162 v33 = -(pEventTimer->uTimeElapsed * GetGravityStrength()); | 4165 v33 = -(pEventTimer->uTimeElapsed * GetGravityStrength()); |
4163 v34 = pParty->uFallSpeed + 2 * v33; | 4166 v34 = pParty->uFallSpeed + 2 * v33; |
4164 pParty->uFallSpeed += 2 * v33; | 4167 pParty->uFallSpeed += 2 * v33; |
4166 else if (!partyAtHighSlope) | 4169 else if (!partyAtHighSlope) |
4167 v34 = pParty->uFallSpeed; | 4170 v34 = pParty->uFallSpeed; |
4168 else if (!hovering) | 4171 else if (!hovering) |
4169 { | 4172 { |
4170 if ( !bmodel_standing_on_pid ) | 4173 if ( !bmodel_standing_on_pid ) |
4171 { | 4174 { |
4172 // rolling down the hill | 4175 // rolling down the hill |
4173 // how it's done: you get a little bit pushed in the air along terrain normal, getting in the air | 4176 // how it's done: you get a little bit pushed in the air along terrain normal, getting in the air |
4174 // and falling to the gravity, gradually sliding downwards. nice trick | 4177 // and falling to the gravity, gradually sliding downwards. nice trick |
4175 pZ = v111; | 4178 pZ = v111; |
4176 ODM_GetTerrainNormalAt(pX, pY, &v98); | 4179 ODM_GetTerrainNormalAt(pX, pY, &v98); |
4177 v35 = pParty->uFallSpeed + (8 * -((pEventTimer->uTimeElapsed - 4) * GetGravityStrength())); | 4180 v35 = pParty->uFallSpeed + (8 * -(pEventTimer->uTimeElapsed * GetGravityStrength())); |
4178 v129 = abs(v2 * v98.x + v1 * v98.y + v35 * v98.z) >> 16; | 4181 v129 = abs(v2 * v98.x + v1 * v98.y + v35 * v98.z) >> 16; |
4179 v2 += (unsigned __int64)(v129 * (signed __int64)v98.x) >> 16; | 4182 v2 += (unsigned __int64)(v129 * (signed __int64)v98.x) >> 16; |
4180 v1 += (unsigned __int64)(v129 * (signed __int64)v98.y) >> 16; | 4183 v1 += (unsigned __int64)(v129 * (signed __int64)v98.y) >> 16; |
4181 v34 = v35 + ((unsigned __int64)(v129 * (signed __int64)v98.z) >> 16); | 4184 v34 = v35 + ((unsigned __int64)(v129 * (signed __int64)v98.z) >> 16); |
4182 v128 = v1; | 4185 v128 = v1; |
4183 pParty->uFallSpeed = v34; | 4186 pParty->uFallSpeed = v34; |
4184 } | 4187 } |
4185 } | 4188 } |
4186 else | 4189 else |
4187 v34 = pParty->uFallSpeed; | 4190 v34 = pParty->uFallSpeed; |
4188 | 4191 |
4189 //LABEL_164: | |
4190 if ( hovering ) | 4192 if ( hovering ) |
4191 { | 4193 { |
4192 if ( !bUnderwater && v34 <= 0) | 4194 if ( !bUnderwater && v34 <= 0) |
4193 { | 4195 { |
4194 if ( v34 < -500 && !pParty->bFlying && pParty->vPosition.z - v111 > 1000 && !pParty->FeatherFallActive()) | 4196 if ( v34 < -500 && !pParty->bFlying && pParty->vPosition.z - v111 > 1000 && !pParty->FeatherFallActive()) |
4363 *(float *)&v128 = 0.0; | 4365 *(float *)&v128 = 0.0; |
4364 } | 4366 } |
4365 if ( pParty->floor_face_pid != v45 && pODMFace->Pressure_Plate() ) | 4367 if ( pParty->floor_face_pid != v45 && pODMFace->Pressure_Plate() ) |
4366 { | 4368 { |
4367 pParty->floor_face_pid = v45; | 4369 pParty->floor_face_pid = v45; |
4368 v103 = pODMFace->sCogTriggeredID; // | 4370 trigger_id = pODMFace->sCogTriggeredID; // |
4369 } | 4371 } |
4370 v2 = (unsigned __int64)(58500i64 * v2) >> 16; | 4372 v2 = (unsigned __int64)(58500i64 * v2) >> 16; |
4371 pModel = (BSPModel *)58500; | 4373 pModel = (BSPModel *)58500; |
4372 v128 = (unsigned __int64)(58500i64 * v128) >> 16; | 4374 v128 = (unsigned __int64)(58500i64 * v128) >> 16; |
4373 v122 = (unsigned __int64)(58500i64 * pParty->uFallSpeed) >> 16; | 4375 v122 = (unsigned __int64)(58500i64 * pParty->uFallSpeed) >> 16; |
4399 pZ = v122 + (pODMFace->pFacePlane.vNormal.z * v55 >> 16); | 4401 pZ = v122 + (pODMFace->pFacePlane.vNormal.z * v55 >> 16); |
4400 } | 4402 } |
4401 if ( pParty->floor_face_pid != stru_721530.uFaceID && pODMFace->Pressure_Plate() ) | 4403 if ( pParty->floor_face_pid != stru_721530.uFaceID && pODMFace->Pressure_Plate() ) |
4402 { | 4404 { |
4403 pParty->floor_face_pid = stru_721530.uFaceID; | 4405 pParty->floor_face_pid = stru_721530.uFaceID; |
4404 v103 = pODMFace->sCogTriggeredID; // | 4406 trigger_id = pODMFace->sCogTriggeredID; // |
4405 } | 4407 } |
4406 v2 = (unsigned __int64)(58500i64 * v2) >> 16; | 4408 v2 = (unsigned __int64)(58500i64 * v2) >> 16; |
4407 pModel = (BSPModel *)58500; | 4409 pModel = (BSPModel *)58500; |
4408 v128 = (unsigned __int64)(58500i64 * v128) >> 16; | 4410 v128 = (unsigned __int64)(58500i64 * v128) >> 16; |
4409 v122 = (unsigned __int64)(58500i64 * pParty->uFallSpeed) >> 16; | 4411 v122 = (unsigned __int64)(58500i64 * pParty->uFallSpeed) >> 16; |
4420 if ( v2 * v2 + v128 * v128 >= 400 ) | 4422 if ( v2 * v2 + v128 * v128 >= 400 ) |
4421 { | 4423 { |
4422 if ( pParty->floor_face_pid != stru_721530.uFaceID && pODMFace->Pressure_Plate() ) | 4424 if ( pParty->floor_face_pid != stru_721530.uFaceID && pODMFace->Pressure_Plate() ) |
4423 { | 4425 { |
4424 pParty->floor_face_pid = stru_721530.uFaceID; | 4426 pParty->floor_face_pid = stru_721530.uFaceID; |
4425 v103 = pODMFace->sCogTriggeredID; // | 4427 trigger_id = pODMFace->sCogTriggeredID; // |
4426 } | 4428 } |
4427 v2 = (unsigned __int64)(58500i64 * v2) >> 16; | 4429 v2 = (unsigned __int64)(58500i64 * v2) >> 16; |
4428 pModel = (BSPModel *)58500; | 4430 pModel = (BSPModel *)58500; |
4429 v128 = (unsigned __int64)(58500i64 * v128) >> 16; | 4431 v128 = (unsigned __int64)(58500i64 * v128) >> 16; |
4430 v122 = (unsigned __int64)(58500i64 * pParty->uFallSpeed) >> 16; | 4432 v122 = (unsigned __int64)(58500i64 * pParty->uFallSpeed) >> 16; |
4511 { | 4513 { |
4512 pZ = 8160; | 4514 pZ = 8160; |
4513 pParty->uFallStartY = 8160; | 4515 pParty->uFallStartY = 8160; |
4514 pParty->vPosition.z = 8160; | 4516 pParty->vPosition.z = 8160; |
4515 } | 4517 } |
4516 if ( !v103 //падение на землю | 4518 if ( !trigger_id //падение на землю |
4517 || (EventProcessor(v103, 0, 1), pParty->vPosition.x == pX) | 4519 || (EventProcessor(trigger_id, 0, 1), |
4520 pParty->vPosition.x == pX) | |
4518 && pParty->vPosition.y == pY | 4521 && pParty->vPosition.y == pY |
4519 && pParty->vPosition.z == pZ ) | 4522 && pParty->vPosition.z == pZ ) |
4520 { | 4523 { |
4521 if ( pParty->vPosition.z < v111 ) | 4524 if ( pParty->vPosition.z < v111 ) |
4522 { | 4525 { |
4523 pParty->uFallSpeed = 0; | 4526 pParty->uFallSpeed = 0; |
4524 //v73 = v105; | 4527 //v73 = v105; |
4525 pParty->vPosition.z = v105; | 4528 pParty->vPosition.z = on_ground; |
4526 if ( pParty->uFallStartY - pZ > 512 && !bFeatherFall && pZ <= v105 && !bUnderwater )//Fall to the ground(падение на землю с высоты) | 4529 if ( pParty->uFallStartY - pZ > 512 && !bFeatherFall && pZ <= on_ground && !bUnderwater )//Fall to the ground(падение на землю с высоты) |
4527 { | 4530 { |
4528 if ( pParty->uFlags & PARTY_FLAGS_1_LANDING ) | 4531 if ( pParty->uFlags & PARTY_FLAGS_1_LANDING ) |
4529 { | 4532 { |
4530 pParty->uFlags &= ~PARTY_FLAGS_1_LANDING; | 4533 pParty->uFlags &= ~PARTY_FLAGS_1_LANDING; |
4531 } | 4534 } |
4604 { | 4607 { |
4605 pAudioPlayer->_4AA258(804); | 4608 pAudioPlayer->_4AA258(804); |
4606 pParty->walk_sound_timer = 64; | 4609 pParty->walk_sound_timer = 64; |
4607 } | 4610 } |
4608 | 4611 |
4609 v81 = pZ; | 4612 //v81 = pZ; |
4610 v82 = pZ; | 4613 //v82 = pZ; |
4611 pParty->vPosition.z = pZ; | 4614 pParty->vPosition.z = pZ; |
4612 if ( pZ > 8160 ) | 4615 if ( pZ > 8160 ) |
4613 { | 4616 { |
4614 v82 = 8160; | 4617 //v82 = 8160; |
4615 pParty->uFallStartY = 8160; | 4618 pParty->uFallStartY = 8160; |
4616 pParty->vPosition.z = 8160; | 4619 pParty->vPosition.z = 8160; |
4617 } | 4620 } |
4618 LOWORD(pParty->uFlags) &= 0xFDFBu; | 4621 LOWORD(pParty->uFlags) &= 0xFDFBu; |
4619 //pParty->uFallSpeed = v121; | 4622 //pParty->uFallSpeed = v121; |
4623 pTerrainHeight = GetTerrainHeightsAroundParty2(pParty->vPosition.x, pParty->vPosition.y, &v110, 1); | 4626 pTerrainHeight = GetTerrainHeightsAroundParty2(pParty->vPosition.x, pParty->vPosition.y, &v110, 1); |
4624 if ( pParty->vPosition.z <= pTerrainHeight + 1 )//положение группы всегда +1 | 4627 if ( pParty->vPosition.z <= pTerrainHeight + 1 )//положение группы всегда +1 |
4625 pParty->uFlags |= PARTY_FLAGS_1_WATER_DAMAGE; | 4628 pParty->uFlags |= PARTY_FLAGS_1_WATER_DAMAGE; |
4626 } | 4629 } |
4627 | 4630 |
4628 if ( !v103//падение на воду | 4631 if ( !trigger_id//падение на воду |
4629 || (EventProcessor(v103, 0, 1), pParty->vPosition.x == pX) | 4632 || (EventProcessor(trigger_id, 0, 1), |
4633 pParty->vPosition.x == pX) | |
4630 && pParty->vPosition.y == pY | 4634 && pParty->vPosition.y == pY |
4631 && (v82 = pParty->vPosition.z, pParty->vPosition.z == v81) ) | 4635 && pParty->vPosition.z == pZ ) |
4632 { | 4636 { |
4633 if ( pParty->vPosition.z < v111 ) | 4637 if ( pParty->vPosition.z < v111 ) |
4634 { | 4638 { |
4635 v82 = v105; | 4639 //v82 = on_ground; |
4636 pParty->uFallSpeed = 0; | 4640 pParty->uFallSpeed = 0; |
4637 pParty->vPosition.z = v105; | 4641 pParty->vPosition.z = on_ground; |
4638 if ( pParty->uFallStartY - v81 > 512 && !bFeatherFall && v81 <= v105 && !bUnderwater )//Fall to the water(падение на воду с высоты) | 4642 if ( pParty->uFallStartY - pZ > 512 && !bFeatherFall && pZ <= on_ground && !bUnderwater )//Fall to the water(падение на воду с высоты) |
4639 { | 4643 { |
4640 if ( pParty->uFlags & PARTY_FLAGS_1_LANDING ) | 4644 if ( pParty->uFlags & PARTY_FLAGS_1_LANDING ) |
4641 { | 4645 { |
4642 pParty->uFlags &= ~PARTY_FLAGS_1_LANDING; | 4646 pParty->uFlags &= ~PARTY_FLAGS_1_LANDING; |
4643 } | 4647 } |
4644 else | 4648 else |
4645 { | 4649 { |
4646 for ( uint i = 1; i <= 4; ++i ) | 4650 for ( uint i = 1; i <= 4; ++i ) |
4647 { | 4651 { |
4648 v110 = pPlayers[i]->GetMaxHealth(); | 4652 v110 = pPlayers[i]->GetMaxHealth(); |
4649 pPlayers[i]->ReceiveDamage((signed int)((pParty->uFallStartY - v81) * (unsigned __int64)(signed __int64)((double)v110 * 0.1)) / 256, | 4653 pPlayers[i]->ReceiveDamage((signed int)((pParty->uFallStartY - pZ) * (unsigned __int64)(signed __int64)((double)v110 * 0.1)) / 256, |
4650 DMGT_PHISYCAL); | 4654 DMGT_PHISYCAL); |
4651 v110 = 20 - pPlayers[i]->GetParameterBonus(pPlayers[i]->GetActualEndurance()); | 4655 v110 = 20 - pPlayers[i]->GetParameterBonus(pPlayers[i]->GetActualEndurance()); |
4652 pPlayers[i]->SetRecoveryTime((signed __int64)((double)v110 * flt_6BE3A4_debug_recmod1 * 2.133333333333333)); | 4656 pPlayers[i]->SetRecoveryTime((signed __int64)((double)v110 * flt_6BE3A4_debug_recmod1 * 2.133333333333333)); |
4653 } | 4657 } |
4654 v82 = pParty->vPosition.z; | 4658 //v82 = pParty->vPosition.z; |
4655 } | 4659 } |
4656 } | 4660 } |
4657 pParty->uFallStartY = v81; | 4661 pParty->uFallStartY = pZ; |
4658 } | 4662 } |
4659 if ( v102 && v82 < ceiling_height && (signed int)(pParty->uPartyHeight + v82) >= ceiling_height ) | 4663 if ( v102 && pParty->vPosition.z < ceiling_height && (signed int)(pParty->uPartyHeight + pParty->vPosition.z) >= ceiling_height ) |
4660 { | 4664 { |
4661 pParty->vPosition.z = v82 + pParty->uPartyHeight - ceiling_height + 1; | 4665 pParty->vPosition.z = pParty->vPosition.z + pParty->uPartyHeight - ceiling_height + 1; |
4662 pParty->field_6F0 = v82 + pParty->uPartyHeight - ceiling_height + 1; | 4666 pParty->field_6F0 = pParty->vPosition.z + pParty->uPartyHeight - ceiling_height + 1; |
4663 } | 4667 } |
4664 } | 4668 } |
4665 } | 4669 } |
4666 //----- (0046D8E3) -------------------------------------------------------- | 4670 //----- (0046D8E3) -------------------------------------------------------- |
4667 int GetCeilingHeight(int Party_X, signed int Party_Y, int Party_ZHeight, int pFaceID) | 4671 int GetCeilingHeight(int Party_X, signed int Party_Y, int Party_ZHeight, int pFaceID) |