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

Method getNetStates

source/game/StarPlayer.cpp:1945–1970  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1943}
1944
1945void Player::getNetStates(bool initial) {
1946 m_state = (State)m_stateNetState.get();
1947 m_shifting = m_shiftingNetState.get();
1948 m_aimPosition[0] = m_xAimPositionNetState.get();
1949 m_aimPosition[1] = m_yAimPositionNetState.get();
1950
1951 if (m_identityNetState.pullUpdated()) {
1952 m_identity = m_identityNetState.get();
1953 m_humanoid->setIdentity(m_identity);
1954 }
1955
1956 setTeam(m_teamNetState.get());
1957
1958 if (m_landedNetState.pullOccurred() && !initial)
1959 m_landingNoisePending = true;
1960
1961 if (m_newChatMessageNetState.pullOccurred() && !initial) {
1962 m_chatMessage = m_chatMessageNetState.get();
1963 m_chatMessageUpdated = true;
1964 m_pendingChatActions.append(SayChatAction{entityId(), m_chatMessage, m_movementController->position()});
1965 }
1966
1967 m_emoteState = HumanoidEmoteNames.getLeft(m_emoteNetState.get());
1968
1969 getNetArmorSecrets();
1970}
1971
1972void Player::setNetStates() {
1973 m_stateNetState.set((unsigned)m_state);

Callers

nothing calls this directly

Calls 6

pullOccurredMethod · 0.80
getMethod · 0.45
pullUpdatedMethod · 0.45
setIdentityMethod · 0.45
appendMethod · 0.45
positionMethod · 0.45

Tested by

no test coverage detected