Hide near trees drawn as PC blockers when trees are switched off

A tree close to the camera is drawn by RenderPCBlocker, not RenderTree,
so background.SetVisiblePart(PART_TREE, 0) left it on screen. Skip tree
blockers while PART_TREE is hidden. Live screenshots on the 203 test
core confirm the tree, the GM mark and the weapon glow now disappear.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-15 21:24:53 +09:00
co-authored by Claude Opus 5.5
parent e546f91e03
commit aeb67f3c9c
3 changed files with 14 additions and 3 deletions
+3
View File
@@ -86,6 +86,9 @@ class DisplayTests(unittest.TestCase):
self.assertIn('IsEnemy() || IsStone()',body);self.assertIn('IsPC()',body)
system=(ROOT/'src/port/UserInterface/PythonSystem.h').read_text(encoding='latin1')
self.assertIn('iLevel > 4',system)
render=(ROOT/'src/port/GameLib/MapOutdoorRender.cpp').read_text(encoding='latin1')
blocker=render.split('void CMapOutdoor::RenderPCBlocker()',1)[1].split('\n}\n',1)[0]
self.assertIn('TREE_OBJECT != pInstance->GetType()',blocker) # near trees are drawn as PC blockers
if __name__=='__main__':unittest.main()