This commit is contained in:
MarcEricMartel 2023-12-16 15:15:25 -05:00
parent 745f40bc37
commit 2eacc0477b
2 changed files with 5 additions and 4 deletions

View File

@ -37,8 +37,8 @@
#define STRENGTH_SPEED_BOOST 10 //Pourcentage #define STRENGTH_SPEED_BOOST 10 //Pourcentage
#define BULLET_TIME .2 //secondes #define BULLET_TIME .2 //secondes
#define SYNC_ACC 200 // ms #define SYNC_ACC 100 // ms
#define CMOD_ACC 1500 // ms #define CMOD_ACC 1000 // ms
typedef uint8_t BlockType; typedef uint8_t BlockType;
enum BLOCK_TYPE { BTYPE_AIR, BTYPE_DIRT, BTYPE_GRASS, BTYPE_METAL, BTYPE_ICE, BTYPE_GREENGRASS, BTYPE_LAST }; enum BLOCK_TYPE { BTYPE_AIR, BTYPE_DIRT, BTYPE_GRASS, BTYPE_METAL, BTYPE_ICE, BTYPE_GREENGRASS, BTYPE_LAST };

View File

@ -384,12 +384,13 @@ void Server::Run() {
if (cmod) if (cmod)
chunkdiffs.emplace_back(cmod); chunkdiffs.emplace_back(cmod);
bullit.push_back(bull); bullit.push_back(bull);
delete bullet;
} }
} }
for (auto& bull: bullit) for (auto& bull : bullit) {
delete* bull;
bullets.erase(bull); bullets.erase(bull);
}
if (!bullit.empty()) if (!bullit.empty())
bullit.clear(); bullit.clear();