This commit is contained in:
MarcEricMartel 2023-12-16 14:41:01 -05:00
parent 1c2a691638
commit 63d1f997ca
2 changed files with 9 additions and 5 deletions

View File

@ -35,7 +35,7 @@
#define TIME_DAMAGE_BOOST 10 //secondes
#define TIME_INVINCIBLE_BOOST 4 //secondes
#define STRENGTH_SPEED_BOOST 10 //Pourcentage
#define BULLET_TIME .2
#define BULLET_TIME .2 //secondes
#define SYNC_ACC 200 // ms
#define CMOD_ACC 1500 // ms

View File

@ -281,11 +281,11 @@ void Server::Run() {
/* Process */
if (conn->m_nsync) {
if (conn->player->m_hit) {
/*if (conn->player->m_hit) {
std::string str = conn->player->GetUsername();
str = str.append(" has been hit: ").append(std::to_string(conn->player->GetHP()));
Log(str, false, false);
}
}*/
Timestamp tstamp = conn->Run(m_world);
@ -376,6 +376,9 @@ void Server::Run() {
}
netbull.clear();
if (!bullets.empty())
std::cout << "Bullets: " << bullets.size() << std::endl;
for (auto bull = bullets.begin(); bull != bullets.end(); ++bull) {
ChunkMod* cmod = nullptr;
Bullet* bullet = *bull;
@ -386,6 +389,7 @@ void Server::Run() {
delete bullet;
}
}
for (auto& bull: bullit)
bullets.erase(bull);
bullit.clear();