!!!!
This commit is contained in:
@@ -12,7 +12,9 @@ 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;
|
||||
float damage = 0.098f;
|
||||
Player* shooter = mapPlayer.at(m_shooter_id);
|
||||
float damage = shooter->boostdamage? 0.123f: 0.098f;
|
||||
|
||||
for (int x = 0; x < max; ++x) {
|
||||
m_currentpos += m_velocity * elapsedtime;
|
||||
|
||||
@@ -29,7 +31,7 @@ bool Bullet::Update(World* world, float elapsedtime, int perframe, std::unordere
|
||||
hit = true;
|
||||
}
|
||||
if (hit && !player->AmIDead()) {
|
||||
if (m_canhurt)
|
||||
if (m_canhurt && !player->boostinvincible)
|
||||
player->InflictDamage(damage);
|
||||
player->m_hit = true;
|
||||
|
||||
|
Reference in New Issue
Block a user