Jelajahi Sumber

enabled visualization and info updates to be part of bulk updates

Image 4 tahun lalu
induk
melakukan
73f9d05759
2 mengubah file dengan 9 tambahan dan 13 penghapusan
  1. 6 4
      EQ2/source/WorldServer/client.cpp
  2. 3 9
      EQ2/source/WorldServer/zoneserver.cpp

+ 6 - 4
EQ2/source/WorldServer/client.cpp

@@ -8281,7 +8281,7 @@ void Client::SendSpawnChanges(set<Spawn*>& spawns) {
 		if (!player->WasSentSpawn(spawn->GetID()))
 			continue;
 		int16 index = player->player_spawn_index_map[spawn];
-		/*
+		
 		if (spawn->info_changed) {
 			auto info_change = spawn->spawn_info_changes_ex(GetPlayer(), GetVersion());
 
@@ -8294,7 +8294,8 @@ void Client::SendSpawnChanges(set<Spawn*>& spawns) {
 
 				info_changes[index] = data;
 			}
-		}*/
+			count++;
+		}
 
 		if (spawn->position_changed) {
 			auto pos_change = spawn->spawn_pos_changes_ex(GetPlayer(), GetVersion());
@@ -8310,7 +8311,7 @@ void Client::SendSpawnChanges(set<Spawn*>& spawns) {
 			}
 			count++;
 		}
-		/*
+		
 		if (spawn->vis_changed) {
 			auto vis_change = spawn->spawn_vis_changes_ex(GetPlayer(), GetVersion());
 
@@ -8323,7 +8324,8 @@ void Client::SendSpawnChanges(set<Spawn*>& spawns) {
 
 				vis_changes[index] = data;
 			}
-		}*/
+			count++;
+		}
 
 	}
 

+ 3 - 9
EQ2/source/WorldServer/zoneserver.cpp

@@ -1869,12 +1869,7 @@ void ZoneServer::SendSpawnChanges(){
 		spawn = GetSpawnByID(spawn_iter->value);
 		if(spawn && spawn->changed){
 			if(!spawn->IsPlayer() || (spawn->IsPlayer() && (spawn->info_changed || spawn->vis_changed))){
-				if (spawn->position_changed)
-				{
-					spawn->position_changed = false;
 					spawns_to_send.insert(spawn);
-				}
-				SendSpawnChanges(spawn);
 			}
 		}
 		if (!spawn)
@@ -1882,10 +1877,6 @@ void ZoneServer::SendSpawnChanges(){
 	}
 	changed_spawns.clear();
 
-	for (const auto& spawn : spawns_to_send) {
-		spawn->position_changed = true;
-	}
-
 	vector<Client*>::iterator client_itr;
 	Client* client = 0;
 	MClientList.readlock(__FUNCTION__, __LINE__);
@@ -1896,7 +1887,10 @@ void ZoneServer::SendSpawnChanges(){
 	MClientList.releasereadlock(__FUNCTION__, __LINE__);
 
 	for (const auto& spawn : spawns_to_send) {
+		spawn->changed = false;
 		spawn->position_changed = false;
+		spawn->vis_changed = false;
+		spawn->info_changed = false;
 	}
 }