almoos dere

This commit is contained in:
MarcEricMartel
2023-12-18 13:29:38 -05:00
parent 68d03c1eac
commit f1bb7447f9
14 changed files with 125 additions and 68 deletions

View File

@@ -12,8 +12,12 @@ Bullet::~Bullet() {}
bool Bullet::Update(World* world, float elapsedtime, int perframe, std::unordered_map<uint64_t, Player*> mapPlayer, netprot::ChunkMod** chunkmod) {
int max = 100 / perframe;
Player* shooter = mapPlayer.at(m_shooter_id);
float damage = shooter->boostdamage? 0.123f: 0.098f;
Player* shooter = nullptr;
float damage = 0.098f;
if (mapPlayer.count(m_shooter_id)) {
shooter = mapPlayer.at(m_shooter_id);
damage = shooter->boostdamage ? 0.123f : 0.098f;
}
for (int x = 0; x < max; ++x) {
m_currentpos += m_velocity * elapsedtime;