diff --git a/CHANGELOG.md b/CHANGELOG.md index 36700904e..43e598566 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ Bug #2014: Antialiasing setting does nothing on Linux Bug #2037: Some enemies attack the air when spotting the player Bug #2052: NIF rotation matrices including scales are not supported + Bug #2062: Crank in Old Mournhold: Forgotten Sewer turns about the wrong axis Bug #2111: Raindrops in front of fire look wrong Bug #2140: [OpenGL] Water effects, flames and parts of creatures solid black when observed through brazier flame Bug #2147: Trueflame and Hopesfire flame effects not properly aligned with blade @@ -176,6 +177,7 @@ Bug #2980: Editor: Attribute and Skill can be selected for spells that do not require these parameters, leading to non-functional spells Bug #2990: Compiling a script with warning mode 2 and enabled error downgrading leads to infinite recursion Bug #2992: [Mod: Great House Dagoth] Killing Dagoth Gares freezes the game + Bug #3007: PlaceItem takes radians instead of degrees + angle reliability Feature #706: Editor: Script Editor enhancements Feature #872: Editor: Colour values in tables Feature #880: Editor: ID auto-complete diff --git a/CMakeLists.txt b/CMakeLists.txt index 8fac1b77f..d038936d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -746,9 +746,10 @@ if (APPLE) set(ABSOLUTE_PLUGINS "") set(USED_OSG_PLUGINS - osgdb_tga osgdb_dds - osgdb_imageio + osgdb_jpeg + osgdb_png + osgdb_tga ) foreach (PLUGIN_NAME ${USED_OSG_PLUGINS}) diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index c1e202bc0..e5bf1f4b4 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -471,16 +471,18 @@ namespace MWGui MWBase::Environment::get().getScriptManager()->run (script, interpreterContext); } - if (script.empty() || ptr.getRefData().getLocals().getIntVar(script, "pcskipequip") == 0) + mSkippedToEquip = MWWorld::Ptr(); + if (ptr.getRefData().getCount()) // make sure the item is still there, the script might have removed it { - boost::shared_ptr action = ptr.getClass().use(ptr); - - action->execute (player); + if (script.empty() || ptr.getRefData().getLocals().getIntVar(script, "pcskipequip") == 0) + { + boost::shared_ptr action = ptr.getClass().use(ptr); - mSkippedToEquip = MWWorld::Ptr(); + action->execute (player); + } + else + mSkippedToEquip = ptr; } - else - mSkippedToEquip = ptr; if (isVisible()) { diff --git a/apps/openmw/mwworld/actionequip.cpp b/apps/openmw/mwworld/actionequip.cpp index 147f22963..a6d6eef2b 100644 --- a/apps/openmw/mwworld/actionequip.cpp +++ b/apps/openmw/mwworld/actionequip.cpp @@ -52,7 +52,12 @@ namespace MWWorld } } - assert(it != invStore.end()); + if (it == invStore.end()) + { + std::stringstream error; + error << "ActionEquip can't find item " << object.getCellRef().getRefId(); + throw std::runtime_error(error.str()); + } // equip the item in the first free slot std::vector::const_iterator slot=slots_.first.begin(); diff --git a/components/sceneutil/lightmanager.cpp b/components/sceneutil/lightmanager.cpp index 43f11cf00..ba2f8c510 100644 --- a/components/sceneutil/lightmanager.cpp +++ b/components/sceneutil/lightmanager.cpp @@ -164,7 +164,7 @@ namespace SceneUtil mStateSetCache.clear(); } - void LightManager::addLight(LightSource* lightSource, osg::Matrixf worldMat) + void LightManager::addLight(LightSource* lightSource, const osg::Matrixf& worldMat) { LightSourceTransform l; l.mLightSource = lightSource; diff --git a/components/sceneutil/lightmanager.hpp b/components/sceneutil/lightmanager.hpp index ecee873e8..89ffc1305 100644 --- a/components/sceneutil/lightmanager.hpp +++ b/components/sceneutil/lightmanager.hpp @@ -77,7 +77,7 @@ namespace SceneUtil void update(); // Called automatically by the LightSource's UpdateCallback - void addLight(LightSource* lightSource, osg::Matrixf worldMat); + void addLight(LightSource* lightSource, const osg::Matrixf& worldMat); struct LightSourceTransform { diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 85434ff32..cab6e7c4a 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -1,242 +1,341 @@ -# WARNING: Editing this file might have no effect, as these -# settings are overwritten by your user settings file. +# WARNING: If this file is named settings-default.cfg, then editing +# this file might have no effect, as these settings may be overwritten +# by your user settings.cfg file (see documentation for its location). +# +# This file provides minimal documentation for each setting, and +# ranges of recommended values. For detailed explanations of the +# significance of each setting, interaction with other settings, hard +# limits on value ranges and more information in general, please read +# the detailed documentation at the OpenMW Wiki page: +# +# https://wiki.openmw.org/index.php?title=Settings +# -[Video] -resolution x = 800 -resolution y = 600 +[Camera] -fullscreen = false -window border = true -screen = 0 +# Near clipping plane (>0.0, e.g. 0.01 to 18.0). +near clip = 5.0 -# Minimize the window if it loses key focus? -minimize on focus loss = true +# Cull objects smaller than one pixel. +small feature culling = true -# Valid values: 0 for no antialiasing, or any power of two -antialiasing = 0 +# Maximum visible distance (e.g. 2000.0 to 6666.0). Caution: this setting +# can dramatically affect performance, see documentation for details. +viewing distance = 6666.0 -vsync = false +[Cells] -gamma = 1.00 -contrast = 1.00 +# Adjacent exterior cells loaded (>0). Caution: this setting can +# dramatically affect performance, see documentation for details. +exterior cell load distance = 1 -# Maximum framerate in frames per second, 0 = unlimited -framerate limit = 0 +[Map] + +# Size of each exterior cell in pixels in the world map. (e.g. 12 to 24). +# Warning: affects explored areas in save files, see documentation. +global map cell size = 18 + +# Zoom level in pixels for HUD map widget. 64 is one cell, 128 is 1/4 +# cell, 256 is 1/8 cell. See documentation for details. (e.g. 64 to 256). +local map hud widget size = 256 + +# Resolution of local map in GUI window in pixels. See documentation +# for details which may affect cell load performance. (e.g. 128 to 1024). +local map resolution = 256 + +# Size of local map in GUI window in pixels. (e.g. 256 to 1024). +local map widget size = 512 [GUI] + +# Scales GUI window and widget size. (<1.0 is smaller, >1.0 is larger). scaling factor = 1.0 -# 1 is fully opaque +# Transparency of GUI windows (0.0 to 1.0, transparent to opaque). menu transparency = 0.84 -# 0 - instantly, 1 - max. delay -tooltip delay = 0 +# Time until tool tip appears when hovering over an object (0.0 is +# instantly, 1.0 is the maximum delay of about 1.5 seconds). +tooltip delay = 0.0 + +# Stretch menus, load screens, etc. to the window aspect ratio. +stretch menu background = false +# Subtitles for NPC spoken dialog and some sound effects. subtitles = false +# Red flash visually showing player damage. hit fader = true + +# Werewolf overlay border around screen or window. werewolf overlay = true -stretch menu background = false +# Color for tool tips and crosshair when owned by an NPC (R G B A). +color background owned = 0.15 0.0 0.0 1.0 +color crosshair owned = 1.0 0.15 0.15 1.0 -# colour definitions (red green blue alpha) -color background owned = 0.15 0 0 1 -color crosshair owned = 1 0.15 0.15 1 +[HUD] -[General] -# Camera field of view -field of view = 55 +# Displays the crosshair or reticle when not in GUI mode. +crosshair = true + +[Game] + +# Color crosshair and tool tip when object is owned by an NPC. (O is +# no color, 1 is tool tip only, 2 is crosshair only, and 3 is both). +show owned = 0 -# Texture filtering mode. valid values: -# bilinear -# trilinear -texture filtering = +# Always use the best mode of attack: e.g. chop, slash or thrust. +best attack = false + +# Difficulty. Expressed as damage dealt and received. (e.g. -100 to 100). +difficulty = 0 + +# Show duration of magic effect and lights in the spells window. +show effect duration = false + +[General] +# Anisotropy reduces distortion in textures at low angles (e.g. 0 to 16). anisotropy = 4 +# Camera field of view in degrees (e.g. 30.0 to 110.0). +field of view = 55.0 + +# File format for screenshots. (jpg, png, tga, and possibly more). screenshot format = png -[Shadows] -# Shadows are only supported when object shaders are on! -enabled = false +# Isotropic texture filtering. (bilinear or trilinear). +texture filtering = trilinear -# Split the shadow maps, allows for a larger shadow distance -split = false +[Input] -# Increasing shadow distance will lower the shadow quality. -# Uses "shadow distance" or "split shadow distance" depending on "split" setting. -shadow distance = 1300 -# This one shouldn't be too low, otherwise you'll see artifacts. Use at least 2x max viewing distance. -split shadow distance = 14000 +# Capture control of the cursor prevent movement outside the window. +grab cursor = true -# Size of the shadow textures, higher means higher quality -texture size = 1024 +# Key controlling sneak toggles setting instead of being held down. +toggle sneak = false -# Turn on/off various shadow casters -actor shadows = true -misc shadows = true -statics shadows = true -terrain shadows = true +# Player is running by default. +always run = false -# Fraction of the total shadow distance after which the shadow starts to fade out -fade start = 0.8 +# Zoom in and out from player in third person view with mouse wheel. +allow third person zoom = false -debug = false +# Camera sensitivity when not in GUI mode. (>0.0, e.g. 0.1 to 5.0). +camera sensitivity = 1.0 -[HUD] -crosshair = true +# Vertical camera sensitivity multiplier when not in GUI mode. +# (>0.0, Because it's a multiplier values should be near 1.0) +camera y multiplier = 1.0 -[Objects] -shaders = true +# Invert the vertical axis while not in GUI mode. +invert y axis = false -[Map] -# Adjusts the scale of the global map -global map cell size = 18 +[Saves] -local map resolution = 256 +# Name of last character played, and default for loading save files. +character = -local map widget size = 512 -local map hud widget size = 256 +# Automatically save the game whenever the player rests. +autosave = true -[Cells] -exterior cell load distance = 1 +# Display the time played on each save file in the load menu. +timeplayed = false -[Camera] -near clip = 5 +[Sound] -# The maximum distance with no pop-in will be: (see RenderingManager::configureFog) -# viewing distance * view frustum factor <= cell size (8192) - loading threshold (1024) -# view frustum factor takes into account that the view frustum end is a plane, so at the edges of the screen you can see further than you should be able to. -# exact factor would depend on FOV -viewing distance = 6666 +# Name of audio device file. Blank means use the default device. +device = -# Culling of objects smaller than a pixel -small feature culling = true +# Volumes are 0.0 for silent and 1.0 for the maximum volume. -[Terrain] -distant land = false +# Master volume. Controls all other volumes. +master volume = 1.0 -shader = true +# Footsteps volume. +footsteps volume = 0.2 + +# Music tracks volume. +music volume = 0.5 + +# Sound effects volume. +sfx volume = 1.0 + +# Voice dialog volume. +voice volume = 0.8 + +[Video] + +# Resolution of the OpenMW window or screen. +resolution x = 800 +resolution y = 600 + +# OpenMW takes complete control of the screen. +fullscreen = false + +# Determines which screen OpenMW is on. (>=0). +screen = 0 + +# Minimize OpenMW if it loses cursor or keyboard focus. +minimize on focus loss = true + +# An operating system border is drawn around the OpenMW window. +window border = true + +# Anti-aliasing reduces texture distortion. (0, 2, 4, 8, 16). +antialiasing = 0 + +# Enable vertical syncing to reduce tearing defects. +vsync = false + +# Maximum frames per second. 0.0 is unlimited, or >0.0 to limit. +framerate limit = 0.0 + +# Game video contrast. (>0.0). No effect in Linux. +contrast = 1.0 + +# Video gamma setting. (>0.0). No effect in Linux. +gamma = 1.0 [Water] + +# Enable water shader with reflections and optionally refraction. shader = false +# Reflection and refraction texture size in pixels. (512, 1024, 2048). +rtt size = 512 + +# Enable refraction which affects visibility through water plane. refraction = false -rtt size = 512 +[Objects] -[Sound] -# Device name. Blank means default -device = +# Enable shaders for objects other than water. Unused. +shaders = true -# Volumes. master volume affects all other volumes. -master volume = 1.0 -sfx volume = 1.0 -music volume = 0.5 -footsteps volume = 0.2 -voice volume = 0.8 +[Terrain] +# Use shaders for terrain? Unused. +shader = true -[Input] +# Distant land is rendered? Unused. +distant land = false -grab cursor = true +[Shadows] -invert y axis = false +# Enable shadows. Other shadow settings disabled if false. Unused. +enabled = false -camera sensitivity = 1.0 +# Size of the shadow textures in pixels. Unused. (e.g. 256 to 2048). +texture size = 1024 -camera y multiplier = 1.0 +# Actors cast shadows. Unused. +actor shadows = true -always run = false +# Static objects cast shadows. Unused. +statics shadows = true -allow third person zoom = false +# Terrain cast shadows. Unused. +terrain shadows = true -toggle sneak = false +# Miscellaneous objects cast shadows. Unused. +misc shadows = true -[Game] -# Always use the most powerful attack when striking with a weapon (chop, slash or thrust) -best attack = false +# Debugging of shadows. Unused. +debug = false -difficulty = 0 +# Fraction of distance after which shadow starts to fade out. Unused. +fade start = 0.8 -# Change crosshair/toolTip color when pointing on owned object -#0: nothing changed -#1: tint toolTip -#2: tint crosshair -#3: both -show owned = 0 -# Show the remaining duration of magic effects and lights -show effect duration = false +# Split shadow maps, allowing for a larger shadow distance. Unused. +split = false -[Saves] -character = -# Save when resting -autosave = true -# display time played -timeplayed = false +# Distance for shadows if not split. Smaller is poorer. Unused. +shadow distance = 1300 + +# Distance for shadows if split. Unused. +split shadow distance = 14000 [Windows] -inventory x = 0 + +# Location and sizes of windows as a fraction of the OpenMW window or +# screen size. (0.0 to 1.0). X & Y, Width & Height. + +# Stats window displaying level, race, class, skills and stats. +stats x = 0.0 +stats y = 0.0 +stats w = 0.375 +stats h = 0.4275 + +# Spells window displaying powers, spells, and magical items. +spells x = 0.625 +spells y = 0.5725 +spells w = 0.375 +spells h = 0.4275 + +# Local and world map window. +map x = 0.625 +map y = 0.0 +map w = 0.375 +map h = 0.5725 + +# Dialog window for talking with NPCs. +dialogue x = 0.095 +dialogue y = 0.095 +dialogue w = 0.810 +dialogue h = 0.810 + +# Alchemy window for crafting potions. +alchemy x = 0.25 +alchemy y = 0.25 +alchemy w = 0.5 +alchemy h = 0.5 + +# Console command window for debugging commands. +console x = 0.0 +console y = 0.0 +console w = 1.0 +console h = 0.5 + +# Player inventory window when explicitly opened. +inventory x = 0.0 inventory y = 0.4275 inventory w = 0.6225 inventory h = 0.5725 -inventory container x = 0 +# Player inventory window when searching a container. +inventory container x = 0.0 inventory container y = 0.4275 inventory container w = 0.6225 inventory container h = 0.5725 -inventory barter x = 0 +# Player inventory window when bartering with a shopkeeper. +inventory barter x = 0.0 inventory barter y = 0.4275 inventory barter w = 0.6225 inventory barter h = 0.5725 -inventory companion x = 0 +# Player inventory window when trading with a companion. +inventory companion x = 0.0 inventory companion y = 0.4275 inventory companion w = 0.6225 inventory companion h = 0.5725 +# Container inventory when searching a container. container x = 0.25 -container y = 0 +container y = 0.0 container w = 0.75 container h = 0.375 -companion x = 0.25 -companion y = 0 -companion w = 0.75 -companion h = 0.375 - -map x = 0.625 -map y = 0 -map w = 0.375 -map h = 0.5725 - +# NPC inventory window when bartering with a shopkeeper. barter x = 0.25 -barter y = 0 +barter y = 0.0 barter w = 0.75 barter h = 0.375 -alchemy x = 0.25 -alchemy y = 0.25 -alchemy w = 0.5 -alchemy h = 0.5 - -stats x = 0 -stats y = 0 -stats w = 0.375 -stats h = 0.4275 - -spells x = 0.625 -spells y = 0.5725 -spells w = 0.375 -spells h = 0.4275 - -console x = 0 -console y = 0 -console w = 1 -console h = 0.5 - -dialogue h = 0.810 -dialogue w = 0.810 -dialogue x = 0.095 -dialogue y = 0.095 +# NPC inventory window when trading with a companion. +companion x = 0.25 +companion y = 0.0 +companion w = 0.75 +companion h = 0.375