Skip to content

Commit 049e976

Browse files
committed
Fix #1399: Sync createBlip size and color regardless of icon
1 parent 35ea5e4 commit 049e976

File tree

2 files changed

+17
-23
lines changed

2 files changed

+17
-23
lines changed

Client/mods/deathmatch/logic/CPacketHandler.cpp

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3619,20 +3619,16 @@ void CPacketHandler::Packet_EntityAdd(NetBitStreamInterface& bitStream)
36193619
if (icon <= RADAR_MARKER_LIMIT)
36203620
pBlip->SetSprite(icon);
36213621

3622-
// Read out size and color if there's no icon
3623-
if (icon == 0)
3624-
{
3625-
// Read out the size
3626-
SIntegerSync<unsigned char, 5> size;
3627-
bitStream.Read(&size);
3622+
// Read out the size
3623+
SIntegerSync<unsigned char, 5> size;
3624+
bitStream.Read(&size);
36283625

3629-
// Read out the color
3630-
SColorSync color;
3631-
bitStream.Read(&color);
3626+
// Read out the color
3627+
SColorSync color;
3628+
bitStream.Read(&color);
36323629

3633-
pBlip->SetScale(size);
3634-
pBlip->SetColor(color);
3635-
}
3630+
pBlip->SetScale(size);
3631+
pBlip->SetColor(color);
36363632

36373633
break;
36383634
}

Server/mods/deathmatch/logic/packets/CEntityAddPacket.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -747,17 +747,15 @@ bool CEntityAddPacket::Write(NetBitStreamInterface& BitStream) const
747747
// Write the icon
748748
SIntegerSync<unsigned char, 6> icon(pBlip->m_ucIcon);
749749
BitStream.Write(&icon);
750-
if (pBlip->m_ucIcon == 0)
751-
{
752-
// Write the size
753-
SIntegerSync<unsigned char, 5> size(pBlip->m_ucSize);
754-
BitStream.Write(&size);
755-
756-
// Write the color
757-
SColorSync color;
758-
color = pBlip->GetColor();
759-
BitStream.Write(&color);
760-
}
750+
751+
// Write the size
752+
SIntegerSync<unsigned char, 5> size(pBlip->m_ucSize);
753+
BitStream.Write(&size);
754+
755+
// Write the color
756+
SColorSync color;
757+
color = pBlip->GetColor();
758+
BitStream.Write(&color);
761759

762760
break;
763761
}

0 commit comments

Comments
 (0)