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