Commit Graph

16139 Commits (sol2-server-rewrite)

Author SHA1 Message Date
David Cernat c5f33e451f Merge pull request #418 from TES3MP/0.6.3 while resolving conflicts 7 years ago
Nelsson Huotari 1c79d5311c Brush history menu 7 years ago
Nelsson Huotari d2cf764a46 Tooltips, fixes 7 years ago
Nelsson Huotari 62066f01bd clean-up 7 years ago
Nelsson Huotari d33c98c68d Revert unintended changes 7 years ago
Nelsson Huotari 5656745445 Select dragged texture-assets, add brush settings widget-type, fixes. 7 years ago
Nelsson Huotari baa707b5e3 User setting for selective cell editing or new land creation 7 years ago
Nelsson Huotari 24977fcc0f improve hit calculation accuracy for texture editing 7 years ago
Nelsson Huotari e8a9bff85c Drop textures to landtextures from assets (try-method) 7 years ago
Nelsson Huotari 7139889566 Brush button window opens at modebutton, slider 1-50, doxygen comments 7 years ago
Nelsson Huotari 20d1d8ac89 Fixed brush calculations, implement undostack macro when clicked. 7 years ago
Nelsson Huotari 5f3c8b2b99 c_str -> fromStdString, remove TextureBrushButton class 7 years ago
Nelsson Huotari cf7a0f715e Command macro for complete drag-editing operations. 7 years ago
Nelsson Huotari 9f742d5b1f Brush affects adjancent cells 7 years ago
Nelsson Huotari 1ca2710a2a Formatting, fixes 7 years ago
Nelsson Huotari 1c113eca9c 15 to landTextureSize-1 7 years ago
Nelsson Huotari 3327d6f7c4 Drag terrain painting, code cleanup 7 years ago
Nelsson Huotari a54a1b9940 Command system and undo 7 years ago
Nelsson Huotari cc415526b0 fix texture index +1, better icons 7 years ago
Nelsson Huotari 316d05bdc4 {} to () 7 years ago
Nelsson Huotari 4649d1258c Direct data terrain editing 7 years ago
Nelsson Huotari 4ae75d1d20 Terrain texture brush frame 7 years ago
David Cernat 12727b66ea [Server] Use consistent variable names in map tile script functions 7 years ago
David Cernat 7f00005f04 [Client] Fix GCC build
Based on 71040659ac
7 years ago
David Cernat 32d71de2f5 Update MapWindow every frame, not just when it's open (bug #4279) 7 years ago
Alf Henrik Sauge feeee50a88 Dropping a separate NPDTstruct12 object and instead use NPDTstruct52
NPDTstruct12 is now only used when loading and saving. Turning auto calc
on and off now no longer switches between to different set of values
7 years ago
tri4ng1e 103a07b744
Less cryptic abbreviations 7 years ago
Marc Zinnschlag 3197ebd8e7 Merged pull request #1694 7 years ago
David Cernat 715012f087 [General] Implement sending of image data for map tiles in PlayerMap 7 years ago
Andrei Kortunov 2f89080b36 Load default markers definitions in editor 7 years ago
Andrei Kortunov b15bed8e22 Avoid excessive loadSound calls 7 years ago
tri4ng1e 905cde10db
Smart-sorting in iniimporter (time + dependency) 7 years ago
Marc Zinnschlag 53b6ef6f8c minor code cleanup 7 years ago
Marc Zinnschlag e661e3cf74 Merged pull request #1677 7 years ago
Alf Henrik Sauge 9b971caddc CSVTools::ReportTable should now have case insensitive sorting 7 years ago
Andrei Kortunov 17222eb821 Get rid of unnecessary find 7 years ago
Bret Curtis c44f87afd1
Merge pull request #1699 from Capostrophic/editorwarnings
Editor verifier updates
7 years ago
Bret Curtis 0fc198be52
Merge pull request #1698 from Capostrophic/c++11
A bunch of C++11-related updates
7 years ago
Capostrophic 2502d53816
Object record verifier updates
Removed light 0 duration warning
Spelling fixes
7 years ago
Capostrophic 91b97a27ea
Remove empty class description warning 7 years ago
Capostrophic e22409c266
Fix sound range warning message 7 years ago
Andrei Kortunov 3636cf2015 Do not apply queue movement for standing actors 7 years ago
Capostrophic 3d3bef94cd
Use range-based for loop 7 years ago
Andrei Kortunov 1dd36329a3 Load default markers definitions (bug #4410) 7 years ago
Bret Curtis c219c89603
Merge pull request #1696 from Capostrophic/feature-2694
Rename "Model" column to "Model/Animation" (feature #2694)
7 years ago
Capostrophic 9ac9f94638
Rename "Model" column to "Model/Animation" (feature #2694) 7 years ago
David Cernat 980ddcb114 [Server] Add DoesFileExist() script function 7 years ago
Capostrophic 8be93b4a12
Initialize mandatoryIds vector C++11-way 7 years ago
Capostrophic 85b7aa4f09
Uncomment is_pod test in fixed string tests 7 years ago
Nelsson Huotari e4e225f4e7 Add topic, journal and related -info icons. 7 years ago
David Cernat 4846497078 Merge pull request #415 from TES3MP/0.6.3 while resolving conflicts
Conflicts:
	apps/openmw-mp/Script/Functions/Positions.cpp
	apps/openmw-mp/Script/Functions/Positions.hpp
	apps/openmw-mp/Script/Functions/World.cpp
	apps/openmw-mp/Script/Functions/World.hpp
	apps/openmw-mp/Script/Script.hpp
	apps/openmw-mp/Script/ScriptFunctions.cpp
	components/openmw-mp/Base/BasePlayer.hpp
7 years ago
David Cernat 51fd937250 [Server] Remove hardcoded debug messages when using script callbacks 7 years ago
David Cernat df0f9b0f5e [Client] Require a certain Skill progress amount before sending packet 7 years ago
David Cernat 1b1e5e86d1 [Client] Avoid sending CellStates to server after initialization
Although b4e8560698 made players instantly able to see each other on minimalist servers that did not change their cells from the default, it created problems with the default CoreScripts where players need to be logged in before receipt of a CellStates packet from them is taken into account, with the result being that a player was recorded as having loaded their initial cells on the server's C++ side but not on the Lua side.

It may simply be best to expect servers to set player cells.
7 years ago
Andrei Kortunov 4872edc5ed Prevent PlaySound overlapping 7 years ago
Andrei Kortunov 22fb1f3403 Play spellcasting effects from objects 7 years ago
David Cernat 099f85be0a [General] Implement PlayerMomentum packet & associated script functions 7 years ago
David Cernat 273179fd5a
Merge pull request #414 from OpenMW/master
Add OpenMW commits up to 29 Apr 2018
7 years ago
David Cernat 4b501a39f4 [General] Implement DoorDestination packet & associated script functions 7 years ago
David Cernat d47b06fe7a [Server] Prevent SetGameMode() and SetHostname() from crashing server
Previously, turning off communication with the MasterServer from the server config and then attempting to use SetGameMode() or SetHostname() led to a server crash.
7 years ago
scrawl b995584ad2
Merge pull request #1688 7 years ago
David Cernat 502751cae0 Merge pull request #413 from TES3MP/0.6.3 while resolving conflicts
Conflicts:
	apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp
	components/openmw-mp/Base/BasePlayer.hpp
	components/openmw-mp/Packets/Player/PacketPlayerEquipment.hpp
	components/openmw-mp/Packets/Player/PacketPlayerSkill.cpp
7 years ago
David Cernat 3b07dc4b42 [Client] Send equipment packets whenever an item charge or count changes
Since the beginnings of TES3MP, equipment packets have only been sent whenever an item has been replaced by an item with a different refId, with changes in an item's charge or count not sending a packet (but being included in the next packet sent as a result of a refId change). The reason for this was ostensibly the fact that every single equipment packet always included the details for all 19 equipment items (as per Koncord's original design decision), which would have led to massive packet spam if such a packet was sent every time you shot an arrow or lost a little bit of your armor's condition.

With minimalist equipment packets, it is now viable to send equipment packets whenever any item changes in some way, by having the equipment packet contain only that one item.
7 years ago
David Cernat 399e049d87 [Client] Fix logic for minimal size packets in LocalPlayer
Previously, the index changes were not cleared at the start of their corresponding update functions, which in turn meant that an Attribute/Skill/StatsDynamic/Equipment packet received by a player from the server made that player send back the same packet, as the index changes from it were retained.

Additionally, exchangeFullInfo was not set to false, thus sometimes leading to constant full exchanges of information.
7 years ago
David Cernat 66d5109509 [General] Fix information exchange for players sharing a cell
Previously, two players entering the same cell only sent and received their latest changes for dynamic stats, attributes, skills and equipment when they started sharing that cell.
7 years ago
David Cernat 7db74509e0 Merge pull request #412 from OpenMW/master while resolving conflicts
# Conflicts:
#	apps/openmw/mwscript/transformationextensions.cpp
7 years ago
Capostrophic 6b47f72959
Set character preview scene ambient to 0, 0, 0 7 years ago
scrawl bdf1070852
Merge pull request #1688 7 years ago
scrawl f0507e6b46
Merge pull request #1686 7 years ago
Capostrophic bfcdf660f2 Utilize inventory character preview lighting rotation fallback settings 7 years ago
Capostrophic 9073e4d4ba Initialize playlist file list in playPlaylist (fixes #4134) 7 years ago
Capostrophic b69e812a52 Utilize inventory character preview lighting color fallback settings 7 years ago
scrawl d8d26f1de8
Merge pull request #1685 7 years ago
scrawl ec4e2f0064
Merge pull request #1684 7 years ago
David Cernat 608dcbafe6 [Client] Fix skill updates for LocalPlayer partially broken by 78441c769a 7 years ago
Evgeny Kurnevsky c025b8f8f3
Remove useless comparison. 7 years ago
David Cernat 02eef933fd
Merge pull request #411 from OpenMW/master
Add OpenMW commits up to 19 Apr 2018
7 years ago
David Cernat d58efde3f1 Merge pull request #410 from TES3MP/0.6.3 while resolving conflicts
Conflicts:
	apps/openmw-mp/Script/Functions/Actors.cpp
	apps/openmw-mp/Script/Functions/Chat.cpp
	apps/openmw-mp/Script/Functions/GUI.hpp
	apps/openmw-mp/Script/Functions/Items.cpp
	apps/openmw-mp/Script/Functions/Stats.cpp
	apps/openmw-mp/Script/Functions/Stats.hpp
	apps/openmw-mp/Script/ScriptFunctions.cpp
	apps/openmw-mp/Script/ScriptFunctions.hpp
	apps/openmw-mp/processors/player/ProcessorPlayerCharGen.hpp
	apps/openmw/mwmp/Cell.cpp
	apps/openmw/mwmp/DedicatedActor.cpp
	apps/openmw/mwmp/DedicatedPlayer.cpp
	apps/openmw/mwmp/LocalActor.cpp
	apps/openmw/mwmp/LocalPlayer.cpp
	apps/openmw/mwmp/LocalPlayer.hpp
	apps/openmw/mwmp/Main.cpp
	components/openmw-mp/Base/BaseActor.hpp
	components/openmw-mp/Base/BasePlayer.hpp
	components/openmw-mp/Packets/Player/PacketPlayerAttribute.cpp
	components/openmw-mp/Packets/Player/PacketPlayerSkill.cpp
7 years ago
David Cernat a541d7df3c [General] Rework PlayerStatsDynamic packets so they are of minimal size
(cherry picked from commit fc5e883160)
7 years ago
David Cernat b9520c11da [General] Rework PlayerEquipment packets so they are of minimal size
Moreover, rename BaseNetCreature's equipedItems into equipmentItems.

(cherry picked from commit d1ad0c91f8)
7 years ago
Capostrophic 37dc3200d1 Inherit the calling object scale in PlaceAt (fixes #4308) 7 years ago
David Cernat c5b08d6109 [General] Simplify storing of attribute and skill index changes
(cherry picked from commit bd9e8bd10f)
7 years ago
David Cernat 2c77d5f498 [General] Set enforcedLogLevel to -1 when initializing BasePlayer 7 years ago
David Cernat 7b702bf8c2 [General] Add and use utility function for int value checks in vectors
(cherry picked from commit a796f81444)
7 years ago
David Cernat b6099024df [General] Rework PlayerAttribute packets so they are of minimal size
Previously, whenever a single attribute value changed for a player, that player then sent a PlayerAttribute packet with all values for all 8 attributes.

This did not cause anywhere as much packet spam as PlayerSkill used to, but there was no good reason not to fix it as well.

(cherry picked from commit b0965f094a)
7 years ago
David Cernat 78441c769a [General] Rework PlayerSkill packets so they are of minimal size
Previously, whenever a single skill value changed for a player, that player then sent a PlayerSkill packet with all values for all 27 skills, plus the player's progress towards the next level and the bonuses to each attribute on the next level up as the result of sklll increases thus far.

This commit makes PlayerSkill contain only the values of specific skills, moves the player's progress towards the next level to PlayerLevel packets, and moves the bonuses to each attribute on the next level up to PlayerAttribute packets.

Players now also send a PlayerSkill packet whenever their progress towards a new point in a skill changes. This was previously avoided so as to not have massive packet spam.

(cherry picked from commit ef79a98544)
7 years ago
scrawl 5d1b40c5ea
Merge pull request #1678 7 years ago
David Cernat af4fcb7261 [Client] Don't force skill update on cell change
Previously, an attempt by the server to simultaneously change a player's cell and skills (as you'd expect when a player file is loaded) led to:

1) The server sending the cell packet first and the skill packet afterwards

2) The player receiving the cell packet and sending their own skill packet as part of the client's forced skill update

3) The player receiving the skill packet from the server

4) The server receiving the skill packet from the player

The result was that, if the player then left the server without sending another skill packet, the server's memory retained the skills the player had sent instead of the skills it had sent to the player.

This is the first step in a solution to that situation and similar ones.

(cherry picked from commit cac4684986)

Note: In 0.6.x, this was only a problem if a player's cell was set by the server first and their skills were set next, i.e. this was not a problem in the default CoreScripts because the opposite order used there masked the problem. It was a more significant problem in 0.7 because all packets were queued for a player and sent in a specific hardcoded order.
7 years ago
David Cernat 57070b7f5c [Client] Disable automatic transition to other chargen menus from OpenMW
Previously, after finishing the TES3MP chargen once, mCreationStage was set to 4 in OpenMW, which in turn made it impossible to go through only specific chargen menus again as the result of the relevant TES3MP script function (tes3mp.SetCharGenStage(pid, startStage, endStage) in 0.6.3, player:setCharGenStages(startStage, endStage) in 0.7). In other words, trying to allow a player to just choose their class again made it so the player started at that menu and went through all the other subsequent menus as well, i.e. the player went through the class, birthsign and review menus.
7 years ago
David Cernat 28f1c1b0d3 [General] Rework CharGen slightly for clarity purposes
Previously, charGenStage.end was doing double duty as both the variable indicating the number of CharGen stages and – when set to 0 – the variable indicating that CharGen was over. The latter role is now filled by a new boolean.

(cherry picked from commit 926106cf8c)
7 years ago
David Cernat 9d46de88e0 [Client] Send cell states correctly after inputting name
Previously, initial cell states were sent in LocalPlayer::processCharGen() and were ignored by the server because the player was not yet regarded as loaded. The result was that existing players logging in could not see each other until they went through at least one cell change.

(cherry picked from commit b4e8560698)

# Conflicts:
#	apps/openmw/mwmp/LocalPlayer.cpp
7 years ago
David Cernat 306252ecdc [Server] Fix confusing script function names 7 years ago
Capostrophic 8617d0603b Display a message if a spell the player tries to use via a quick key is missing (fixes #4391) 7 years ago
David Cernat e355dca4dd Merge pull request #409 from TES3MP/0.6.3 while resolving conflicts
Conflicts:
	apps/openmw-mp/CMakeLists.txt
	apps/openmw-mp/Script/Functions/GUI.cpp
	apps/openmw-mp/Script/Functions/GUI.hpp
	apps/openmw-mp/Script/Functions/Items.hpp
	apps/openmw-mp/Script/Functions/Mechanics.cpp
	apps/openmw-mp/Script/Functions/Mechanics.hpp
	apps/openmw-mp/Script/Functions/Stats.cpp
	apps/openmw-mp/Script/Functions/Stats.hpp
	apps/openmw-mp/Script/ScriptFunctions.cpp
	apps/openmw-mp/Script/ScriptFunctions.hpp
7 years ago
David Cernat 9e5ddeac50
Merge pull request #408 from OpenMW/master
Add OpenMW commits up to 18 Apr 2018
7 years ago
tri4ng1e d310d36ea3
[Fix] Some PVS-Studio and cppcheck fixes 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
David Cernat 311f770de7 [Server] Document script functions, part 4
Additionally, clean up some variable names.
7 years ago
David Cernat 76e7392a84 [Server] Create ShapeshiftFunctions and move relevant functions there 7 years ago
David Cernat 2bb7a4253e [Server] Forcibly kick players after too many handshake attempts 7 years ago
Andreas Sturmlechner 2c9d46a60b
Fix build with Qt 5.11_beta3 (dropping qt5_use_modules) 7 years ago
David Cernat 17678ee60f
Merge pull request #407 from OpenMW/master
Add OpenMW commits up to 17 Apr 2018
7 years ago
David Cernat 50fe54af5d [Client] Update DedicatedPlayer creature if displayCreatureName changes 7 years ago
David Cernat 36e0f0471a [Server] Add SetCreatureNameDisplayState script function 7 years ago
Nelsson Huotari af558e07a3 implement +6 icons 7 years ago
Nelsson Huotari 69aacdff17 Lamoot's new icon set 7 years ago
David Cernat ed15d9ebf5 Merge pull request #406 from TES3MP/0.6.3 while resolving conflicts
Conflicts:
	apps/openmw-mp/Script/Functions/Mechanics.cpp
	apps/openmw-mp/Script/Functions/Mechanics.hpp
	components/openmw-mp/Base/BasePlayer.hpp
7 years ago
David Cernat db41704e52 [Server] Use clearer function name for checking creature name display 7 years ago
David Cernat a01fc577f1 [Client] Add setAttributes() and setSkills() methods to DedicatedPlayer 7 years ago
David Cernat 716809f2db [Client] Prevent errors from NPC-only packets for DedicatedPlayers 7 years ago
David Cernat 68ee64902d [Client] Track & use previous race & creatureRefId for DedicatedPlayers 7 years ago
David Cernat acb1335d78 [Client] Make creature disguises update correctly 7 years ago
David Cernat 70f9cb535e [General] Use RecordHelper methods to create and update DedicatedPlayers 7 years ago
Andrei Kortunov 174b3d2249 Reset an inventory filter after reload or a new game start (bug #4392) 7 years ago
David Cernat 49e94725aa [Client] Prevent MechanicsManager::playerLoaded() from enabling AI 7 years ago
David Cernat 9d27f5f154 [Client] Create RecordHelper class with initial NPC and creature methods 7 years ago
David Cernat 9697595857 [Client] Don't equip already equipped items in local setEquipment()
This avoids the following error when receiving repeated PlayerBaseInfo packets: "Error in frame: Invalid slot, make sure you are not calling RefData::setCount for a container object"

Additionally, only re-equip items as the result of a PlayerBaseInfo packet if resetStats is true (because of its side effect of auto-equipping items for the player).
7 years ago
David Cernat 72463cfdb6 [Client] Refresh equipment for DedicatedPlayers when setting base info
Additionally, move default fatigue value to DedicatedPlayer initialization.
7 years ago
David Cernat 2390744b45 Merge pull request #404 from TES3MP/0.6.3 while resolving conflicts
Conflicts:
	apps/openmw-mp/Player.hpp
	apps/openmw-mp/Script/Functions/Mechanics.cpp
	apps/openmw-mp/Script/Functions/Mechanics.hpp
	apps/openmw-mp/Script/Functions/Settings.hpp
	apps/openmw-mp/Script/Functions/Stats.cpp
	apps/openmw-mp/Script/Functions/Stats.hpp
	components/openmw-mp/Base/BasePlayer.hpp
7 years ago
David Cernat fa652964fd
Merge pull request #403 from OpenMW/master
Add OpenMW commits up to 9 Apr 2018
7 years ago
Capostrophic d9acd19dc0
Merge branch 'master' into illusion 7 years ago
scrawl 0982d2175a
Merge pull request #1473 7 years ago
scrawl 92d0fb2981
Merge pull request #1667 7 years ago
scrawl 35300c04cd
Merge pull request #1671 7 years ago
scrawl 308551ad49
Merge pull request #1644 7 years ago
scrawl cbddb4a0a9
Merge pull request #1638 7 years ago
David Cernat bdc9132e7c [General] Add SetResetStats server script function
Add reading and writing of resetStats variable to PlayerBaseInfo Packet

Fix typos in various server script function descriptions
7 years ago
David Cernat 73dea494c4 [General] Allow changes from PlayerBaseInfo without player stat reset 7 years ago
Capostrophic cddc0914c8 Option to charge for all companions travelling (fixes #4064) 7 years ago
David Cernat 34893ff631 [Server] Split up handshake handling into multiple functions for debug
Unfortunately, the handshake attempt limit implemented in 4ebfcc4a21 for 0.7 and then ported over to 0.6 in a3a341fee6 does not appear to work properly, which is why gathering more information on it is important.
7 years ago
David Cernat c132dc70d2 [Client] Make PlayerShapeshift turn DedicatedPlayers into creatures 7 years ago
David Cernat 141eb8b7c2 [Client] Streamline creation of references for DedicatedPlayers
Additionally, delete DedicatedPlayers who disconnect.

Previously, all disconnected DedicatedPlayers were still kept in memory, but never used again. There was code that suggested they were meant to be reused upon reconnecting, but that reuse had never actually been implemented, and would probably not be that useful anyway.
7 years ago
David Cernat 14f90e773d [Client] Split up creation of DedicatedPlayers into multiple methods
Additionally, print player guids using their string representations for consistency.

The creation and updating of DedicatedPlayer references remains very inelegant, but this commit is the first step towards fixing that.
7 years ago
Capostrophic 77467f17c9
Fix a typo 7 years ago
David Cernat c8abd11f5d [General] Move creature disguises for players to PlayerShapeshift packet
Additionally, make associated variables clearer, and move associated server script functions next to other shapeshifting functions.
7 years ago
David Cernat c3b44e11fb
Merge pull request #402 from TES3MP/0.6.3
Add 0.6.3 commits up to 5 Apr 2018
7 years ago
David Cernat 34be9383e5 [General] Add isPlayer boolean to targets in packets 7 years ago
David Cernat 0eed05610b [Client] Fix autoequipping for creatures in WorldEvent::editContainers() 7 years ago
David Cernat a86c68c5a1 [General] Add sync for ranged weapon & projectile strike enchantments 7 years ago
David Cernat 3f8d94b030 [General] Synchronize strike enchantments in combat 7 years ago
Andrei Kortunov 27c831959e Handle OnPCHitMe variable (bug #2703) 7 years ago
David Cernat f50637bdd4 Merge pull request #401 from TES3MP/0.6.3 while resolving conflicts
# Conflicts:
#	apps/openmw-mp/processors/world/ProcessorContainer.hpp
#	apps/openmw/mwmp/WorldEvent.cpp
7 years ago
David Cernat 76468dc8c6 [Server] Remove remnant of hardcoded container sync 7 years ago
David Cernat e3c43c6af7 Merge pull request #400 from OpenMW/master while resolving conflicts
# Conflicts:
#	apps/openmw/mwmechanics/spellcasting.cpp
7 years ago
Capostrophic 4f64ba7b7f Implement sBookSkillMessage GMST 7 years ago
scrawl c6abec1e51
Merge pull request #1641 7 years ago
scrawl 0071878106
Merge pull request #1642 7 years ago
scrawl d935e78f93
Merge pull request #1645 7 years ago
scrawl c610b8acc8
Merge pull request #1649 7 years ago
scrawl cd9f767e29
Merge pull request #1650 7 years ago
scrawl 8e37f6bf3e
Merge pull request #1656 7 years ago
scrawl f36adfec5f
Merge pull request #1657 7 years ago
scrawl 80a8ef6d49
Merge pull request #1661 7 years ago
Koncord 6131ada0ba [Browser] Add compatibility compilation mode 7 years ago
elsid 14daadded7
Add virtual destructors
To fix warnings:
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/bits/shared_ptr_base.h:588:8: warning: delete called on non-final 'NifOsg::ControllerFunction' that has virtual functions but non-virtual destructor
      [-Wdelete-non-virtual-dtor]
              delete __p;
              ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/bits/shared_ptr_base.h:595:4: note: in instantiation of function template specialization
      'std::__shared_count<__gnu_cxx::_S_atomic>::__shared_count<NifOsg::ControllerFunction *>' requested here
        : __shared_count(__p)
          ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/bits/shared_ptr_base.h:1079:17: note: in instantiation of function template specialization
      'std::__shared_count<__gnu_cxx::_S_atomic>::__shared_count<NifOsg::ControllerFunction *>' requested here
        : _M_ptr(__p), _M_refcount(__p, typename is_array<_Tp>::type())
                       ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/bits/shared_ptr.h:129:25: note: in instantiation of function template specialization 'std::__shared_ptr<NifOsg::ControllerFunction,
      __gnu_cxx::_S_atomic>::__shared_ptr<NifOsg::ControllerFunction, void>' requested here
        shared_ptr(_Yp* __p) : __shared_ptr<_Tp>(__p) { }
                               ^
/home/elsid/dev/openmw/components/nifosg/nifloader.cpp:242:39: note: in instantiation of function template specialization 'std::shared_ptr<NifOsg::ControllerFunction>::shared_ptr<NifOsg::ControllerFunction, void>' requested here
                callback->setFunction(std::shared_ptr<NifOsg::ControllerFunction>(new NifOsg::ControllerFunction(key)));
                                      ^

/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/bits/unique_ptr.h:78:2: warning: delete called on non-final 'MWGui::ResponseCallback' that has virtual functions but non-virtual destructor
      [-Wdelete-non-virtual-dtor]
        delete __ptr;
        ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/bits/unique_ptr.h:268:4: note: in instantiation of member function 'std::default_delete<MWGui::ResponseCallback>::operator()' requested here
          get_deleter()(__ptr);
          ^
/home/elsid/dev/openmw/apps/openmw/mwgui/dialogue.cpp:58:23: note: in instantiation of member function 'std::unique_ptr<MWGui::ResponseCallback, std::default_delete<MWGui::ResponseCallback> >::~unique_ptr' requested here
    PersuasionDialog::PersuasionDialog(ResponseCallback* callback)
                      ^
7 years ago
David Cernat 26a56d6a02 [Client] Include NPC/creature containers when adding all cell containers 7 years ago
David Cernat 5bb09d3bed Merge pull request #399 from TES3MP/0.6.3 while resolving conflicts
Conflicts:
	apps/openmw/mwmp/WorldEvent.cpp
	apps/openmw/mwmp/WorldEvent.hpp
	apps/openmw/mwmp/processors/world/ProcessorContainer.hpp
7 years ago
David Cernat 1e3c4fd488 [Client] Fix ProcessorContainer typos caused by careless copy-pasting 7 years ago
David Cernat 7b97e8671d
Merge pull request #398 from OpenMW/master
Add OpenMW commits up to 30 March 2018
7 years ago
David Cernat f80f3bd484 [Client] Make it possible to reply to requests about specific containers
Previously, a Container packet with a REQUEST action always made the client respond with the contents of all the containers in that cell.

The previous behavior now only happens for requests that have no WorldObjects attached, while requests that have WorldObjects attached get a reply with the contents of those specific containers.
7 years ago
David Cernat ec1311fcb7 [Client] Make it possible to check whether a class has a ContainerStore 7 years ago
David Cernat 258e319acb [Client] Require InventoryStore for autoequipping actors 7 years ago
David Cernat afe8c97cb9 [Client] Require InventoryStore for unequipping actors in editContainers 7 years ago
David Cernat d8b48f6cf4 [Client] Remove redundant container methods from CellController 7 years ago
Koncord 2aaf9105af [Browser] Add Client Settings and Server Settings Tabs.
Save Browser state to the client config
7 years ago
Capostrophic baaf65bc2c Add vanilla enchanted weaponry behavior option, on by default (fixes #4136) 7 years ago
Capostrophic 2dca389a3b Extend magic resistance/weakness to all effects that can be resisted (fixes #4309) 7 years ago
Ilya Zhuravlev fdcfbdbdd1 android: Update for sdl 2.0.8 7 years ago
Capostrophic e6d9bce519 Implement fWerewolfHealth GMST (fixes #4142) 7 years ago
David Cernat 365f485e8d Merge pull request #397 from OpenMW/master while resolving conflicts
Conflicts:
	components/CMakeLists.txt
7 years ago
David Cernat 3d5860d6f4 Merge pull request #396 from TES3MP/0.6.3 while resolving conflicts
Conflicts:
	apps/openmw-mp/Player.cpp
	apps/openmw-mp/Script/Functions/Settings.cpp
	apps/openmw-mp/Script/Functions/Settings.hpp
	apps/openmw-mp/Script/Functions/World.cpp
	apps/openmw-mp/Script/Functions/World.hpp
	apps/openmw/mwgui/container.cpp
	apps/openmw/mwmp/LocalActor.cpp
	apps/openmw/mwmp/LocalPlayer.cpp
	apps/openmw/mwmp/WorldEvent.cpp
	apps/openmw/mwmp/processors/world/ProcessorContainer.hpp
	components/openmw-mp/Base/BaseEvent.hpp
	components/openmw-mp/Log.cpp
	components/openmw-mp/Log.hpp
7 years ago
Capostrophic 76f50312f2
Remove a redundant check 7 years ago
David Cernat ac82124a5d Merge pull request #395 from OpenMW/master while resolving conflicts
# Conflicts:
#	apps/openmw/mwmechanics/actors.cpp
7 years ago
David Cernat 1c340568d2 [Client] Disallow resting if player has not finished chargen
Previously, players pressing T rapidly before logging in had the Wait screen show up for them.
7 years ago
bret curtis 4890ecd357 remove native GLESv* support, as it never worked; make things less complicated as result, fixed lighting.glsl to work with gl2es thanks to ptitSeb 7 years ago
Capostrophic 2d119e834a Add vanilla absorb attribute behavior option, on by default (Fixes #4135) 7 years ago
Capostrophic b6a2589e7b Don't apply harmful spell effects on the player in god mode (fixes #4264) 7 years ago
David Cernat 5f6ddcfc59 [General] Rework container sync to prevent item duping
A main priority in TES3MP development is to avoid making major changes to OpenMW code, so as to avoid merge conflicts in the future. Whenever avoiding potential conflicts seems especially difficult for the proper implementation of a particular multiplayer feature, that multiplayer feature is often put off until later or partially implemented with the intent of being revisited in the future.

Container sync is the perfect example. Previously, the OpenMW code for container actions was kept exactly as it was, with clients unilaterally accepting their own container changes as per singleplayer-specific code, with only the addition that clients sent container packets every time they made a change in a container, packets which were then forwarded unquestioningly by the server to other players. This meant that two players clicking on the same item in a container at the same time both managed to take it, thus duplicating the item.

Immediately after the packets were already forwarded, server scripts were able to check for incorrect changes, such as the removal of more items than should have existed in a container, but they had to send their own packets that attempted to fix what had already been accepted on the initial client and then forwarded to all clients, which was quite onerous in some scenarios, such as when a player on a slow connection immediately dropped items in the world after taking them from a container (which is why the default TES3MP serverside scripts made no attempt at sending corrective packets at all, preferring to expect the matter to be solved in a later C++ implementation).

This commit fixes item duping in containers by preventing container actions from initially running on clients and by ending the automatic forwarding of container packets by the server. Instead, clients now send container packets that act as requests for container actions, and serverside scripts have to forward these requests themselves. In other words, without a matching Container event in the server's Lua scripts, players are completely unable to affect containers for themselves or for others.

To forward a received Container packet, the following line must be used in a Container event in the Lua scripts:

tes3mp.SendContainer(true, true)

When an invalid action count is used in a container request, the serverside scripts can amend it using the following new function:

tes3mp.SetReceivedContainerItemActionCount(objectIndex, itemIndex, actionCount)

Thus, the serverside scripts are able to allow only container actions that are correct based on their own recorded contents for that container.

The OpenMW code allowing unilateral container actions in mwgui/container.cpp is now prevented from executing. When a player's container request is returned to them, code in mwmp/WorldEvent.cpp simulates those container actions instead.
7 years ago
David Cernat 9165b12d78 [Client] Update inventory views when receiving inventory or equipment 7 years ago
Capostrophic 41f89c84f8 Don't move the player if opposite direction keys are held down at the same time (Fixes #4233) 7 years ago
David Cernat bb15ee9215 [Client] Make it possible to get ContainerWindow from elsewhere in code 7 years ago
Capostrophic 5a3086b0c6
Auto-detect the actual Morrowind assets path (Fixes #4336) 7 years ago
Capostrophic 42b7846f81 Replace a redundant playerAllies check with a boolean (Fixes #4229) 7 years ago
Nelsson Huotari 63e34a5575 Typofix: updateCrimePersuit -> ...Pursuit 7 years ago
David Cernat bbdc30628b [Client] Use the correct guid for a received WorldEvent or ActorList 7 years ago
scrawl c02920bcd1
Merge pull request #1634
Conflicts:
	apps/openmw/mwworld/worldimp.hpp
7 years ago
scrawl f47429d575
Merge pull request #1635 7 years ago
scrawl ff7f964643
Merge pull request #1636 7 years ago
David Cernat 14f0299322 [Client] Don't log InputBox inputs for client 7 years ago
Andrei Kortunov fed3e56fc1 Weather manager: get rid of World dependency 7 years ago
Andrei Kortunov 53ef345680 Update magic effect particles after building new animation (bug #2254) 7 years ago
Andrei Kortunov a0a30cdbf5 AI: hide torches during bad weather (bug #4334) 7 years ago
Andrei Kortunov bd6c7de579 Do not unequip two-handed weapon when equipping torch 7 years ago
RoadTrain d626d89c49 OpenMW-CS: Fix a typo in startup warning. 7 years ago
Capostrophic 5b49248d6e
Restrict opening doors to bipedal actors (Fixes #4313) 7 years ago
scrawl edb57306b6
Merge pull request #1628 7 years ago
scrawl 17fa1a4d51
Merge pull request #1630 7 years ago
scrawl 7a5748a9f1
Merge pull request #1632 7 years ago
elsid a26483ab26 Fix memory leak
There is no delete for TextFormat objects in PageDisplay destructor.
7 years ago
elsid 26df0e6ebd Remove duplicated include 7 years ago