Skip to content

Engine: Player's view gets mirrored on switch from Polymer to Polymost after having seen a mirror

From this thread: https://forums.duke4.net/topic/10934-polymost-not-working-right/page__view__findpost__p__334867

See also: Issue #50 (closed)

Example map: polymer_mirror_bug.map

Steps to reproduce:

  1. Start the map in Polymer.
  2. Turn away from the mirror such that it is no longer in view.
  3. While the mirror is out of view, switch to Polymost.
  4. The player's view becomes mirrored.

Additional Information:

This happens any time the player has previously seen a mirror in the Polymer renderer.

Looking at the mirror again or switching to Polymer results in everything turning back to normal.

This started with revision r7493 (commit: b1719f69). Issue #50 (closed) is very likely related to this one.

Additionally, I noticed that if I revert back to this revision, and change the lines 6495-6501 in polymost.cpp as follows:

     grhalfxdown10x = grhalfxdown10;

-    if (mirrorrender)
-        grhalfxdown10x = -grhalfxdown10;

    if (inpreparemirror)
    {
+       grhalfxdown10x = -grhalfxdown10;
        inpreparemirror = 0;

then the mirroring no longer occurs. Maybe this helps diagnose the problem.

Edited by Dino Bollinger