°Oo.
This commit is contained in:
parent
5696e20452
commit
f6c5379a8c
@ -224,6 +224,14 @@ void Server::Run() {
|
||||
std::vector<Bullet*> bullets, outbox_bullets;
|
||||
std::vector<BulletAdd*> 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<milliseconds>(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<Chat>(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() {
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef SERVER_H__
|
||||
#define SERVER_H__
|
||||
|
||||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
Loading…
x
Reference in New Issue
Block a user