Commit Graph

144 Commits (8c7e06293fbe6d0ed1dd7dd0f424b9f1b6f92162)

Author SHA1 Message Date
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 04ba324290 [Client] Disable clientside disabling and enabling of objects 7 years ago
David Cernat c8ec77875c [Client] Update old comments for changes made by tes3mp 7 years ago
David Cernat 78234f9071 [General] Rename Event into ObjectList & WorldObject into BaseObject 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 5d4b97645d Merge pull request #374 from OpenMW/master while resolving conflicts
# Conflicts:
#	apps/openmw/CMakeLists.txt
7 years ago
scrawl 1522bda60b
Fix crash in getDistance when invoked before the game starts 7 years ago
David Cernat ac27ca663b [Client] Don't send ObjectState packets for items in containers 7 years ago
David Cernat d51736d68f [Client] Fix crashes caused by inventory items with disabling scripts 8 years ago
David Cernat 7173a48f4b [Client] Prevent ObjectState packet spam 8 years ago
David Cernat be93ec8ef6 [General] Implement ObjectState packet 8 years ago
David Cernat fa3baac0f3 Merge pull request #228 from OpenMW/master while resolving conflicts
# Conflicts:
#	.travis.yml
#	CMakeLists.txt
#	apps/openmw/main.cpp
8 years ago
Bret Curtis d785344fad purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 8 years ago
David Cernat dcc61a095a [Client] Allow multiple WorldObjects to be added to a WorldEvent 8 years ago
David Cernat a82646a130 [Client] Delineate tes3mp-only code more clearly, part 2 8 years ago
David Cernat a5484d237b Merge pull request #203 from OpenMW/master
Add OpenMW commits up to 21 Apr 2017, part 2
8 years ago
Allofich ff3e307059 Pass parameters by const reference 8 years ago
David Cernat 9759764699 [Client] Clean up getting and resetting of WorldEvent 8 years ago
David Cernat d7a760490e [Client] Simplify sending of world packets, part 2 8 years ago
David Cernat 2bd81c3de0 [Client] Use mpNum for every WorldObject 8 years ago
Koncord 690211ad99 [General] Extract BaseEvent & BasePlayer from packets to functions
Move Send and Read functions to BasePacket
8 years ago
Koncord cea1425db1 [Client] Remove redundant newlines & keep ~120 columns 8 years ago
David Cernat a58601fb2b [Client] Delineate tes3mp-only code more clearly, part 1 8 years ago
David Cernat ed2176c984 [Client] Reuse 1 BaseEvent over and over instead of creating new ones 8 years ago
David Cernat c8cbfbef62 [General] Sketch out server requests to players for container data 8 years ago
David Cernat e703dd42aa [Client] Rename LocalEvent into WorldEvent 8 years ago
Koncord f78c749981 [Client] Use "NULL" instead "nullptr"
nullptr keyword introduced in C++11
8 years ago
David Cernat 703f253712 [Client] Delete new LocalEvents after sending them 8 years ago
David Cernat da2f66d6ba Merge pull request #135 from OpenMW/master
Add OpenMW commits up to 29 Jan
8 years ago
MiroslavR d97e9cfe7e Fix InterpreterContext::updatePtr updating mLocals to the implicit ref's locals when interpreting a targeted global script (Fixes #3738)
The interpreter context of a targeted global script would point to the target's locals instead of the global script instance's locals when the target changed cell during script execution. Credit to scrawl for the solution.
8 years ago
David Cernat 9f1e491a75 [General] Make WorldEvents store information about multiple objects 8 years ago
David Cernat 624b85347a [Client] Create LocalEvent class and use it instead of WorldEvent 8 years ago
David Cernat ee86c9161d [Client] Set InterpreterContext's sendPackets to false in constructor 8 years ago
David Cernat c77120df6d Merge pull request #129 from OpenMW/master while resolving conflicts
# Conflicts:
#	apps/openmw/mwworld/actiontake.cpp
8 years ago
scrawl 45fb4f04b1 Update reference of the interpreter context when an Activate results in a take action (Fixes #3727) 8 years ago
scrawl 70c5f64caa Fix mLocals not being updated in InterpreterContext::updatePtr 8 years ago
Koncord 804259b2c9 Change some printf to LOG_MESSAGE_SIMPLE
printf is not streamed to files
8 years ago
Koncord 536715cf46 Cleanup tes3mp headers 8 years ago
David Cernat fa9d6e810e Use lowerCamelCase in tes3mp client function names like OpenMW does 8 years ago
David Cernat 344f2b535a Fix setting of index for ID_SCRIPT_MEMBER_SHORT in InterpreterContext 8 years ago
David Cernat fff6833950 Send ID_SCRIPT_MEMBER_SHORT from MWScript::InterpreterContext 8 years ago
David Cernat d5fca115f7 Fix variable name for ID_SCRIPT_GLOBAL_SHORT in InterpreterContext 8 years ago
David Cernat 749c6db49e Send WorldPackets with script values from MWScript::InterpreterContext 8 years ago
David Cernat 75f6d82f08 Add a way of filtering out ingame scripts for upcoming script packets 8 years ago
David Cernat aaf4cc0d7e Prevent being in a menu from disabling script execution or actor damage 8 years ago
scrawl f99cd15f00 Vanilla-compatible activate / onActivate (Fixes #1629)
See https://forum.openmw.org/viewtopic.php?f=6&t=3074&p=34618#p34635
9 years ago
scrawl 04f7a8f8eb Remove redundant getId function 9 years ago
Emmanuel Anne af7b5e636e improves InterpreterContext::updatePtr
This checks the update is really on the right pointer. It fixes the boat
disappearing in "fishing academy", and it allows scripts linked to objects
not to loose their default reference when using the object-> notation on
another object.
9 years ago