| 207 | } |
| 208 | |
| 209 | void CPHDestroyable::NotificatePart(CPHDestroyableNotificate* dn) |
| 210 | { |
| 211 | CPhysicsShell* own_shell = PPhysicsShellHolder()->PPhysicsShell(); |
| 212 | CPhysicsShell* new_shell = dn->PPhysicsShellHolder()->PPhysicsShell(); |
| 213 | IKinematics* own_K = PKinematics(PPhysicsShellHolder()->Visual()); |
| 214 | IKinematics* new_K = PKinematics(dn->PPhysicsShellHolder()->Visual()); |
| 215 | VERIFY(own_K && new_K && own_shell && new_shell); |
| 216 | CInifile* own_ini = own_K->LL_UserData(); |
| 217 | CInifile* new_ini = new_K->LL_UserData(); |
| 218 | ////////////////////////////////////////////////////////////////////////////////// |
| 219 | Fmatrix own_transform; |
| 220 | own_shell->GetGlobalTransformDynamic(&own_transform); |
| 221 | new_shell->SetGlTransformDynamic(own_transform); |
| 222 | //////////////////////////////////////////////////////////// |
| 223 | |
| 224 | //////////////////////////////////////////////////////////////////////////////////// |
| 225 | float random_min = 1.f; |
| 226 | float random_hit_imp = 1.f; |
| 227 | //////////////////////////////////////////////////////////////////////////////////// |
| 228 | u16 ref_bone = own_K->LL_GetBoneRoot(); |
| 229 | |
| 230 | float imp_transition_factor = 1.f; |
| 231 | float lv_transition_factor = 1.f; |
| 232 | float av_transition_factor = 1.f; |
| 233 | //////////////////////////////////////////////////////////////////////////////////// |
| 234 | if (own_ini && own_ini->section_exist("impulse_transition_to_parts")) |
| 235 | { |
| 236 | random_min = own_ini->r_float("impulse_transition_to_parts", "random_min"); |
| 237 | random_hit_imp = own_ini->r_float("impulse_transition_to_parts", "random_hit_imp"); |
| 238 | //////////////////////////////////////////////////////// |
| 239 | if (own_ini->line_exist("impulse_transition_to_parts", "ref_bone")) |
| 240 | ref_bone = own_K->LL_BoneID(own_ini->r_string("impulse_transition_to_parts", "ref_bone")); |
| 241 | imp_transition_factor = own_ini->r_float("impulse_transition_to_parts", "imp_transition_factor"); |
| 242 | lv_transition_factor = own_ini->r_float("impulse_transition_to_parts", "lv_transition_factor"); |
| 243 | av_transition_factor = own_ini->r_float("impulse_transition_to_parts", "av_transition_factor"); |
| 244 | |
| 245 | if (own_ini->section_exist("collide_parts")) |
| 246 | { |
| 247 | if (own_ini->line_exist("collide_parts", "small_object")) |
| 248 | { |
| 249 | new_shell->SetSmall(); |
| 250 | } |
| 251 | if (own_ini->line_exist("collide_parts", "ignore_small_objects")) |
| 252 | { |
| 253 | new_shell->SetIgnoreSmall(); |
| 254 | } |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | if (new_ini && new_ini->section_exist("impulse_transition_from_source_bone")) |
| 259 | { |
| 260 | // random_min =new_ini->r_float("impulse_transition_from_source_bone","random_min"); |
| 261 | // random_hit_imp =new_ini->r_float("impulse_transition_from_source_bone","random_hit_imp"); |
| 262 | //////////////////////////////////////////////////////// |
| 263 | if (new_ini->line_exist("impulse_transition_from_source_bone", "ref_bone")) |
| 264 | ref_bone = own_K->LL_BoneID(new_ini->r_string("impulse_transition_from_source_bone", "ref_bone")); |
| 265 | imp_transition_factor = new_ini->r_float("impulse_transition_from_source_bone", "imp_transition_factor"); |
| 266 | lv_transition_factor = new_ini->r_float("impulse_transition_from_source_bone", "lv_transition_factor"); |
nothing calls this directly
no test coverage detected