| 203 | GO->PPhysicsShell()->applyImpulse(throw_in_dir, dist * m_fThrowInImpulse * GO->GetMass() / 100.f); |
| 204 | } |
| 205 | void CBaseGraviZone ::AffectThrow(SZoneObjectInfo* O, CPhysicsShellHolder* GO, const Fvector& throw_in_dir, float dist) |
| 206 | { |
| 207 | Fvector position_in_bone_space; |
| 208 | |
| 209 | float power = Power(dist); // Power(GO->Position().distance_to(zone_center)); |
| 210 | float impulse = m_fHitImpulseScale * power * GO->GetMass(); |
| 211 | |
| 212 | // if(fis_zero(dist)) |
| 213 | //{ |
| 214 | // impulse = 0.f; |
| 215 | // throw_in_dir.set(0,1,0); |
| 216 | // } |
| 217 | // else |
| 218 | // throw_in_dir.normalize(); |
| 219 | |
| 220 | //статистика по объекту |
| 221 | O->total_damage += power; |
| 222 | O->hit_num++; |
| 223 | |
| 224 | if (power > 0.01f) |
| 225 | { |
| 226 | m_dwDeltaTime = 0; |
| 227 | position_in_bone_space.set(0.f, 0.f, 0.f); |
| 228 | CreateHit(GO->ID(), ID(), throw_in_dir, power, 0, position_in_bone_space, impulse, m_eHitTypeBlowout); |
| 229 | PlayHitParticles(GO); |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | void CBaseGraviZone ::PlayTeleParticles(CGameObject* pObject) |
| 234 | { |