diff --git a/SQCSim-srv/server.cpp b/SQCSim-srv/server.cpp index 0e5221d..d749bb4 100644 --- a/SQCSim-srv/server.cpp +++ b/SQCSim-srv/server.cpp @@ -224,6 +224,14 @@ void Server::Run() { std::vector bullets, outbox_bullets; std::vector netbull; + Chat* startchat; + startchat->src_id = 0; + char startmess[] = "How would YOU like to die today, motherfuckers?"; + + strcpy(startchat->mess, 140, startmess); + + chatlog.emplace_back(startchat); + while (!endgame) { using namespace std::chrono; Timestamp tstamp = duration_cast(high_resolution_clock::now() - start).count(); @@ -330,10 +338,6 @@ void Server::Run() { } } - //for (auto& bull : outbox_bullets) - // delete bull; - //outbox_bullets.clear(); - for (auto& chat : chatlog) { Log(chat->mess, false, false); for (auto& [key, conn] : m_conns) @@ -354,7 +358,7 @@ void Server::Run() { Chat end; end.src_id = 0; - char endmess[] = "Game over, mothereffers."; + char endmess[] = "Game over, man. Game over."; strcpy(end.mess, 140, endmess); @@ -362,7 +366,7 @@ void Server::Run() { sendPackTo(m_sock_udp, &end, &m_buf, conn->getAddr()); // TODO: Gérer les 2-3 secondes post-game avant le billboard pour pas avoir un whiplash à la fin de la game. - + system("pause"); } inline std::string Server::LogTimestamp() { diff --git a/SQCSim-srv/server.h b/SQCSim-srv/server.h index 33fde93..72c0945 100644 --- a/SQCSim-srv/server.h +++ b/SQCSim-srv/server.h @@ -1,6 +1,7 @@ #ifndef SERVER_H__ #define SERVER_H__ +#include #include #include #include