Skip to content

Commit

Permalink
Fixed bug with lamps
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddevanesch committed Apr 5, 2023
1 parent 3eb4871 commit 4472045
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/main/java/nl/group5b/gui/elements/MainPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@ private void renderVehicleData(float contentWidth) throws FileNotFoundException
if (selectedVehicleHasLamp) {
Lamp attachableLamp = selectedVehicle.getLamp();
selectedVehicle.removeLamp();
if (selectedLamp == attachableLamp) {
selectedLamp = null;
}
bodies.remove(attachableLamp);
lights.remove(attachableLamp.getLight());
shader.recompile(lights.size());
Expand Down

0 comments on commit 4472045

Please sign in to comment.