mirror of
https://github.com/ENSL/NS.git
synced 2024-11-10 15:21:54 +00:00
Fixed Mantis #0001004 - the blip list message was never cleared on refresh.
Also fixed unreported bug in NetMsg_BlipList (friendly status was backward and not reset properly between evaluations, which effectively caused random bogus blips on screen since it affects message size) git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@41 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
81c9a3c6c7
commit
587d3a5d92
2 changed files with 5 additions and 7 deletions
|
@ -2486,11 +2486,13 @@ int AvHHud::BlipList(const char* pszName, int iSize, void* pbuf)
|
|||
|
||||
if( friendly_blips )
|
||||
{
|
||||
this->mFriendlyBlips.Clear();
|
||||
this->mFriendlyBlips.AddBlipList(list);
|
||||
this->mFriendlyBlips.SetTimeBlipsReceived(theCurrentTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->mEnemyBlips.Clear();
|
||||
this->mEnemyBlips.AddBlipList(list);
|
||||
this->mEnemyBlips.SetTimeBlipsReceived(theCurrentTime);
|
||||
}
|
||||
|
|
|
@ -1121,12 +1121,8 @@ union float_converter
|
|||
list.Clear();
|
||||
BEGIN_READ( buffer, size );
|
||||
int list_info = READ_BYTE();
|
||||
if( list_info & 0x80 )
|
||||
{
|
||||
list_info &= ~0x80;
|
||||
friendly_blips = true;
|
||||
}
|
||||
blip_count = list_info;
|
||||
friendly_blips = (list_info & 0x80) != 0;
|
||||
blip_count = (list_info & 0x7F);
|
||||
for( int counter = 0; counter < blip_count; counter++ )
|
||||
{
|
||||
X = READ_COORD();
|
||||
|
@ -1143,7 +1139,7 @@ union float_converter
|
|||
{
|
||||
MESSAGE_BEGIN( MSG_ONE_UNRELIABLE, g_msgBlipList, NULL, pev );
|
||||
//pack header - 7 bits for blip count (doesn't go over 40 in practice), 1 bit for Friend or Foe
|
||||
unsigned char list_info = list.mNumBlips | (friendly_blips ? 0 : 0x80);
|
||||
unsigned char list_info = list.mNumBlips | (friendly_blips ? 0x80 : 0);
|
||||
WRITE_BYTE( list_info );
|
||||
//pack each blip - this could be optimized as follows once bit packer is implemented:
|
||||
// convert X, Y to integer values ranging from 0 to 2047 (11 bits each) based on map extents
|
||||
|
|
Loading…
Reference in a new issue