Commit Graph

230 Commits (master)

Author SHA1 Message Date
David Cernat 59cb31e0a7 Add OpenMW commits up to 20 Mar 2021
# Conflicts:
#   apps/openmw/CMakeLists.txt
#   apps/openmw/mwmechanics/aipursue.cpp
#   components/CMakeLists.txt
4 years ago
Andrei Kortunov 38679013fe Give meaningful name to the mEffectFade 4 years ago
David Cernat e1259fdc41 Add OpenMW commits up to 4 Feb 2021
# Conflicts:
#   apps/openmw/engine.cpp
#   apps/openmw/mwmechanics/npcstats.hpp
#   apps/openmw/mwrender/globalmap.cpp
4 years ago
Andrei Kortunov 0418e8e7a6 Add an API to get base wind speed (which is from openmw.cfg) 4 years ago
David Cernat 7f435ceeac Add OpenMW commits up to 1 Nov 2020
# Conflicts:
#   CMakeLists.txt
#   apps/openmw/main.cpp
#   apps/openmw/mwclass/container.hpp
#   apps/openmw/mwclass/creature.hpp
#   apps/openmw/mwclass/npc.hpp
#   apps/openmw/mwdialogue/dialoguemanagerimp.hpp
#   apps/openmw/mwdialogue/journalimp.hpp
#   apps/openmw/mwgui/container.cpp
#   apps/openmw/mwgui/dialogue.hpp
#   apps/openmw/mwgui/mainmenu.cpp
#   apps/openmw/mwgui/windowmanagerimp.hpp
#   apps/openmw/mwmechanics/aiactivate.hpp
#   apps/openmw/mwmechanics/mechanicsmanagerimp.hpp
#   apps/openmw/mwscript/containerextensions.cpp
#   apps/openmw/mwscript/interpretercontext.hpp
#   components/CMakeLists.txt
4 years ago
Evil Eye 2c4cafa41a Change moon phase to an enum class 4 years ago
David Cernat 54301f5f89 Add OpenMW commits up to 29 Oct 2019
# Conflicts:
#	apps/openmw/mwmechanics/combat.cpp
#	apps/openmw/mwworld/inventorystore.cpp
5 years ago
David Cernat bde9f7b817 Add OpenMW commits up to 20 Oct 2019
# Conflicts:
#	apps/openmw/mwgui/recharge.cpp
#	apps/openmw/mwrender/globalmap.cpp
#	apps/openmw/mwrender/globalmap.hpp
#	apps/openmw/mwworld/inventorystore.cpp
5 years ago
David Cernat 0e94eb8b74 [General] Use regular ints for weather states for consistency w/ OpenMW 5 years ago
Capostrophic 43b1b9dfa2 Weather-related fixes (incl. bug #4783)
Simplify some calculations
Fix Blizzard weather direction
Fix sky direction during storm
5 years ago
Andrei Kortunov 606b73ee96 Use rain settings from openmw.cfg (bug #4262) 5 years ago
Andrei Kortunov e5564df8cb Implement vanilla-style wind speed calculations (bug #4449) 5 years ago
David Cernat b57c0bcafe Add OpenMW commits up to 6 June 2019
# Conflicts:
#	apps/openmw/mwgui/hud.cpp
#	apps/openmw/mwgui/jailscreen.cpp
#	apps/openmw/mwgui/waitdialog.cpp
#	apps/openmw/mwinput/inputmanagerimp.cpp
#	apps/openmw/mwworld/worldimp.hpp
5 years ago
David Cernat 5181c601c0 Add OpenMW commits up to 2 May 2019
# Conflicts:
#	CMakeLists.txt
#	apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
#	apps/openmw/mwscript/statsextensions.cpp
5 years ago
David Cernat 8729c3c5e3 Add OpenMW commits up to 9 Mar 2019
# Conflicts:
#	.travis.yml
#	CI/before_script.linux.sh
#	README.md
#	apps/openmw/mwgui/jailscreen.cpp
#	apps/openmw/mwscript/animationextensions.cpp
#	apps/openmw/mwscript/guiextensions.cpp
#	apps/openmw/mwscript/miscextensions.cpp
#	apps/openmw/mwscript/soundextensions.cpp
5 years ago
David Cernat 95a5607509 Add OpenMW commits up to 22 Feb 2019
# Conflicts:
#	CMakeLists.txt
#	apps/openmw/mwmechanics/spellcasting.cpp
#	apps/openmw/mwscript/containerextensions.cpp
5 years ago
David Cernat fba07194cf Add OpenMW commits up to 29 Oct 2018
# Conflicts:
#	apps/openmw/mwbase/world.hpp
#	apps/openmw/mwinput/inputmanagerimp.cpp
#	apps/openmw/mwmechanics/actors.cpp
#	apps/openmw/mwmechanics/aicombat.cpp
#	apps/openmw/mwmechanics/character.cpp
#	apps/openmw/mwworld/worldimp.cpp
#	apps/openmw/mwworld/worldimp.hpp
5 years ago
David Cernat 889bcec7f8 Add OpenMW commits up to 1 Sep 2018
# Conflicts:
#	apps/openmw/mwbase/world.hpp
#	apps/openmw/mwclass/creature.cpp
#	apps/openmw/mwclass/npc.cpp
#	apps/openmw/mwgui/jailscreen.cpp
#	apps/openmw/mwmechanics/actors.cpp
#	apps/openmw/mwmechanics/difficultyscaling.cpp
#	apps/openmw/mwscript/transformationextensions.cpp
#	apps/openmw/mwworld/worldimp.hpp
5 years ago
David Cernat 0339958e21 [General] Rename Log class into TimedLog 5 years ago
Capostrophic e7208bb80e Improve face shielding behavior in general case (bug #4240) 6 years ago
Andrei Kortunov a302ec9c65 Make fallback map static to simplify constructors 6 years ago
Andrei Kortunov d23a0ce2ae Use C++11-style loops in the game world instead of iterators 6 years ago
Andrei Kortunov 3032b177a1 Remove redundant includes 6 years ago
Capostrophic 796b87fde7 Fix upside-down night-time lighting 6 years ago
Andrei Kortunov 9e4a339ad3 Daytime node switch support (feature #4836) 6 years ago
Capostrophic 2e98cad895 Fade out sun glare and specularity completely at night start, not sunset start 6 years ago
Capostrophic 52da65b776 Fix issues with sun specularity (bug #4527) 6 years ago
David Cernat dcd4478028 [Client] Always stop sending weather updates when moving to an interior 6 years ago
Capostrophic 7ef6fa9f61 Remove deprecated GMST get* functions 6 years ago
David Cernat 892d71ce71 [General] Reimplement weather synchronization to allow soft transitions
Although weather sync was added by Koncord to the rewrite in fd721143e2 in a way that used surprisingly few lines of code, it relied on the server requesting weather states every second from authority players and sending them to non-authority players, while also allowing only very sudden weather transitions across regions, i.e. if there was one player in the Ascadian Isles who had stormy weather, and another player with clear weather in the Bitter Coast Region walked across to the Ascadian Isles, that player was instantly made to have stormy weather with no kind of transition at all.

My approach solves both of those problems. It solves the packet spam by only sending weather updates to the server when weather changes happen or when there are new arrivals to a weather authority's region, and it allows for both sudden weather transitions when players teleport to a region and for soft, gradual transitions when players walk across to a region. It is inspired by my previous actor sync, and uses a WorldRegionAuthority packet to set players as region authorities in a similar way to how ActorAuthority sets players as cell AI authorities. Weather changes are created only by the region authority for a given region, and weather packets are also only sent by that authority.

However, it should be noted that gradual weather transitions are used by default in this implementation. To use sudden weather transitions, the serverside Lua scripts need to forward WorldWeather packets with the forceWeather boolean set to true. That is, however, already handled by our default Lua scripts in situations where it makes sense.
7 years ago
Andrei Kortunov 4ba361fea6 Unhardcode sunset and sunrise settings (bug #1990) 7 years ago
tri4ng1e d4d1703bcf
Some PVS-Studio and cppcheck fixes
cppcheck:
[apps/esmtool/record.cpp:697]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[apps/esmtool/record.cpp:1126]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[apps/esmtool/record.cpp:1138]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[apps/niftest/niftest.cpp:36]: (performance) Function parameter 'filename' should be passed by reference.
[apps/niftest/niftest.cpp:41]: (performance) Function parameter 'filename' should be passed by reference.
[apps/opencs/model/prefs/boolsetting.cpp:25]: (warning) Possible leak in public function. The pointer 'mWidget' is not deallocated before it is allocated.
[apps/opencs/model/prefs/shortcuteventhandler.cpp:52]: (warning) Return value of std::remove() ignored. Elements remain in container.
[apps/openmw/mwstate/quicksavemanager.cpp:5]: (performance) Variable 'mSaveName' is assigned in constructor body. Consider performing initialization in initialization list.

PVS-Studio:
apps/opencs/model/filter/parser.cpp  582  warn  V560 A part of conditional expression is always true: allowPredefined.
apps/opencs/view/world/referencecreator.cpp  67  warn  V547 Expression '!errors.empty()' is always false.
apps/opencs/view/world/referencecreator.cpp  74  warn  V547 Expression '!errors.empty()' is always false.
apps/opencs/view/doc/loader.cpp  170  warn  V560 A part of conditional expression is always true: !completed.
apps/opencs/view/doc/loader.cpp  170  warn  V560 A part of conditional expression is always true: !error.empty().
apps/opencs/model/tools/pathgridcheck.cpp  32  err  V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 32, 34.
apps/opencs/model/world/refidadapterimp.cpp  1376  err  V547 Expression 'subColIndex < 3' is always true.

apps/openmw/mwgui/widgets.hpp  318  warn  V703 It is odd that the 'mEnableRepeat' field in derived class 'MWScrollBar' overwrites field in base class 'ScrollBar'. Check lines: widgets.hpp:318, MyGUI_ScrollBar.h:179.
apps/openmw/mwgui/widgets.hpp  319  warn  V703 It is odd that the 'mRepeatTriggerTime' field in derived class 'MWScrollBar' overwrites field in base class 'ScrollBar'. Check lines: widgets.hpp:319, MyGUI_ScrollBar.h:180.
apps/openmw/mwgui/widgets.hpp  320  warn  V703 It is odd that the 'mRepeatStepTime' field in derived class 'MWScrollBar' overwrites field in base class 'ScrollBar'. Check lines: widgets.hpp:320, MyGUI_ScrollBar.h:181
apps/openmw/mwmechanics/actors.cpp  1425  warn  V547 Expression '!detected' is always true.
apps/openmw/mwmechanics/character.cpp  2155  err  V547 Expression 'mode == 0' is always true.
apps/openmw/mwmechanics/character.cpp  1192  warn  V592 The expression was enclosed by parentheses twice: ((expression)). One pair of parentheses is unnecessary or misprint is present.
apps/openmw/mwmechanics/character.cpp  521  warn  V560 A part of conditional expression is always true: (idle == mIdleState).
apps/openmw/mwmechanics/pathfinding.cpp  317  err  V547 Expression 'mPath.size() >= 2' is always true.
apps/openmw/mwscript/interpretercontext.cpp  409  warn  V560 A part of conditional expression is always false: rank > 9.
apps/openmw/mwgui/windowbase.cpp  28  warn  V560 A part of conditional expression is always true: !visible.
apps/openmw/mwgui/journalwindow.cpp  561  warn  V547 Expression '!mAllQuests' is always false.
apps/openmw/mwgui/referenceinterface.cpp  18  warn  V571 Recurring check. The '!mPtr.isEmpty()' condition was already verified in line 16.
apps/openmw/mwworld/scene.cpp  463  warn  V547 Expression 'adjustPlayerPos' is always true.
apps/openmw/mwworld/worldimp.cpp  409  err  V766 An item with the same key '"sCompanionShare"' has already been added.
apps/openmw/mwworld/cellstore.cpp  691  warn  V519 The 'state.mWaterLevel' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 689, 691.
apps/openmw/mwworld/weather.cpp  1125  warn  V519 The 'mResult.mParticleEffect' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1123, 1125.
apps/openmw/mwworld/weather.cpp  1137  warn  V519 The 'mResult.mParticleEffect' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1135, 1137.

apps/wizard/unshield/unshieldworker.cpp  475  warn  V728 An excessive check can be simplified. The '(A && B) || (!A && !B)' expression is equivalent to the 'bool(A) == bool(B)' expression.
apps/wizard/installationpage.cpp  163  warn  V735 Possibly an incorrect HTML. The "</p" closing tag was encountered, while the "</span" tag was expected.

components/fontloader/fontloader.cpp  427  err  V547 Expression 'i == 1' is always true.
components/nifosg/nifloader.cpp  282  warn  V519 The 'created' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 278, 282.
components/esm/loadregn.cpp  119  err  V586 The 'clear' function is called twice for deallocation of the same resource. Check lines: 112, 119.
components/esm/cellref.cpp  178  warn  V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 175, 178.
components/esmterrain/storage.cpp  235  warn  V560 A part of conditional expression is always true: colStart == 0.
components/esmterrain/storage.cpp  237  warn  V560 A part of conditional expression is always true: rowStart == 0.
7 years ago
scrawl 0982d2175a
Merge pull request #1473 7 years ago
Andrei Kortunov fed3e56fc1 Weather manager: get rid of World dependency 7 years ago
Andrei Kortunov a0a30cdbf5 AI: hide torches during bad weather (bug #4334) 7 years ago
Chris Robinson 4caa7c9674 Workaround older MSVC quirk 7 years ago
Chris Robinson 154cc8c659 Use alternate fog parameters when distant land is enabled
This allows the distant land to actually be seen when the user enables it. The
values used are replicated from MGE XE's default settings and should probably
be exposed somewhere.
7 years ago
Chris Robinson 780e82480d Make the PlayMode and PlayType enums scoped
Also shorten them by putting them in the MWSound namespace
7 years ago
Chris Robinson 1fe60dd8e2 Replace some shared_ptrs with pointers to deque entries 7 years ago
scrawl 342c25dffa Fix weather sounds playing at full volume before fading in 8 years ago
scrawl dc1f788cff Use osg::PI over M_PI 8 years ago
Leon Krieg c7b4b2cdd7 Fixed multiple spelling mistakes 8 years ago
MiroslavR 7b59eda13a Import base weather states before loading region modifiers (Fixes #3594) 8 years ago
Bret Curtis 0547d4b937 clang says that these must be in the MWWorld namespace 9 years ago
scrawl b0180cb6b4 Fix current region check (Bug #3391) 9 years ago
scrawl 59cfcb38e2 Scale the sunlight specular color by weather's GlareView value (Fixes #3375) 9 years ago
scrawl 41c571d4f4 Merge branch 'master' of https://github.com/OpenMW/openmw into lighting
Conflicts:
	apps/opencs/view/render/instancemode.cpp
9 years ago
scrawl 0b84b3c2cf Don't crash when region weather chances don't add to 100
The invalid weather ID was resulting in out-of-bounds vector access later in the code.
9 years ago
scrawl 6546c05428 Move Fallback map to components/ 9 years ago
scrawl 7a2ca5580a Accept a ConstPtr in RippleSimulation 9 years ago