Commit Graph

1161 Commits (00997fa7327293db6075d47d18bd36516537ba44)

Author SHA1 Message Date
David Cernat 59a38164ea [Client] Add generic objects to ObjectList using addObjectGeneric() 5 years ago
David Cernat 989188c171 [Client] Remove ObjectList's confusing addObjectDelete() function 5 years ago
Capostrophic a2c674bb2e Make GetTarget return 1 during actor greeting (bug #5255) 5 years ago
David Cernat d2ba4a12d9 [Client] Simplify container sending with new addContainerItem() methods 5 years ago
David Cernat 60b6f92fa3 Add OpenMW commits up to 13 Jan 2020
# Conflicts:
#	apps/openmw/mwmechanics/actors.cpp
5 years ago
capostrophic 1251b32f0f Slightly reduce code duplication 5 years ago
capostrophic 42cc27194b Fix reported spellcasting discrepancies
Make ExplodeSpell behavior closer to Cast behavior (#5242)
Nullify on-self absorb spells in a different way (#5241)
Allow casting permanent spells through Cast/ExplodeSpell
5 years ago
Andrei Kortunov a42396254b Use ISO format to print datetime 5 years ago
David Cernat e6c626f127 [General] Move handling of client globals to ClientScriptGlobal packet
ClientScriptGlobal is a new Worldstate packet that handles short, long and float values for global variables in clientside scripts.

Previously, short values were handled by the ScriptGlobalShort packet, while a partially implemented ScriptGlobalFloat packet also existed, but both of those packets were Object packets because they were added near the end of 2016 when only Player and Object packets existed (with the latter actually being called WorldEvent packets at the time). Both ScriptGlobalShort and ScriptGlobalFloat have now been removed.

The serverside script functions previously used to interact with ScriptGlobalShort have, however, been kept so they can be adjusted to work with local variables in clientside scripts instead in a future commit.
5 years ago
Andrei Kortunov b6899a821b Improve BetaComment handling (feature #4129) 5 years ago
David Cernat a58f09fd6c Add OpenMW commits up to 2 Jan 2020
# Conflicts:
#	apps/openmw/mwmechanics/enchanting.cpp
#	apps/openmw/mwworld/scene.cpp
5 years ago
Andrei Kortunov 24ce242941 Implement TestCells (feature #5219) 5 years ago
David Cernat 5b4db83d61 [Client] Once again allow beds to be used even if waiting is disallowed
This had been broken by rest-related commits in OpenMW.
5 years ago
David Cernat a54bc364ba [Client] Fix code conflict with OpenMW in OpRemoveSpell correctly 5 years ago
David Cernat 9d6f3fdd09 Add OpenMW commits up to 1 Dec 2019
# Conflicts:
#	CMakeLists.txt
#	apps/openmw/mwscript/aiextensions.cpp
#	apps/openmw/mwscript/statsextensions.cpp
5 years ago
David Cernat 1283d5d487 [General] Synchronize TCL state for players
Additionally, only purge temporary levitation effect for DedicatedPlayers if one has been added.
5 years ago
Capostrophic e7f6ab1ae2 Avoid using getPtr for object search in scripting (bug #5220) 5 years ago
Capostrophic 77f076ff11 Make sure instant FX abilities get detected when supposed 5 years ago
Capostrophic 0adc2df65f Make SameFaction work (bug #5213) 5 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
Capostrophic bc5d54a161 Fix GetEffect result when running on dead actors 5 years ago
Capostrophic ce943b4f9e Make enchantments affect all actors with an inventory (bug #5186) 5 years ago
David Cernat 4a34666c59 Add OpenMW commits up to 7 Oct 2019
# Conflicts:
#	apps/openmw/mwmechanics/aiactivate.cpp
5 years ago
David Cernat 219f0cb88e [Client] Fix typo in 56f084c9c0 by using correct function 5 years ago
Andrei Kortunov 6450d84473 Improve resurrection handling 5 years ago
Andrei Kortunov a4d196f33f Force view change when using Force1stPerson and Force3rdPerson commands (bug #5168) 5 years ago
David Cernat 7caa6cd8fe [Client] Prevent ActorAI spam from actors starting combat in scripts 5 years ago
David Cernat cc25612b8d Add OpenMW commits up to 18 Sep 2019
# Conflicts:
#	apps/openmw/mwclass/container.cpp
#	apps/openmw/mwclass/door.cpp
#	apps/openmw/mwmechanics/security.cpp
#	apps/openmw/mwmechanics/spellcasting.cpp
#	apps/openmw/mwscript/miscextensions.cpp
5 years ago
Evil Eye 7c8b82f45c move locking behaviour to cellref 5 years ago
David Cernat 56f084c9c0 [Client] Fix packet spam for repetitive setting of the same global value 5 years ago
David Cernat e424bd9bc3 [General] Implement ClientScriptSettings packet, part 2
The packet can now set which client globals get packets sent about them when their values change on clients.
5 years ago
David Cernat ca67587b89 Add OpenMW commits up to 5 Sep 2019
# Conflicts:
#	apps/openmw/mwgui/container.cpp
#	apps/openmw/mwmechanics/actors.cpp
#	apps/openmw/mwworld/worldimp.hpp
5 years ago
elsid 16170131b7
Add enum type for door state 5 years ago
David Cernat 353e7d530a Add OpenMW commits up to 18 Aug 2019
# Conflicts:
#	CMakeLists.txt
#	apps/openmw/mwmechanics/character.cpp
#	apps/openmw/mwmechanics/spellcasting.cpp
#	apps/openmw/mwworld/worldimp.hpp
5 years ago
David Cernat ed05125f6a Add OpenMW commits up to 2 Aug 2019
# Conflicts:
#	apps/openmw/mwmechanics/combat.cpp
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 f671c0bddc Add OpenMW commits up to 1 Apr 2019
# Conflicts:
#	.travis.yml
#	CMakeLists.txt
#	apps/openmw/engine.cpp
#	apps/openmw/mwdialogue/dialoguemanagerimp.cpp
#	apps/openmw/mwgui/jailscreen.cpp
#	apps/openmw/mwgui/trainingwindow.cpp
#	apps/openmw/mwgui/travelwindow.cpp
#	apps/openmw/mwgui/waitdialog.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 6205ff6b04 Add OpenMW commits up to 30 Jan 2019
# Conflicts:
#	apps/openmw/mwworld/worldimp.cpp
5 years ago
David Cernat 3efffe92e3 Add OpenMW commits up to 5 Nov 2018
# Conflicts:
#	CI/before_install.linux.sh
#	CMakeLists.txt
#	apps/openmw/mwmechanics/aifollow.cpp
#	apps/openmw/mwmechanics/mechanicsmanagerimp.hpp
#	apps/openmw/mwphysics/physicssystem.hpp
#	apps/openmw/mwworld/scene.cpp
#	apps/openmw/mwworld/worldimp.cpp
#	components/CMakeLists.txt
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 056591b957 Add OpenMW commits up to 14 Sep 2018
# Conflicts:
#	apps/openmw/mwgui/container.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 84cab59057 Add OpenMW commits up to 19 Aug 2018
# Conflicts:
#	.travis.yml
#	CI/before_install.linux.sh
#	CI/before_script.linux.sh
#	apps/openmw/engine.cpp
#	apps/openmw/main.cpp
#	apps/openmw/mwgui/windowmanagerimp.cpp
#	apps/openmw/mwmechanics/actors.hpp
#	apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
#	apps/openmw/mwscript/aiextensions.cpp
#	apps/openmw/mwscript/containerextensions.cpp
#	apps/openmw/mwscript/dialogueextensions.cpp
#	apps/openmw/mwworld/cellstore.cpp
#	apps/openmw/mwworld/containerstore.cpp
#	apps/openmw/mwworld/scene.cpp
#	apps/openmw/mwworld/worldimp.cpp
#	components/misc/debugging.hpp
5 years ago
David Cernat 0339958e21 [General] Rename Log class into TimedLog 5 years ago
Andrei Kortunov ed8828d3bc
Merge pull request #2457 from Capostrophic/sneak
Sneaking consistency fixes (bug #5103)
5 years ago
Andrei Kortunov 786a6c6d42 Use a common doors rotation code in the "lock" command handler 5 years ago
Andrei Kortunov deeccb2783
Merge pull request #2461 from Capostrophic/geteffect
Use up-to-date magic effects for GetEffect (bug #3894)
5 years ago
capostrophic cac05ef826 Sneaking consistency fixes (bug #5103)
Correct pickpocketing behavior when not actually sneaking
Fix first person swimming animation regression when sneaking stance is on
Move typical sneaking use case checks into mechanics manager
Correct awareness checks
5 years ago
capostrophic 82ac99ec56 Apply instant FX in AddSpell immediately (bug #5055) 6 years ago
capostrophic e7ec27e45d Use up-to-date magic effects for GetEffect (bug #3894) 6 years ago
Capostrophic 295ee11063 Make Player->Cast select the spell instead (bug #5056) 6 years ago
Capostrophic b7afb213ae "Handle" RepairedOnMe scripting function (feature #4255) 6 years ago
Andrei Kortunov e679190f31 Introduce a custom format() function to get rid of boost::format() and hackish replace() 6 years ago
Andrei Kortunov f775f7977b Fix RaiseRank/LowerRank script functions (feature #4316) 6 years ago
Capostrophic 62482657fc GetWeaponType returns -2 for picks and -3 for probes (feature #5031) 6 years ago
Alexei Dobrohotov 4f74d09179
Handle GetAngle axis more gracefully too 6 years ago
Andrei Kortunov ed859c41be
Merge pull request #2353 from Capostrophic/drop
Make Drop behavior closer to vanilla (bug #4999)
6 years ago
Capostrophic 3c18079c14 Handle invalid instruction axis more gracefully 6 years ago
Capostrophic b42f981200 Make Drop and soulgem instruction behavior closer to vanilla (bug #4999) 6 years ago
David Cernat f6db7d4fc5 [Client] Avoid sending repeated ObjectDelete packets about an object 6 years ago
Andrei Kortunov bd2188a0f8 Use the logging system for compiler errors 6 years ago
Andrei Kortunov 5508e67aad Apply looping particles when adding spell to existing actor (bug #4918) 6 years ago
Andrei Kortunov 35facc5cde Add an option to use casting animations for magic items (feature #4962) 6 years ago
Capostrophic 3a0e374dc6 Replicate vanilla Position/SetPos behavior more closely (bug #3109) 6 years ago
Capostrophic dd952c3ddb Fix extra space in "no script" showvars output 6 years ago
Capostrophic 59f7df187d Add explicit variant of Journal 6 years ago
Grigory Latyshev 3872d7476b Move makeOsgVec3f() to settingsutils.hpp
Remove all other makeOsgVec3f() implementations
6 years ago
Capostrophic 8ecd0b82a4 Replace Boost format and replace_all where possible 6 years ago
Andrei Kortunov 3032b177a1 Remove redundant includes 6 years ago
Bret Curtis 4d09c8bb50
Merge pull request #2126 from Capostrophic/sneaking
Account for running/sneaking stances while in air (bug #4797)
6 years ago
Bret Curtis fdb84dddc8
Merge pull request #2059 from Capostrophic/stacks
Don't stack scripted items (bug #2969)
6 years ago
David Cernat fd40e8c971 [Client] Prevent ObjectState spam by not resending an already sent state 6 years ago
Capostrophic 05d5d7d57b Account for stances when the player is in air (bug #4797)
Make GetPCRunning and GetPCSneaking return 1 if the player is in air while the stance is toggled
Make sneaking skill usage possible if sneaking stance is toggled while in air
6 years ago
Capostrophic 92d7f21926 Don't interrupt compilation when spell/effect functions are used for non-actors 6 years ago
Capostrophic 0ab5314755 Make scripted items not stack (bug #2969) 6 years ago
David Cernat a6c6db89fc [Client] Send object packets when scripts use PlaceItem/PlaceItemCell 6 years ago
elsid 49d81241db Merge branch 'master' into pathfinder_detour 6 years ago
David Cernat 1baf82db32 [Client] Avoid PlayerSpellbook packet spam in some mods 6 years ago
David Cernat d9bc1abf48 [Client] Don't send ObjectScale packets if not logged in 6 years ago
David Cernat a8cf1e02c4 [Client] Allow unilateral scripted container changes not from console
This prevents infinite loops in certain client scripts from mods that use while loops to determine that all items of a certain type have been removed from a container, such as in the script BCSwap2Arg from  Better_Clothes.
6 years ago
Capostrophic 4ce35c6ad5 Fix fixme behavior in interiors 6 years ago
elsid ff478aba6d
Use actor half extent for interior cells 6 years ago
elsid dc09674362
Add command and settings option to enable actors paths render 6 years ago
elsid 70a369f70e
Add command to enable NavMesh render
togglenavmesh or tnm
6 years ago
David Cernat d9dd7073cf [General] Send certain packets only when logged in
Previously, client mods adding packet-sending scripts to the spawn area made clients send the associated packets as soon as they inputted their character name when joining a server using those mods. This made the clients either get disconnected for not replying to a handshake first, or it made them get kicked for sending object packets that are disallowed for players who are not logged in.

To fix this, LocalPlayer's hasFinishedCharGen() has been replaced with isLoggedIn(), because the former was already returning true when players inputted their names.
6 years ago
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 6 years ago
Andrei Kortunov 01b3f92f7e Make coc and fixme console commands close to vanilla (bug #4292, bug #4217) 6 years ago
Marc Zinnschlag c6b62308cd Merged pull request #1921 6 years ago
Andrei Kortunov 2961f0d810 Allow to use the %Name for creatures (bug #4644) 6 years ago
Andrei Kortunov ae1c054635 Make GetPCJumping return true only when jumping (bug #4641) 6 years ago
Andrei Kortunov aed7c1b2bb Fix a couple of Clang warnings 6 years ago
Capostrophic 6c47f95677 Make RemoveSpellEffects affect permanent spells (bug #3920)
Also make it remove the effects but not the spells themselves
6 years ago
David Cernat 3bd8aa82fe [General] Reduce inventory-sending hooks to just 2 in ContainerStore
Whenever an item is added to or removed from the player's ContainerStore, that player sends a PlayerInventory packet with just that addition or removal.

This eliminates all the unnecessary packet spam related to oversized PlayerInventory packets that had existed in one form or another since the initial implementation of inventory sync in 1b259e2d33

Additionally, move booleans from BasePlayer to LocalPlayer when they are only needed on the client, and make the usage of the isReceivingQuickKeys boolean consistent with the new isReceivingInventory boolean by having them both in the processors of their associated packets.
6 years ago
Andrei Kortunov de08c1cb1b Make Move and MoveWorld console commands move actors standing on moving object (bug #2274) 6 years ago
David Cernat 03832f933b [Client] Send only individual items in PlayerInventory packets
For a long time, whenever a PlayerInventory packet was sent, it contained all the items in the player's inventory, because that's how Koncord originally implemented it and I always had too many other priorities to go back and rework it.

From now on, clients only send PlayerInventory packet with the one item added or removed, with the single exception being trading with merchants, where the entire inventory is still sent for the time being.
6 years ago
David Cernat 45b011452e [Client] Combine methods for sending spell packets into a single one 6 years ago
David Cernat a083439139 Merge pull request #469 from davidcernat/master while resolving conflicts
# Conflicts:
#	apps/openmw/main.cpp
#	apps/openmw/mwbase/world.hpp
#	apps/openmw/mwdialogue/dialoguemanagerimp.cpp
#	apps/openmw/mwmechanics/actors.cpp
#	apps/openmw/mwscript/dialogueextensions.cpp
#	apps/openmw/mwworld/worldimp.hpp
6 years ago
Andrei Kortunov 31f8bea1dd Rework spell effects management 6 years ago
Marc Zinnschlag 088463ebe6 Merged pull request #1868 6 years ago
Capostrophic ce78a34010
Use container ID in Equip command warning 6 years ago
Bret Curtis dcd381049c
Merge pull request #1872 from akortunov/extended_logging
Use new logging system
6 years ago
Andrei Kortunov 5a4d0cec3a Use new logging system for game itself 6 years ago
Allofich 2cc1b52baf Drain and fortify fixes for dynamicStats
(Fixes #3049)
6 years ago
Andrei Kortunov 9dfd775bf2 Implement GetPCTraveling console command 6 years ago
Andrei Kortunov b0f2e00e7f Make forcegreeting a non-op for non-actor objects (bug #4553) 7 years ago
David Cernat d93b67ef21 [General] Sync soul refIds for items and add related script functions 7 years ago
Capostrophic 51d369d4da Add resumeGame method 7 years ago
David Cernat 36ac2d9de4 [Client] Set packetOrigin for all ObjectList packets sent 7 years ago
David Cernat 63a86f145d [Client] Record type of each InterpreterContext for later checking 7 years ago
David Cernat b891acd46e [Client] Send Container packets when items are added/removed via scripts
Additionally, disable unilateral addition and removal of items on clients, and expect the server to reply back with an approved addition or removal.
7 years ago
David Cernat 6cb5ac6e63 Merge pull request #457 from OpenMW/master while resolving conflicts
Conflicts:
	CMakeLists.txt
	apps/openmw/engine.cpp
	apps/openmw/main.cpp
	apps/openmw/mwgui/windowmanagerimp.cpp
	apps/openmw/mwmechanics/character.cpp
	components/CMakeLists.txt
7 years ago
David Cernat 6d43c8d63d [Client] Send ActorAI with combat when an NPC's fight is set to 100 7 years ago
David Cernat 743933134d [Client] Simplify sending of ActorAI packets for uninitialized actors 7 years ago
David Cernat 5f4ec1331f [Client] Send ActorAI packet when combat is started via a client script 7 years ago
David Cernat 528bd26a3b [General] Allow followers to follow non-authority players through cells 7 years ago
David Cernat 09da24f1ea [General] Rename all instances of refNumIndex into refNum
This creates symmetry with mpNum and should cause less confusion in the future.
7 years ago
David Cernat f0d4f1bbe5 [Client] Send ActorAI packets when followed by an NPC
The packet is sent regardless of whether we are the cell authority or not, so the server can decide what it wants to do with it.
7 years ago
Andrei Kortunov 3d1daaebab Rework manual spellcasting (e.g. via scripts) 7 years ago
David Cernat 59a56ca35e [Client] Disallow clients from scaling their associated players
Additionally, display messages when trying to scale players.
7 years ago
Andrei Kortunov c77c50e92b Make Equip console command to bypass most of restrictions (bug #4460) 7 years ago
David Cernat 04ba324290 [Client] Disable clientside disabling and enabling of objects 7 years ago
David Cernat acdaf1a282 [Client] Disable clientside deletion of objects through console/scripts
Unfortunately, disabling clientside deletion of summons and items that can be picked up requires extra work on actors and inventories respectively, to avoid buggy situations.
7 years ago
David Cernat 8d9fde810e [Client] Disable clientside scaling of objects 7 years ago
David Cernat f3892d697b [Client] Disable clientside locking and unlocking of objects 7 years ago
David Cernat a236ffc4be Merge pull request #456 from OpenMW/master while resolving conflicts
# Conflicts:
#	.travis.yml
#	README.md
#	apps/openmw/mwgui/quickkeysmenu.cpp
#	apps/openmw/mwmechanics/actors.cpp
#	apps/openmw/mwmechanics/combat.cpp
7 years ago
Andrei Kortunov 97d8cc0efe Check if the local was not found, just for sure 7 years ago
Andrei Kortunov f3f7487664 Fix arguments parsing for AiWander console command (bug #4458) 7 years ago
Miloslav Číž c3d7ee5a9e Resolve merge conflicts 7 years ago
Miloslav Číž db8aaa74d6 Start cell border debug drawing 7 years ago
David Cernat 2a3c74bfcc Merge pull request #447 from OpenMW/master while resolving conflicts
# Conflicts:
#	README.md
7 years ago
Andrei Kortunov 24863f620b RotateWorld: rotate around world axis (bug #4426) 7 years ago
David Cernat 669d4d3d7e
Merge pull request #440 from OpenMW/master
Add OpenMW commits up to 27 May 2018
7 years ago
scrawl cfdf99f601
Revert "Merged pull request #1573"
This reverts commit 7324bd368f, reversing
changes made to 810e4416f6.
7 years ago
scrawl 99ffaafe30
Revert "Merge pull request #1701 from akortunov/standfix"
This reverts commit da47fc79f5, reversing
changes made to 7324bd368f.
7 years ago
David Cernat c8ec77875c [Client] Update old comments for changes made by tes3mp 7 years ago
David Cernat 74c2a0b311
Merge pull request #438 from OpenMW/master
Add OpenMW commits up to 24 May 2018
7 years ago
Bret Curtis da47fc79f5
Merge pull request #1701 from akortunov/standfix
Do not apply queue movement for standing actors
7 years ago
David Cernat 78234f9071 [General] Rename Event into ObjectList & WorldObject into BaseObject 7 years ago
Andrei Kortunov 3636cf2015 Do not apply queue movement for standing actors 7 years ago
Andrei Kortunov 22fb1f3403 Play spellcasting effects from objects 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
scrawl ec4e2f0064
Merge pull request #1684 7 years ago
Capostrophic 37dc3200d1 Inherit the calling object scale in PlaceAt (fixes #4308) 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 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 bf906b3f0a
Merge pull request #393 from OpenMW/master
Add OpenMW commits up to 10 March 2018
7 years ago