Skip to content

wc3: fix cinematic dialogue corruption, portrait talk animation, and building visibility - #141

Closed
leinadUa wants to merge 2 commits into
corepunch:mainfrom
leinadUa:fix-cinematic
Closed

wc3: fix cinematic dialogue corruption, portrait talk animation, and building visibility#141
leinadUa wants to merge 2 commits into
corepunch:mainfrom
leinadUa:fix-cinematic

Conversation

@leinadUa

Copy link
Copy Markdown
Contributor

SetCinematicScene/EndCinematicScene stored raw JASS string pointers into playerState.texts[]; jass_call() frees them the instant the native returns, causing use-after-free on speaker/dialogue text. Fixed via G_SetPlayerText. Also fixed cinematic_end_time not resetting, which could cut a scene short.

ForForce and GetEnumPlayer were no-op stubs, silently breaking CinematicModeBJ and any force-based JASS logic. Implemented both.

Cinematic portrait always used the idle "Portrait" animation. Now switches to "Portrait Talk" while a line is being spoken, with a renderer fallback for models missing that sequence.

Starting-base buildings disappeared during/after the intro cutscene. G_FowPlayerCanSeeEntity only checked current visibility, not explored state, for buildings. Root cause: MAX_PACKET_ENTITIES (256) was chronically exceeded by the map's tree/doodad count, so unowned buildings lost the per-frame entity slot competition. Raised to 2048, added sv_debug_entities logging for this eviction path.

Daniil Ryvkin added 2 commits July 19, 2026 16:36
…alk anim, and building fog/packet-limit visibility
@leinadUa

Copy link
Copy Markdown
Contributor Author

client dropped its cached entity baseline on removal, so re-added entities lost fields the server omits as unchanged
fixed: keep baseline on removal, restore current from it before applying the next delta
MAX_PACKET_ENTITIES raised to MAX_GAME_ENTITIES (was chronically exceeded by map's tree/doodad count)
moved SV_BuildClientFrame's candidate buffer from stack to static

@corepunch

Copy link
Copy Markdown
Owner

Merged

@corepunch corepunch closed this Jul 21, 2026
@leinadUa
leinadUa deleted the fix-cinematic branch July 21, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants