blob
This commit is contained in:
parent
1c2a691638
commit
63d1f997ca
@ -35,7 +35,7 @@
|
|||||||
#define TIME_DAMAGE_BOOST 10 //secondes
|
#define TIME_DAMAGE_BOOST 10 //secondes
|
||||||
#define TIME_INVINCIBLE_BOOST 4 //secondes
|
#define TIME_INVINCIBLE_BOOST 4 //secondes
|
||||||
#define STRENGTH_SPEED_BOOST 10 //Pourcentage
|
#define STRENGTH_SPEED_BOOST 10 //Pourcentage
|
||||||
#define BULLET_TIME .2
|
#define BULLET_TIME .2 //secondes
|
||||||
|
|
||||||
#define SYNC_ACC 200 // ms
|
#define SYNC_ACC 200 // ms
|
||||||
#define CMOD_ACC 1500 // ms
|
#define CMOD_ACC 1500 // ms
|
||||||
|
@ -281,11 +281,11 @@ void Server::Run() {
|
|||||||
/* Process */
|
/* Process */
|
||||||
|
|
||||||
if (conn->m_nsync) {
|
if (conn->m_nsync) {
|
||||||
if (conn->player->m_hit) {
|
/*if (conn->player->m_hit) {
|
||||||
std::string str = conn->player->GetUsername();
|
std::string str = conn->player->GetUsername();
|
||||||
str = str.append(" has been hit: ").append(std::to_string(conn->player->GetHP()));
|
str = str.append(" has been hit: ").append(std::to_string(conn->player->GetHP()));
|
||||||
Log(str, false, false);
|
Log(str, false, false);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
Timestamp tstamp = conn->Run(m_world);
|
Timestamp tstamp = conn->Run(m_world);
|
||||||
|
|
||||||
@ -367,7 +367,7 @@ void Server::Run() {
|
|||||||
endtime += .001;
|
endtime += .001;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& bull : netbull) {
|
for (auto& bull : netbull) {
|
||||||
for (auto& [key, conn] : m_conns)
|
for (auto& [key, conn] : m_conns)
|
||||||
if (bull->id != conn->GetHash(false)) // Pour pas repitcher au joueur sa propre balle.
|
if (bull->id != conn->GetHash(false)) // Pour pas repitcher au joueur sa propre balle.
|
||||||
@ -375,6 +375,9 @@ void Server::Run() {
|
|||||||
delete bull;
|
delete bull;
|
||||||
}
|
}
|
||||||
netbull.clear();
|
netbull.clear();
|
||||||
|
|
||||||
|
if (!bullets.empty())
|
||||||
|
std::cout << "Bullets: " << bullets.size() << std::endl;
|
||||||
|
|
||||||
for (auto bull = bullets.begin(); bull != bullets.end(); ++bull) {
|
for (auto bull = bullets.begin(); bull != bullets.end(); ++bull) {
|
||||||
ChunkMod* cmod = nullptr;
|
ChunkMod* cmod = nullptr;
|
||||||
@ -386,12 +389,13 @@ void Server::Run() {
|
|||||||
delete bullet;
|
delete bullet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& bull: bullit)
|
for (auto& bull: bullit)
|
||||||
bullets.erase(bull);
|
bullets.erase(bull);
|
||||||
bullit.clear();
|
bullit.clear();
|
||||||
|
|
||||||
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;
|
delete chat;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user