aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llworldmap.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:50 -0500
committerJacek Antonelli2008-08-15 23:44:50 -0500
commit89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch)
treebcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/newview/llworldmap.cpp
parentSecond Life viewer sources 1.13.3.2 (diff)
downloadmeta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz
Second Life viewer sources 1.14.0.0
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llworldmap.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/linden/indra/newview/llworldmap.cpp b/linden/indra/newview/llworldmap.cpp
index 6e010f7..0bdab0d 100644
--- a/linden/indra/newview/llworldmap.cpp
+++ b/linden/indra/newview/llworldmap.cpp
@@ -266,7 +266,6 @@ void LLWorldMap::setCurrentLayer(S32 layer, bool request_layer)
266 if (!mMapLoaded[layer] || request_layer) 266 if (!mMapLoaded[layer] || request_layer)
267 { 267 {
268 sendMapLayerRequest(); 268 sendMapLayerRequest();
269 sendItemRequest(MAP_ITEM_AGENT_COUNT);
270 } 269 }
271 270
272 if (mTelehubs.size() == 0 || 271 if (mTelehubs.size() == 0 ||
@@ -506,8 +505,8 @@ void LLWorldMap::processMapBlockReply(LLMessageSystem* msg, void**)
506 { 505 {
507 U16 x_regions; 506 U16 x_regions;
508 U16 y_regions; 507 U16 y_regions;
509 char name[MAX_STRING]; 508 char name[MAX_STRING]; /* Flawfinder: ignore */
510 U8 access; 509 U8 access; /* Flawfinder: ignore */
511 U32 region_flags; 510 U32 region_flags;
512 U8 water_height; 511 U8 water_height;
513 U8 agents; 512 U8 agents;
@@ -515,7 +514,7 @@ void LLWorldMap::processMapBlockReply(LLMessageSystem* msg, void**)
515 msg->getU16Fast(_PREHASH_Data, _PREHASH_X, x_regions, block); 514 msg->getU16Fast(_PREHASH_Data, _PREHASH_X, x_regions, block);
516 msg->getU16Fast(_PREHASH_Data, _PREHASH_Y, y_regions, block); 515 msg->getU16Fast(_PREHASH_Data, _PREHASH_Y, y_regions, block);
517 msg->getStringFast(_PREHASH_Data, _PREHASH_Name, MAX_STRING, name, block); 516 msg->getStringFast(_PREHASH_Data, _PREHASH_Name, MAX_STRING, name, block);
518 msg->getU8Fast(_PREHASH_Data, _PREHASH_Access, access, block); 517 msg->getU8Fast(_PREHASH_Data, _PREHASH_Access, access, block); /* Flawfinder: ignore */
519 msg->getU32Fast(_PREHASH_Data, _PREHASH_RegionFlags, region_flags, block); 518 msg->getU32Fast(_PREHASH_Data, _PREHASH_RegionFlags, region_flags, block);
520 msg->getU8Fast(_PREHASH_Data, _PREHASH_WaterHeight, water_height, block); 519 msg->getU8Fast(_PREHASH_Data, _PREHASH_WaterHeight, water_height, block);
521 msg->getU8Fast(_PREHASH_Data, _PREHASH_Agents, agents, block); 520 msg->getU8Fast(_PREHASH_Data, _PREHASH_Agents, agents, block);
@@ -564,7 +563,7 @@ void LLWorldMap::processMapBlockReply(LLMessageSystem* msg, void**)
564 563
565 siminfo->mHandle = handle; 564 siminfo->mHandle = handle;
566 siminfo->mName.assign( name ); 565 siminfo->mName.assign( name );
567 siminfo->mAccess = access; 566 siminfo->mAccess = access; /* Flawfinder: ignore */
568 siminfo->mRegionFlags = region_flags; 567 siminfo->mRegionFlags = region_flags;
569 siminfo->mWaterHeight = (F32) water_height; 568 siminfo->mWaterHeight = (F32) water_height;
570 siminfo->mMapImageID[agent_flags] = image_id; 569 siminfo->mMapImageID[agent_flags] = image_id;
@@ -621,7 +620,7 @@ void LLWorldMap::processMapItemReply(LLMessageSystem* msg, void**)
621 for (S32 block=0; block<num_blocks; ++block) 620 for (S32 block=0; block<num_blocks; ++block)
622 { 621 {
623 U32 X, Y; 622 U32 X, Y;
624 char name[MAX_STRING]; 623 char name[MAX_STRING]; /* Flawfinder: ignore */
625 S32 extra, extra2; 624 S32 extra, extra2;
626 LLUUID uuid; 625 LLUUID uuid;
627 msg->getU32Fast(_PREHASH_Data, _PREHASH_X, X, block); 626 msg->getU32Fast(_PREHASH_Data, _PREHASH_X, X, block);
@@ -671,7 +670,7 @@ void LLWorldMap::processMapItemReply(LLMessageSystem* msg, void**)
671 case MAP_ITEM_PG_EVENT: // events 670 case MAP_ITEM_PG_EVENT: // events
672 case MAP_ITEM_MATURE_EVENT: 671 case MAP_ITEM_MATURE_EVENT:
673 { 672 {
674 char buffer[32]; 673 char buffer[32]; /* Flawfinder: ignore */
675 struct tm* timep; 674 struct tm* timep;
676 // Convert to Pacific, based on server's opinion of whether 675 // Convert to Pacific, based on server's opinion of whether
677 // it's daylight savings time there. 676 // it's daylight savings time there.
@@ -680,7 +679,7 @@ void LLWorldMap::processMapItemReply(LLMessageSystem* msg, void**)
680 S32 display_hour = timep->tm_hour % 12; 679 S32 display_hour = timep->tm_hour % 12;
681 if (display_hour == 0) display_hour = 12; 680 if (display_hour == 0) display_hour = 12;
682 681
683 sprintf(buffer, "%d:%02d %s", 682 snprintf(buffer, sizeof(buffer), "%d:%02d %s", /* Flawfinder: ignore */
684 display_hour, 683 display_hour,
685 timep->tm_min, 684 timep->tm_min,
686 (timep->tm_hour < 12 ? "AM" : "PM") ); 685 (timep->tm_hour < 12 ? "AM" : "PM") );
@@ -717,12 +716,6 @@ void LLWorldMap::processMapItemReply(LLMessageSystem* msg, void**)
717 gWorldMap->mClassifieds.push_back(new_item); 716 gWorldMap->mClassifieds.push_back(new_item);
718 break; 717 break;
719 } 718 }
720 case MAP_ITEM_AGENT_COUNT: // agent counts
721 {
722 // We only ever receive one per region, i.e. this update superceeds any others
723 gWorldMap->mNumAgents[new_item.mRegionHandle] = new_item.mExtra;
724 break;
725 }
726 case MAP_ITEM_AGENT_LOCATIONS: // agent locations 719 case MAP_ITEM_AGENT_LOCATIONS: // agent locations
727 { 720 {
728 if (!siminfo) 721 if (!siminfo)