pop.
This commit is contained in:
parent
7f9462881c
commit
90892ce7d3
@ -18,10 +18,10 @@ bool Bullet::Update(World* world, float elapsedtime, int perframe, std::unordere
|
|||||||
|
|
||||||
for (auto& [key, player] : mapPlayer) {
|
for (auto& [key, player] : mapPlayer) {
|
||||||
bool hit = false;
|
bool hit = false;
|
||||||
if ((m_currentpos - player->GetPosition()).Length() < .5f) {
|
if ((m_currentpos - player->GetPosition()).Length() < 1.5f) {
|
||||||
hit = true;
|
hit = true;
|
||||||
}
|
}
|
||||||
else if ((m_currentpos - player->GetPOV()).Length() < .2f) {
|
else if ((m_currentpos - player->GetPOV()).Length() < .7f) {
|
||||||
damage *= 2; // HEADSHOT!
|
damage *= 2; // HEADSHOT!
|
||||||
hit = true;
|
hit = true;
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,8 @@ void Server::Run() {
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lsPck.clear();
|
if (!lsPck.empty())
|
||||||
|
lsPck.clear();
|
||||||
|
|
||||||
/* Process */
|
/* Process */
|
||||||
|
|
||||||
@ -311,7 +312,8 @@ void Server::Run() {
|
|||||||
else {
|
else {
|
||||||
for (auto& chmo : conn->ChunkDiffs)
|
for (auto& chmo : conn->ChunkDiffs)
|
||||||
chunkdiffs.emplace_back(std::move(chmo));
|
chunkdiffs.emplace_back(std::move(chmo));
|
||||||
conn->ChunkDiffs.clear();
|
if (!conn->ChunkDiffs.empty())
|
||||||
|
conn->ChunkDiffs.clear();
|
||||||
|
|
||||||
for (auto& bull : conn->Bullets) {
|
for (auto& bull : conn->Bullets) {
|
||||||
bullets.emplace_back(bull);
|
bullets.emplace_back(bull);
|
||||||
@ -323,7 +325,8 @@ void Server::Run() {
|
|||||||
|
|
||||||
netbull.emplace_back(std::move(nbul));
|
netbull.emplace_back(std::move(nbul));
|
||||||
}
|
}
|
||||||
conn->Bullets.clear();
|
if (!conn->Bullets.empty())
|
||||||
|
conn->Bullets.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Out */
|
/* Out */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user