From a83983d998eb836de2c6215fadbe4df8cf6af6c6 Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Sat, 26 Sep 2026 20:26:10 -0700 Subject: [PATCH] oskiewar native: meshDraw with capsuleScale <= 0 leaves the edge capsules out The P1 inset drew park meshes through sceneMesh, which never saw their capsules; drawn by handle it would have gained ~120 of them in a 320-px frame. Package 1.0.0.50. --- xbox/native-bios/Package.appxmanifest | 2 +- xbox/native-bios/ScenePrimitives.inc | 5 +++-- xbox/native-bios/tests/quickjs_engine_smoke.cpp | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/xbox/native-bios/Package.appxmanifest b/xbox/native-bios/Package.appxmanifest index f76fbd06e6..97cb488d45 100644 --- a/xbox/native-bios/Package.appxmanifest +++ b/xbox/native-bios/Package.appxmanifest @@ -6,7 +6,7 @@ IgnorableNamespaces="uap mp rescap"> + Version="1.0.0.50" /> diff --git a/xbox/native-bios/ScenePrimitives.inc b/xbox/native-bios/ScenePrimitives.inc index 89b94e8451..42fa982770 100644 --- a/xbox/native-bios/ScenePrimitives.inc +++ b/xbox/native-bios/ScenePrimitives.inc @@ -138,7 +138,8 @@ JSValue MeshFree(JSContext* ctx,JSValueConst,int argc,JSValueConst* args){ } // meshDraw(handle, camera, capsuleScale = 1, tintR = 1, tintG = 1, tintB = 1) → triangles emitted. // capsuleScale is the game's cameraScale(): edge capsules store a world width -// and take their pixel width from it, as drawQuadMesh did in JS. +// and take their pixel width from it, as drawQuadMesh did in JS. Zero or less +// skips the capsules — the P1 inset never drew them, and keeps not drawing them. JSValue MeshDraw(JSContext* ctx,JSValueConst,int argc,JSValueConst* args){ auto* scope=static_cast(JS_GetContextOpaque(ctx));int32_t handle=-1;SceneFloats camera(ctx); if(!scope||!scope->api||argc<2||JS_ToInt32(ctx,&handle,args[0]))return JS_NewInt32(ctx,0); @@ -193,7 +194,7 @@ JSValue MeshDraw(JSContext* ctx,JSValueConst,int argc,JSValueConst* args){ } // Edge capsules: worldSegment's near clip, then the fan at min depth + bias. const double guard=m[20]-m[18]; - for(size_t i=0;i0&&i