summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r--src/Protocol/Protocol17x.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 69b87e4d1..843675333 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -160,13 +160,13 @@ void cProtocol172::DataReceived(const char * a_Data, size_t a_Size)
-void cProtocol172::SendAttachEntity(const cEntity & a_Entity, const cEntity * a_Vehicle)
+void cProtocol172::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);
}
@@ -324,6 +324,20 @@ void cProtocol172::SendDestroyEntity(const cEntity & a_Entity)
+void cProtocol172::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 cProtocol172::SendDisconnect(const AString & a_Reason)
{
switch (m_State)