| 407 | } |
| 408 | |
| 409 | void CPhysicsShellHolder::PHLoadState(IReader& P) |
| 410 | { |
| 411 | // Msg("!!Called [CPhysicsShellHolder::PHLoadState]"); |
| 412 | |
| 413 | // Flags8 lflags; |
| 414 | IKinematics* K = smart_cast<IKinematics*>(Visual()); |
| 415 | // P.r_u8 (lflags.flags); |
| 416 | u64 _low = 0; |
| 417 | u64 _high = 0; |
| 418 | if (K) |
| 419 | { |
| 420 | _low = P.r_u64(); |
| 421 | K->LL_SetBoneRoot(P.r_u16()); |
| 422 | } |
| 423 | else //Скорее всего K есть всегда, но на всякий случай. |
| 424 | { |
| 425 | P.r_u64(); |
| 426 | P.r_u16(); |
| 427 | } |
| 428 | Fvector min = P.r_vec3(); |
| 429 | Fvector max = P.r_vec3(); |
| 430 | |
| 431 | VERIFY(!min.similar(max)); |
| 432 | |
| 433 | u16 bones_number = P.r_u16(); |
| 434 | if (bones_number > 64) |
| 435 | { |
| 436 | Msg("!![CPhysicsShellHolder::PHLoadState] bones_number is [%u]!", bones_number); |
| 437 | _high = P.r_u64(); |
| 438 | } |
| 439 | VisMask _vm(_low, _high); |
| 440 | K->LL_SetBonesVisible(_vm); |
| 441 | |
| 442 | for (u16 i = 0; i < bones_number; i++) |
| 443 | { |
| 444 | SPHNetState state; |
| 445 | state.net_Load(P, min, max); |
| 446 | PHGetSyncItem(i)->set_State(state); |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | bool CPhysicsShellHolder::register_schedule() const { return (b_sheduled); } |
| 451 |
no test coverage detected