erase and forget
This commit is contained in:
@@ -205,7 +205,9 @@ void WorldRenderer::renderOpaque(
|
|||||||
*modelBatch,
|
*modelBatch,
|
||||||
culling ? frustumCulling.get() : nullptr,
|
culling ? frustumCulling.get() : nullptr,
|
||||||
delta,
|
delta,
|
||||||
pause
|
pause,
|
||||||
|
player.currentCamera.get() == player.fpCamera.get() ? player.getEntity()
|
||||||
|
: 0
|
||||||
);
|
);
|
||||||
modelBatch->render();
|
modelBatch->render();
|
||||||
particles->render(camera, delta * !pause);
|
particles->render(camera, delta * !pause);
|
||||||
|
|||||||
@@ -328,13 +328,10 @@ static void debug_render_skeleton(
|
|||||||
size_t pindex = bone->getIndex();
|
size_t pindex = bone->getIndex();
|
||||||
for (auto& sub : bone->getSubnodes()) {
|
for (auto& sub : bone->getSubnodes()) {
|
||||||
size_t sindex = sub->getIndex();
|
size_t sindex = sub->getIndex();
|
||||||
|
const auto& matrices = skeleton.calculated.matrices;
|
||||||
batch.line(
|
batch.line(
|
||||||
glm::vec3(
|
glm::vec3(matrices[pindex] * glm::vec4(0, 0, 0, 1)),
|
||||||
skeleton.calculated.matrices[pindex] * glm::vec4(0, 0, 0, 1)
|
glm::vec3(matrices[sindex] * glm::vec4(0, 0, 0, 1)),
|
||||||
),
|
|
||||||
glm::vec3(
|
|
||||||
skeleton.calculated.matrices[sindex] * glm::vec4(0, 0, 0, 1)
|
|
||||||
),
|
|
||||||
glm::vec4(0, 0.5f, 0, 1)
|
glm::vec4(0, 0.5f, 0, 1)
|
||||||
);
|
);
|
||||||
debug_render_skeleton(batch, sub.get(), skeleton);
|
debug_render_skeleton(batch, sub.get(), skeleton);
|
||||||
@@ -391,10 +388,14 @@ void Entities::render(
|
|||||||
ModelBatch& batch,
|
ModelBatch& batch,
|
||||||
const Frustum* frustum,
|
const Frustum* frustum,
|
||||||
float delta,
|
float delta,
|
||||||
bool pause
|
bool pause,
|
||||||
|
entityid_t fpsEntity
|
||||||
) {
|
) {
|
||||||
auto view = registry.view<Transform, rigging::Skeleton>();
|
auto view = registry.view<EntityId, Transform, rigging::Skeleton>();
|
||||||
for (auto [entity, transform, skeleton] : view.each()) {
|
for (auto [entity, eid, transform, skeleton] : view.each()) {
|
||||||
|
if (eid.uid == fpsEntity) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (transform.dirty) {
|
if (transform.dirty) {
|
||||||
transform.refresh();
|
transform.refresh();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,8 @@ public:
|
|||||||
ModelBatch& batch,
|
ModelBatch& batch,
|
||||||
const Frustum* frustum,
|
const Frustum* frustum,
|
||||||
float delta,
|
float delta,
|
||||||
bool pause
|
bool pause,
|
||||||
|
entityid_t fpsEntity
|
||||||
);
|
);
|
||||||
|
|
||||||
entityid_t spawn(
|
entityid_t spawn(
|
||||||
|
|||||||
@@ -186,10 +186,6 @@ void Player::postUpdate() {
|
|||||||
attemptToFindSpawnpoint();
|
attemptToFindSpawnpoint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: ERASE & FORGET
|
|
||||||
auto& skeleton = entity->getSkeleton();
|
|
||||||
skeleton.visible = currentCamera != fpCamera;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::teleport(glm::vec3 position) {
|
void Player::teleport(glm::vec3 position) {
|
||||||
|
|||||||
Reference in New Issue
Block a user