|  |  | @@ -218,7 +218,7 @@ void Server::Run() { | 
			
		
	
		
		
			
				
					
					|  |  |  | 	int timer = m_game.countdown, sync_acc = 0, deadplayers = 0; |  |  |  | 	int timer = m_game.countdown, sync_acc = 0, deadplayers = 0; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	std::chrono::high_resolution_clock::time_point start = std::chrono::high_resolution_clock::now(); |  |  |  | 	std::chrono::high_resolution_clock::time_point start = std::chrono::high_resolution_clock::now(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 	Timestamp last = 0; |  |  |  | 	Timestamp last = 0; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	std::vector<Chat> chatlog; |  |  |  | 	std::vector<Chat*> chatlog; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 	std::vector<ChunkMod*> chunkdiffs; |  |  |  | 	std::vector<ChunkMod*> chunkdiffs; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	std::vector<Bullet*> bullets, outbox_bullets; |  |  |  | 	std::vector<Bullet*> bullets, outbox_bullets; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	std::vector<BulletAdd*> netbull; |  |  |  | 	std::vector<BulletAdd*> netbull; | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -237,6 +237,7 @@ void Server::Run() { | 
			
		
	
		
		
			
				
					
					|  |  |  | 			std::string str = "Timer: "; |  |  |  | 			std::string str = "Timer: "; | 
			
		
	
		
		
			
				
					
					|  |  |  | 			Log(str.append(std::to_string(timer).append(" SyncAcc: ").append(std::to_string(sync_acc))), false, false); |  |  |  | 			Log(str.append(std::to_string(timer).append(" SyncAcc: ").append(std::to_string(sync_acc))), false, false); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		} |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		last = tstamp; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		for (auto& [key, conn] : m_conns) { |  |  |  | 		for (auto& [key, conn] : m_conns) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -258,8 +259,8 @@ void Server::Run() { | 
			
		
	
		
		
			
				
					
					|  |  |  | 					if (Deserialize(&sync, pck, &bsize)) {} |  |  |  | 					if (Deserialize(&sync, pck, &bsize)) {} | 
			
		
	
		
		
			
				
					
					|  |  |  | 					break; |  |  |  | 					break; | 
			
		
	
		
		
			
				
					
					|  |  |  | 				case CHAT: |  |  |  | 				case CHAT: | 
			
		
	
		
		
			
				
					
					|  |  |  | 					if (Deserialize(&chat, pck, &bsize)) |  |  |  | 					//if (Deserialize(&chat, pck, &bsize)) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 						chatlog.push_back(chat); |  |  |  | 						//chatlog.push_back(chat); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 					break; |  |  |  | 					break; | 
			
		
	
		
		
			
				
					
					|  |  |  | 				default: break; |  |  |  | 				default: break; | 
			
		
	
		
		
			
				
					
					|  |  |  | 				} |  |  |  | 				} | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -272,17 +273,17 @@ void Server::Run() { | 
			
		
	
		
		
			
				
					
					|  |  |  | 				Timestamp tstamp = conn->Run(m_world); |  |  |  | 				Timestamp tstamp = conn->Run(m_world); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 				if (conn->player->AmIDead() && tstamp) { |  |  |  | 				if (conn->player->AmIDead() && tstamp) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 					Chat chat; |  |  |  | 					Chat* chat = new Chat(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 					chat.dest_id = chat.dest_team_id =  chat.src_id = 0; |  |  |  | 					chat->dest_id = chat->dest_team_id =  chat->src_id = 0; | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 					std::string killer = m_conns.at(key)->player->GetUsername(); |  |  |  | 					std::string killer = m_conns.at(key)->player->GetUsername(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 					 |  |  |  | 					 | 
			
		
	
		
		
			
				
					
					|  |  |  | 					std::string mess = getDeathMessage(conn->player->GetUsername(), killer); |  |  |  | 					std::string mess = getDeathMessage(conn->player->GetUsername(), killer); | 
			
		
	
		
		
			
				
					
					|  |  |  | 					 |  |  |  | 					 | 
			
		
	
		
		
			
				
					
					|  |  |  | 					strcpy(chat.mess, 140, mess.c_str()); |  |  |  | 					strcpy(chat->mess, 140, mess.c_str()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 					Log("You is dead", false, false); |  |  |  | 					Log(mess, false, false); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 					m_chatlog[tstamp] = chat; |  |  |  | 					chatlog.emplace_back(chat); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 					++deadplayers; |  |  |  | 					++deadplayers; | 
			
		
	
		
		
			
				
					
					|  |  |  | 					conn->m_nsync == false; |  |  |  | 					conn->m_nsync == false; | 
			
		
	
		
		
			
				
					
					|  |  |  | 				} |  |  |  | 				} | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -329,9 +330,10 @@ void Server::Run() { | 
			
		
	
		
		
			
				
					
					|  |  |  | 		} |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		for (auto& chat : chatlog) { |  |  |  | 		for (auto& chat : chatlog) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 				Log(chat.mess, false, false); |  |  |  | 				Log(chat->mess, false, false); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 			for (auto& [key, conn] : m_conns)  |  |  |  | 			for (auto& [key, conn] : m_conns)  | 
			
		
	
		
		
			
				
					
					|  |  |  | 				sendPackTo<Chat>(m_sock_udp, &chat, &m_buf, conn->getAddr()); |  |  |  | 				sendPackTo<Chat>(m_sock_udp, chat, &m_buf, conn->getAddr()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			delete chat; | 
			
		
	
		
		
			
				
					
					|  |  |  | 		} |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		for (auto& chmo : chunkdiffs) { |  |  |  | 		for (auto& chmo : chunkdiffs) { | 
			
		
	
	
		
		
			
				
					
					|  |  |   |