Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/interfaces/StarAnchorableEntity.cpp
blob: 8f15dbe502a394ee2e73d785485b26a453837527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "StarAnchorableEntity.hpp"

namespace Star {

bool EntityAnchorState::operator==(EntityAnchorState const& eas) const {
  return tie(entityId, positionIndex) == tie(eas.entityId, eas.positionIndex);
}

DataStream& operator>>(DataStream& ds, EntityAnchorState& anchorState) {
  ds.read(anchorState.entityId);
  ds.readVlqS(anchorState.positionIndex);
  return ds;
}

DataStream& operator<<(DataStream& ds, EntityAnchorState const& anchorState) {
  ds.write(anchorState.entityId);
  ds.writeVlqS(anchorState.positionIndex);
  return ds;
}

}