Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions Client/mods/deathmatch/logic/CClientStreamElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void CClientStreamElement::InternalStreamIn(bool bInstantly)
}
}

void CClientStreamElement::InternalStreamOut()
void CClientStreamElement::InternalStreamOut(bool ignoreSendingEvent)
{
if (m_bStreamedIn)
{
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion Client/mods/deathmatch/logic/CClientStreamElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading