mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
commit
0cbb740e70
3 changed files with 6 additions and 3 deletions
|
|
@ -492,8 +492,10 @@ void WorldRenderer::renderOpaquePass(
|
|||
ctx.useTexture(advanced_pipeline::TARGET_SKYBOX, skybox->getCubemap());
|
||||
ctx.useTexture(advanced_pipeline::TARGET_COLOR, nullptr);
|
||||
renderOpaque(ctx, camera, settings, hudVisible);
|
||||
|
||||
ctx.setDepthMask(false);
|
||||
texts->render(wctx, camera, settings, hudVisible, true);
|
||||
}
|
||||
texts->render(wctx, camera, settings, hudVisible, true);
|
||||
}
|
||||
|
||||
void WorldRenderer::renderWeatherEffects(Camera& camera) {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ static int l_get_model(lua::State* L) {
|
|||
auto& rigConfig = *skeleton->config;
|
||||
auto index = index_range_check(*skeleton, lua::tointeger(L, 2));
|
||||
const auto& modelOverride = skeleton->modelOverrides[index];
|
||||
if (!modelOverride.model) {
|
||||
if (modelOverride.model) {
|
||||
return lua::pushstring(L, modelOverride.name);
|
||||
}
|
||||
return lua::pushstring(L, rigConfig.getBones()[index]->model.name);
|
||||
|
|
|
|||
|
|
@ -492,10 +492,11 @@ void Entities::render(
|
|||
}
|
||||
|
||||
bool Entities::hasBlockingInside(AABB aabb) {
|
||||
constexpr float eps = 0.05f;
|
||||
auto view = registry->view<EntityId, Rigidbody>();
|
||||
for (auto [entity, eid, body] : view.each()) {
|
||||
AABB bodyAABB(body.hitbox.getAABB());
|
||||
bodyAABB.scale({1, 0.95f, 1});
|
||||
bodyAABB.scale(glm::vec3(1.0f - eps));
|
||||
if (eid.def.blocking && aabb.intersects(bodyAABB)) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue