Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Vision not revealed correctly when near VBL/MBL #3541

Closed
adventuremagic123 opened this issue Aug 14, 2022 · 6 comments · Fixed by #3545
Closed

[Bug]: Vision not revealed correctly when near VBL/MBL #3541

adventuremagic123 opened this issue Aug 14, 2022 · 6 comments · Fixed by #3545
Assignees
Labels
bug tested This issue has been QA tested by someone other than the developer.

Comments

@adventuremagic123
Copy link

adventuremagic123 commented Aug 14, 2022

Describe the Bug

An NPC for which I pressed Ctrl-I with normal vision standing near a building in day vision with MBL for walls and VBL for across the center part of the roof is getting obscured vision when looking out away from the building -- when that should all be revealed:
Screenshot 2022-08-14 100024
.

To Reproduce

  1. Load the map attached as "Vision problem.rpmap" (unzip "Vision problem.zip") into a campaign and save the campaign. (Note: It's from a MapTool 1.10.4 campaign that was loaded into 1.12.0.beta and saved as a *.rpmap from 1.12.0.beta.)
  2. Run the MapTool server. Load the campaign.
  3. Inspect the token "Aldem Foxglove (Politician)" for unexpected vision issues
    Vision problem.zip
    .

Expected Behaviour

The "Aldem Foxglove (Politician)" token should be able to see away from the building because there is no VBL (or even MBL) there.

Screenshots

No response

MapTool Info

1.12.0.beta

Desktop

Windows 10

Additional Context

Initially, I was able to use the "Edit Token" dialog for "Aldem Foxglove (Politician)" token to enable his vision (and I can still use "Edit Token" for other tokens on this map) -- but after doing that for "Aldem Foxglove (Politician)" I now get the following exception:

java.lang.NullPointerException: Cannot invoke "net.rptools.maptool.model.Token.getOwners()" because the return value of "net.rptools.maptool.client.ui.token.EditTokenDialog.getModel()" is null
at net.rptools.maptool.client.ui.token.EditTokenDialog$OwnerListModel.(EditTokenDialog.java:2120)
at net.rptools.maptool.client.ui.token.EditTokenDialog.lambda$bind$0(EditTokenDialog.java:293)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:54)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.WaitDispatchSupport$2.run(Unknown Source)
at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.desktop/java.awt.WaitDispatchSupport.enter(Unknown Source)
at java.desktop/java.awt.Dialog.show(Unknown Source)
at java.desktop/java.awt.Component.show(Unknown Source)
at java.desktop/java.awt.Component.setVisible(Unknown Source)
at java.desktop/java.awt.Window.setVisible(Unknown Source)
at java.desktop/java.awt.Dialog.setVisible(Unknown Source)
at net.rptools.maptool.client.swing.MapToolEventQueue.displayPopup(MapToolEventQueue.java:109)
at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:73)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

@adventuremagic123
Copy link
Author

When moving away from the building, the vision for each token appears to display as expected.

@adventuremagic123
Copy link
Author

adventuremagic123 commented Aug 14, 2022

The lighting problem can be reproduced using other tokens, such as "Goblin 34 (Goblin)":

  1. Make sure the MapTool server is running and that you have loaded the campaign after starting the server.
  2. Use "Edit Token" to
  3. Move them near the building and next to "Aldem Foxglove (Politician)".
  4. Use the "Map" menu to "Restore Fog-of-War".
  5. As GM, press Ctrl-I with the token selected to reveal vision.
  6. Notice that vision away from the building is not revealed as expected.
  7. Connect to the MapTool server as a player. Assign the owner of the token to be the player and notice that the player sees the same thing. Vision is not revealed as expected.

Note: Also, eventually, after using "Edit Token" on other tokens that they also eventually become broken and you get a Java exception like you see above -- however, "Edit Token" did work on them at the start of this.

@adventuremagic123
Copy link
Author

The map is intellectual property, so please only download and use it for the purpose of addressing this issue. I've attached as as a fair use of copyright law.

@kwvanderlinde
Copy link
Collaborator

Same underlying problem as #3521, but this one demonstrates I shouldn't have been so aggressive with the precision model.

@Phergus
Copy link
Contributor

Phergus commented Aug 15, 2022

Interestingly if I just wipe out all the VBL and redraw they way I normally draw VBL it works just fine.

@Phergus
Copy link
Contributor

Phergus commented Aug 15, 2022

Tested fix. Vision working as expected now on supplied map.

@Phergus Phergus added the tested This issue has been QA tested by someone other than the developer. label Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug tested This issue has been QA tested by someone other than the developer.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants