SQC-15_online #1
| @@ -305,9 +305,6 @@ void Server::Run() { | ||||
| 						chunkdiffs.emplace_back(std::move(chmo)); | ||||
| 					conn->ChunkDiffs.clear(); | ||||
|  | ||||
| 					std::string str = conn->player->GetUsername(); | ||||
| 					Log(str.append(" ").append(std::to_string(conn->player->GetHP())), false, false); | ||||
|  | ||||
| 					for (auto& bull : conn->Bullets) { | ||||
| 						bullets.emplace_back(bull); | ||||
| 						Log("POW!", false, false); | ||||
| @@ -347,6 +344,10 @@ void Server::Run() { | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		for (auto gtfo : outbox_bullets) | ||||
| 			delete gtfo; | ||||
| 		outbox_bullets.clear(); | ||||
|  | ||||
| 		for (auto& chat : chatlog) { | ||||
| 				Log(chat->mess, false, false); | ||||
| 			for (auto& [key, conn] : m_conns)  | ||||
| @@ -371,6 +372,12 @@ void Server::Run() { | ||||
| 	end.src_id = 0; | ||||
| 	char endmess[] = "Game over, man. Game over."; | ||||
|  | ||||
| 	for (auto& [key, conn] : m_conns) { | ||||
| 		std::string str = conn->player->GetUsername(); | ||||
| 		Log(str.append(" ").append(std::to_string(conn->player->GetHP())), false, false); | ||||
| 		 | ||||
| 	} | ||||
|  | ||||
| 	strcpy(end.mess, 140, endmess); | ||||
|  | ||||
| 	for (auto& [key, conn] : m_conns) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user