mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-25 23:37:05 +00:00
refactor: remove calls to Vec3::newTemp and Vec3::newPermanent
This commit is contained in:
@@ -1112,13 +1112,13 @@ std::shared_ptr<Explosion> ServerLevel::explode(std::shared_ptr<Entity> source,
|
||||
}
|
||||
|
||||
if (player->distanceToSqr(x, y, z) < 64 * 64) {
|
||||
Vec3* knockbackVec = explosion->getHitPlayerKnockback(player);
|
||||
Vec3 knockbackVec = explosion->getHitPlayerKnockback(player);
|
||||
// app.DebugPrintf("Sending %s with knockback (%f,%f,%f)\n",
|
||||
// knockbackOnly?"knockbackOnly":"allExplosion",knockbackVec->x,knockbackVec->y,knockbackVec->z);
|
||||
// If the player is not the primary on the system, then we only
|
||||
// want to send info for the knockback
|
||||
player->connection->send(std::shared_ptr<ExplodePacket>(
|
||||
new ExplodePacket(x, y, z, r, &explosion->toBlow, knockbackVec,
|
||||
new ExplodePacket(x, y, z, r, &explosion->toBlow, &knockbackVec,
|
||||
knockbackOnly)));
|
||||
sentTo.push_back(player);
|
||||
}
|
||||
@@ -1584,4 +1584,4 @@ void ServerLevel::flagEntitiesToBeRemoved(unsigned int* flags,
|
||||
if (chunkMap) {
|
||||
chunkMap->flagEntitiesToBeRemoved(flags, removedFound);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user