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

Method getNetStates

source/game/StarNpc.cpp:834–849  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

832}
833
834void Npc::getNetStates(bool initial) {
835 setUniqueId(m_uniqueIdNetState.get());
836 setTeam(m_teamNetState.get());
837 m_humanoid.setState(m_humanoidStateNetState.get());
838 m_humanoid.setEmoteState(m_humanoidEmoteStateNetState.get());
839 m_humanoid.setDance(m_humanoidDanceNetState.get());
840
841 if (m_newChatMessageEvent.pullOccurred() && !initial) {
842 m_chatMessageUpdated = true;
843 if (m_chatPortrait.get().empty())
844 m_pendingChatActions.append(SayChatAction{entityId(), m_chatMessage.get(), mouthPosition(), m_chatConfig.get()});
845 else
846 m_pendingChatActions.append(PortraitChatAction{
847 entityId(), m_chatPortrait.get(), m_chatMessage.get(), mouthPosition(), m_chatConfig.get()});
848 }
849}
850
851Vec2F Npc::mouthPosition() const {
852 return mouthOffset(true) + position();

Callers

nothing calls this directly

Calls 7

setEmoteStateMethod · 0.80
pullOccurredMethod · 0.80
getMethod · 0.45
setStateMethod · 0.45
setDanceMethod · 0.45
emptyMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected