summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol18x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol/Protocol18x.cpp')
-rw-r--r--src/Protocol/Protocol18x.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp
index eab6c4721..ae9571f03 100644
--- a/src/Protocol/Protocol18x.cpp
+++ b/src/Protocol/Protocol18x.cpp
@@ -171,13 +171,13 @@ void cProtocol180::DataReceived(const char * a_Data, size_t a_Size)
-void cProtocol180::SendAttachEntity(const cEntity & a_Entity, const cEntity * a_Vehicle)
+void cProtocol180::SendAttachEntity(const cEntity & a_Entity, const cEntity & a_Vehicle)
{
ASSERT(m_State == 3); // In game mode?
cPacketizer Pkt(*this, 0x1b); // Attach Entity packet
Pkt.WriteBEUInt32(a_Entity.GetUniqueID());
- Pkt.WriteBEUInt32((a_Vehicle != nullptr) ? a_Vehicle->GetUniqueID() : 0);
+ Pkt.WriteBEUInt32(a_Vehicle.GetUniqueID());
Pkt.WriteBool(false);
}
@@ -317,6 +317,20 @@ void cProtocol180::SendDestroyEntity(const cEntity & a_Entity)
+void cProtocol180::SendDetachEntity(const cEntity & a_Entity, const cEntity & a_PreviousVehicle)
+{
+ ASSERT(m_State == 3); // In game mode?
+
+ cPacketizer Pkt(*this, 0x1b); // Attach Entity packet
+ Pkt.WriteBEUInt32(a_Entity.GetUniqueID());
+ Pkt.WriteBEUInt32(0);
+ Pkt.WriteBool(false);
+}
+
+
+
+
+
void cProtocol180::SendDisconnect(const AString & a_Reason)
{
switch (m_State)