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

Method getNetStates

source/game/StarMonster.cpp:739–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

737}
738
739void Monster::getNetStates(bool initial) {
740 setUniqueId(m_uniqueIdNetState.get());
741 setTeam(m_teamNetState.get());
742 m_monsterLevel = m_monsterLevelNetState.get();
743 m_damageOnTouch = m_damageOnTouchNetState.get();
744 m_aggressive = m_aggressiveNetState.get();
745 m_knockedOut = m_knockedOutNetState.get();
746 if (m_deathParticleBurstNetState.pullUpdated())
747 m_deathParticleBurst = m_deathParticleBurstNetState.get();
748 if (m_deathSoundNetState.pullUpdated())
749 m_deathSound = m_deathSoundNetState.get();
750 if (m_activeSkillNameNetState.pullUpdated())
751 m_activeSkillName = m_activeSkillNameNetState.get();
752 if (m_dropPoolNetState.pullUpdated())
753 m_dropPool = m_dropPoolNetState.get();
754
755 if (m_newChatMessageEvent.pullOccurred() && !initial) {
756 if (m_chatPortrait.get().empty())
757 m_pendingChatActions.append(SayChatAction{entityId(), m_chatMessage.get(), mouthPosition()});
758 else
759 m_pendingChatActions.append(
760 PortraitChatAction{entityId(), m_chatPortrait.get(), m_chatMessage.get(), mouthPosition()});
761 }
762}
763
764float Monster::monsterLevel() const {
765 return *m_monsterLevel;

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected