| 332 | } |
| 333 | |
| 334 | CWound* CEntityCondition::ConditionHit(SHit* pHDS) |
| 335 | { |
| 336 | //кто нанес последний хит |
| 337 | m_pWho = pHDS->who; |
| 338 | m_iWhoID = (NULL != pHDS->who) ? pHDS->who->ID() : 0; |
| 339 | |
| 340 | float hit_power_org = pHDS->damage(); |
| 341 | float hit_power = hit_power_org; |
| 342 | hit_power = HitOutfitEffect(hit_power, pHDS->hit_type, pHDS->boneID, pHDS->ap); |
| 343 | |
| 344 | bool bAddWound = true; |
| 345 | switch (pHDS->hit_type) |
| 346 | { |
| 347 | case ALife::eHitTypeTelepatic: |
| 348 | // ------------------------------------------------- |
| 349 | // temp (till there is no death from psy hits) |
| 350 | hit_power *= m_HitTypeK[pHDS->hit_type]; |
| 351 | /* |
| 352 | m_fHealthLost = hit_power*m_fHealthHitPart*m_fHitBoneScale; |
| 353 | m_fDeltaHealth -= CanBeHarmed() ? m_fHealthLost : 0; |
| 354 | m_fDeltaPower -= hit_power*m_fPowerHitPart; |
| 355 | */ |
| 356 | // ------------------------------------------------- |
| 357 | |
| 358 | // hit_power *= m_HitTypeK[pHDS->hit_type]; |
| 359 | ChangePsyHealth(-hit_power); |
| 360 | bAddWound = false; |
| 361 | break; |
| 362 | /* |
| 363 | case ALife::eHitTypeBurn: |
| 364 | hit_power *= m_HitTypeK[pHDS->hit_type]; |
| 365 | m_fHealthLost = hit_power*m_fHealthHitPart*m_fHitBoneScale; |
| 366 | m_fDeltaHealth -= CanBeHarmed() ? m_fHealthLost : 0; |
| 367 | m_fDeltaPower -= hit_power*m_fPowerHitPart; |
| 368 | bAddWound = false; |
| 369 | break; |
| 370 | dsh: обработка перенесена ниже, вместе с eHitTypeFireWound, что бы работала |
| 371 | секция entity_fire_particles. |
| 372 | */ |
| 373 | case ALife::eHitTypeChemicalBurn: hit_power *= m_HitTypeK[pHDS->hit_type]; break; |
| 374 | case ALife::eHitTypeShock: |
| 375 | hit_power *= m_HitTypeK[pHDS->hit_type]; |
| 376 | m_fHealthLost = hit_power * m_fHealthHitPart[pHDS->hit_type]; |
| 377 | m_fDeltaHealth -= CanBeHarmed() ? m_fHealthLost : 0; |
| 378 | m_fDeltaPower -= hit_power * m_fPowerHitPart; |
| 379 | bAddWound = false; |
| 380 | break; |
| 381 | case ALife::eHitTypeRadiation: |
| 382 | m_fDeltaRadiation += hit_power; |
| 383 | return NULL; |
| 384 | break; |
| 385 | case ALife::eHitTypeExplosion: |
| 386 | case ALife::eHitTypeStrike: |
| 387 | case ALife::eHitTypePhysicStrike: |
| 388 | hit_power *= m_HitTypeK[pHDS->hit_type]; |
| 389 | m_fHealthLost = hit_power * m_fHealthHitPart[pHDS->hit_type]; |
| 390 | m_fDeltaHealth -= CanBeHarmed() ? m_fHealthLost : 0; |
| 391 | m_fDeltaPower -= hit_power * m_fPowerHitPart; |
nothing calls this directly
no test coverage detected