| 668 | } |
| 669 | |
| 670 | void buildEntityResponse(EntitiesResponse *res,MapClientSession &to_client,EntityUpdateMode mode,bool use_debug) |
| 671 | { |
| 672 | bool is_incremental = mode!=EntityUpdateMode::FULL; |
| 673 | res->blob_of_death.StorePackedBits(1,is_incremental ? 2 : 3); // opcode 3 - full update. |
| 674 | res->blob_of_death.StoreBits(1,res->ent_major_update); // passed to Entity::EntReceive as a parameter |
| 675 | res->is_incremental(is_incremental); // full world update = op 3 |
| 676 | |
| 677 | res->debug_info = use_debug; |
| 678 | storeEntityResponseCommands(res->blob_of_death,res->m_map_time_of_day); |
| 679 | |
| 680 | res->blob_of_death.StoreBits(32,res->abs_time); |
| 681 | //tgt.StoreBits(32,db_time); |
| 682 | bool all_defaults = (use_debug==0) && (res->g_interpolation_level==2) && (res->g_interpolation_bits==1); |
| 683 | res->blob_of_death.StoreBits(1,all_defaults); |
| 684 | if(!all_defaults) |
| 685 | { |
| 686 | res->blob_of_death.StoreBits(1,use_debug); |
| 687 | res->blob_of_death.StoreBits(1,res->g_interpolation_level!=0); |
| 688 | if(res->g_interpolation_level!=0) |
| 689 | { |
| 690 | res->blob_of_death.StoreBits(2,res->g_interpolation_level); |
| 691 | res->blob_of_death.StoreBits(2,res->g_interpolation_bits); |
| 692 | } |
| 693 | } |
| 694 | |
| 695 | storeEntityResponseOtherEntities(res->blob_of_death,to_client.m_current_map->m_entities, &to_client, is_incremental,use_debug); |
| 696 | storeServerPhysicsPositions(res->blob_of_death,to_client.m_ent); |
| 697 | storeControlState(res->blob_of_death,to_client.m_ent); |
| 698 | storeEntityRemovals(res->blob_of_death,to_client.m_current_map->m_entities,&to_client); |
| 699 | storeClientData(res->blob_of_death,to_client.m_ent,is_incremental); |
| 700 | storeFollowupCommands(res->blob_of_death,&to_client); |
| 701 | } |
no test coverage detected