Merge branch 'Networking' of github.com:teamfisk/TacticalZ into Networking

# Conflicts:
#	include/Game/InterpolationSystem.h
#	src/Game/InterpolationSystem.cpp
This commit is contained in:
stiffly
2016-01-18 18:13:19 +01:00
4 changed files with 11 additions and 4 deletions
+5 -1
View File
@@ -119,12 +119,16 @@ void Client::InterpolateFields(Packet& packet, const ComponentInfo& componentInf
int sizeOfFields = 0;
for (auto field : componentInfo.FieldsInOrder) {
ComponentInfo::Field_t fieldInfo = componentInfo.Fields.at(field);
sizeOfFields = fieldInfo.Stride;
sizeOfFields += fieldInfo.Stride;
}
// Is the size correct?
boost::shared_array<char> eventData(new char[componentInfo.Meta.Stride]);
memcpy(eventData.get(), packet.ReadData(componentInfo.Meta.Stride), componentInfo.Meta.Stride);
//Send event to interpolat system
Events::Interpolate e;
e.Entity = entityID;
e.DataArray = eventData;
m_EventBroker->Publish(e);
}