| 774 | } |
| 775 | |
| 776 | void Npc::setupNetStates() { |
| 777 | m_netGroup.addNetElement(&m_xAimPosition); |
| 778 | m_netGroup.addNetElement(&m_yAimPosition); |
| 779 | |
| 780 | m_xAimPosition.setFixedPointBase(0.0625); |
| 781 | m_yAimPosition.setFixedPointBase(0.0625); |
| 782 | m_xAimPosition.setInterpolator(lerp<float, float>); |
| 783 | m_yAimPosition.setInterpolator(lerp<float, float>); |
| 784 | |
| 785 | m_netGroup.addNetElement(&m_uniqueIdNetState); |
| 786 | m_netGroup.addNetElement(&m_teamNetState); |
| 787 | m_netGroup.addNetElement(&m_humanoidStateNetState); |
| 788 | m_netGroup.addNetElement(&m_humanoidEmoteStateNetState); |
| 789 | m_netGroup.addNetElement(&m_humanoidDanceNetState); |
| 790 | |
| 791 | m_netGroup.addNetElement(&m_newChatMessageEvent); |
| 792 | m_netGroup.addNetElement(&m_chatMessage); |
| 793 | m_netGroup.addNetElement(&m_chatPortrait); |
| 794 | m_netGroup.addNetElement(&m_chatConfig); |
| 795 | |
| 796 | m_netGroup.addNetElement(&m_statusText); |
| 797 | m_netGroup.addNetElement(&m_displayNametag); |
| 798 | |
| 799 | m_netGroup.addNetElement(&m_isInteractive); |
| 800 | |
| 801 | m_netGroup.addNetElement(&m_offeredQuests); |
| 802 | m_netGroup.addNetElement(&m_turnInQuests); |
| 803 | |
| 804 | m_netGroup.addNetElement(&m_shifting); |
| 805 | m_netGroup.addNetElement(&m_damageOnTouch); |
| 806 | |
| 807 | m_netGroup.addNetElement(&m_disableWornArmor); |
| 808 | |
| 809 | m_netGroup.addNetElement(&m_deathParticleBurst); |
| 810 | |
| 811 | m_netGroup.addNetElement(&m_dropPools); |
| 812 | m_netGroup.addNetElement(&m_aggressive); |
| 813 | |
| 814 | m_netGroup.addNetElement(m_movementController.get()); |
| 815 | m_netGroup.addNetElement(m_effectEmitter.get()); |
| 816 | m_netGroup.addNetElement(m_statusController.get()); |
| 817 | m_netGroup.addNetElement(m_armor.get()); |
| 818 | m_netGroup.addNetElement(m_tools.get()); |
| 819 | m_songbook->setCompatibilityVersion(6); |
| 820 | m_netGroup.addNetElement(m_songbook.get()); |
| 821 | |
| 822 | m_netGroup.setNeedsStoreCallback(bind(&Npc::setNetStates, this)); |
| 823 | m_netGroup.setNeedsLoadCallback(bind(&Npc::getNetStates, this, _1)); |
| 824 | } |
| 825 | |
| 826 | void Npc::setNetStates() { |
| 827 | m_uniqueIdNetState.set(uniqueId()); |
nothing calls this directly
no test coverage detected