diff --git a/Client/mods/deathmatch/logic/CClientStreamElement.cpp b/Client/mods/deathmatch/logic/CClientStreamElement.cpp index b883eb0ec7..fe48a73a0d 100644 --- a/Client/mods/deathmatch/logic/CClientStreamElement.cpp +++ b/Client/mods/deathmatch/logic/CClientStreamElement.cpp @@ -61,7 +61,7 @@ void CClientStreamElement::InternalStreamIn(bool bInstantly) } } -void CClientStreamElement::InternalStreamOut() +void CClientStreamElement::InternalStreamOut(bool ignoreSendingEvent) { if (m_bStreamedIn) { @@ -83,13 +83,24 @@ void CClientStreamElement::InternalStreamOut() } } - CLuaArguments Arguments; - CallEvent("onClientElementStreamOut", Arguments, true); + if (!ignoreSendingEvent) + { + CLuaArguments Arguments; + CallEvent("onClientElementStreamOut", Arguments, true); + } } } void CClientStreamElement::NotifyCreate() { + // If the dimensions are different, stream out and do not continue + if (GetDimension() != m_pStreamer->m_usDimension) + { + m_bStreamedIn = true; // InternalStreamOut need it + InternalStreamOut(true); + return; + } + // Update common atrributes if (!m_bDoubleSidedInit) m_bDoubleSided = IsDoubleSided(); diff --git a/Client/mods/deathmatch/logic/CClientStreamElement.h b/Client/mods/deathmatch/logic/CClientStreamElement.h index 57eed53a90..4ad2f7d304 100644 --- a/Client/mods/deathmatch/logic/CClientStreamElement.h +++ b/Client/mods/deathmatch/logic/CClientStreamElement.h @@ -30,7 +30,7 @@ class CClientStreamElement : public CClientEntity CClientStreamSector* GetStreamSector() { return m_pStreamSector; } bool IsStreamedIn() { return m_bStreamedIn; } void InternalStreamIn(bool bInstantly); - void InternalStreamOut(); + void InternalStreamOut(bool ignoreSendingEvent = false); virtual void StreamIn(bool bInstantly) = 0; virtual void StreamOut() = 0; virtual void NotifyCreate();