MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / getNetStates

Method getNetStates

source/game/StarObject.cpp:627–643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

625}
626
627void Object::getNetStates(bool initial) {
628 setUniqueId(m_uniqueIdNetState.get());
629 if (m_orientationIndex != m_orientationIndexNetState.get())
630 setOrientationIndex(m_orientationIndexNetState.get());
631
632 if (m_newChatMessageEvent.pullOccurred() && !initial) {
633 if (m_chatPortrait.get().empty())
634 m_pendingChatActions.append(SayChatAction{entityId(), m_chatMessage.get(), mouthPosition()});
635 else
636 m_pendingChatActions.append(PortraitChatAction{entityId(), m_chatPortrait.get(), m_chatMessage.get(), mouthPosition(), m_chatConfig.get()});
637 }
638
639 if (m_netImageKeys.pullUpdated()) {
640 m_imageKeys.merge(m_netImageKeys.baseMap(), true);
641 m_orientationDrawablesCache.reset();
642 }
643}
644
645void Object::setNetStates() {
646 m_uniqueIdNetState.set(uniqueId());

Callers

nothing calls this directly

Calls 7

pullOccurredMethod · 0.80
getMethod · 0.45
emptyMethod · 0.45
appendMethod · 0.45
pullUpdatedMethod · 0.45
mergeMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected