1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 23:19:56 +00:00
Commit graph

3546 commits

Author SHA1 Message Date
MAtahualpa
b4ef9e2314 Update loadbook.cpp 2017-02-12 13:53:10 +01:00
MAtahualpa
5a58ab1837 Update loadbook.hpp 2017-02-12 13:52:36 +01:00
David Cernat
6763718412 Merge pull request #146 from OpenMW/master while resolving conflicts
# Conflicts:
#	apps/openmw/mwclass/npc.cpp
#	apps/openmw/mwmechanics/actors.cpp
2017-02-10 21:39:16 +02:00
scrawl
bbcba57495 Disable hitAttemptActorId saving code for now 2017-02-10 06:26:32 +01:00
scrawl
2ea0db1d1a Merge pull request #1198 from Allofich/combat
Make combat engagement logic more like vanilla
2017-02-10 06:20:04 +01:00
David Cernat
ae23c6d6a5 Merge pull request #145 from OpenMW/master while resolving conflicts
# Conflicts:
#	CMakeLists.txt
2017-02-09 12:17:27 +02:00
scrawl
67e4a7e37b Change some osg::clone's to direct copy constructor to avoid dynamic_cast overhead 2017-02-09 04:51:20 +01:00
scrawl
d141b98f0c Add base animations to preloadCommonAssets 2017-02-09 03:32:40 +01:00
scrawl
839928e210 Fix light data being reset for the wrong light 2017-02-09 02:46:30 +01:00
scrawl
a46593fa74 Add PreloadItem::abort() to avoid no longer required cells from blocking the work thread 2017-02-09 01:08:07 +01:00
scrawl
d3e1dbe920 Fix race conditions in terrain loader caused by static variables 2017-02-09 00:53:48 +01:00
scrawl
4d53ab6c32 nifloader: attempt to remove redundant root node when a Skeleton is added 2017-02-08 20:04:17 +01:00
scrawl
2a42c4781e nifloader: override animflags instead of accumulating them 2017-02-08 19:53:02 +01:00
scrawl
0187f2ce4c nifloader: combine animFlags and particleFlags (Bug #2100) 2017-02-08 19:53:02 +01:00
scrawl
bccfd6cef8 nifloader: handle textures with no image that are later assigned in a FlipController
As found in vurt's trees (Bug #2100)
2017-02-08 19:52:33 +01:00
scrawl
792f505b2a Fix potential crash in ShaderVisitor for textures with no image assigned 2017-02-08 19:16:07 +01:00
scrawl
45ae8d5ffa Add support for GL_AMBIENT colorMode to shaders as required by particle systems 2017-02-08 18:39:24 +01:00
scrawl
c00532d82d Add LightStateCache to avoid redundantly setting the same gl_Light
Normally, osg::State would do this for us (via lastAppliedAttribute), but since we're using a custom StateAttribute to apply all lights at once, we have to track ourselves.

Further reduction of GL calls in a typical scene by ~2%
2017-02-07 23:37:57 +01:00
scrawl
4d4dc1b9c1 Add specialized DisableLight state attribute for more efficient undoing of light state
Seems to reduce # of GL calls by 10-15% in a typical scene.
2017-02-07 23:01:36 +01:00
David Cernat
6144ca95d8 Set version to 0.4.2 2017-02-06 23:25:46 +02:00
David Cernat
5038353792 [General] Rename BaseEvent's state into doorState & adjust related funcs 2017-02-06 23:09:50 +02:00
David Cernat
d8a9a5f6c9 [General] Send item owner in ID_CONTAINER 2017-02-06 22:45:23 +02:00
David Cernat
3614b21e10 [General] Send charge and goldValue in ID_CONTAINER 2017-02-06 21:28:03 +02:00
Allofich
5d2090684a Store mHitAttemptActorId in save files 2017-02-07 01:26:26 +09:00
David Cernat
182b238b5f [General] Rename WorldEvent into BaseEvent 2017-02-06 12:53:41 +02:00
David Cernat
75392297b5 [General] Use vector::at in most places 2017-02-05 19:01:06 +02:00
David Cernat
60d6a6d463 [Client] See when other players remove items from containers 2017-02-05 18:45:23 +02:00
David Cernat
f314b13edf [General] Rename item health into charge, for consistency with OpenMW 2017-02-05 14:56:27 +02:00
David Cernat
ecc456fea9 [General] Include charge int in WorldObject & send it w/ ID_OBJECT_PLACE 2017-02-05 13:45:12 +02:00
David Cernat
04d45b9dbb [General] Rename packets to show they are for players only, not NPCs 2017-02-05 09:01:33 +02:00
David Cernat
9f8bed9be1 [General] Add action types to WorldEvent's ContainerChanges 2017-02-04 21:32:06 +02:00
David Cernat
a07e616878 [General] Add ContainerItem and ContainerChanges structs to WorldEvent 2017-02-04 20:14:39 +02:00
David Cernat
6328ffb9aa [General] In ID_GAME_ATTRIBUTE & ID_GAME_SKILL, rename GAME into PLAYER 2017-02-04 14:25:43 +02:00
David Cernat
9130c1f302 [General] Rename ID_CONTAINER_ADD into ID_CONTAINER 2017-02-04 13:14:37 +02:00
David Cernat
d2cf96af99 [General] Repurpose the unused ID_CONTAINER_REMOVE into ID_OBJECT_HEALTH 2017-02-04 13:05:15 +02:00
David Cernat
44e27148d5 Merge pull request #140 from OpenMW/master
Add OpenMW commits up to 4 Feb 2017
2017-02-04 07:37:17 +02:00
scrawl
a1069dce3c Change UnrefQueue to accept osg::Referenced instead of osg::Object 2017-02-04 02:24:42 +01:00
scrawl
33e654f94d Add explicit handling of most commonly used nodes to NodeVisitors to avoid excessive virtual function calls 2017-02-04 02:16:26 +01:00
scrawl
c95868969b Early out for scene graphs with no update callbacks in SceneManager::notifyAttached 2017-02-04 01:22:43 +01:00
scrawl
767eba941f Speed up finding of attachment node by using the cached nodeMap 2017-02-03 23:15:37 +01:00
scrawl
a76d693627 Speed up ControllerVisitor by skipping sub graphs that have no ChildrenRequiringUpdateTraversal() 2017-02-03 23:10:14 +01:00
David Cernat
c1427b2558 [General] Simultaneously send loads & unloads in ID_PLAYER_CELL_STATE 2017-02-03 20:27:40 +02:00
David Cernat
63974af131 Merge pull request #139 from OpenMW/master
Add OpenMW commits up to 3 Feb 2017
2017-02-03 07:57:14 +02:00
scrawl
30b101b175 Fix build error in OSG_USE_FLOAT_MATRIX=OFF mode due to a double implicit conversion to double (pun doubly intended) 2017-02-03 06:49:34 +01:00
scrawl
b4a6b6387b Create own instance of osgDB::SharedStateManager so we control when to call prune()
prune() is now called in the background thread, just like the resource cache update.

Seems to improve performance by ~0.3 ms/frame
2017-02-03 03:27:12 +01:00
scrawl
84a92e665c Improve performance in RigGeometry by optimizing for the most common case of identity geomToSkelMatrix 2017-02-03 02:18:44 +01:00
scrawl
f3045331f1 Fix regression in handling of NiZBufferProperty 2017-02-03 01:49:49 +01:00
scrawl
53e4db8a8f Add dummy serializer for CameraRelativeTransform to allow serializing content of Sky Root 2017-02-02 21:57:18 +01:00
scrawl
c5f8ff6e0e Add names to several nodes for debugging purposes 2017-02-02 21:49:52 +01:00
David Cernat
d9f5dfe65c Merge pull request #138 from OpenMW/master
Add OpenMW commits up to 2 Feb 2017
2017-02-02 13:07:11 +02:00
scrawl
851f61ac82 Always assign osg::Material when a material controller is used 2017-02-01 21:10:43 +01:00
David Cernat
958ff06ca8 [General] Rename ID_DOOR_ACTIVATE into ID_DOOR_STATE 2017-02-01 11:54:40 +02:00
David Cernat
9f8f62b765 Merge pull request #137 from OpenMW/master
Add OpenMW commits up to 1 Feb
2017-02-01 09:28:23 +02:00
scrawl
9180089a3b Add sharing for more State Attributes, most notably BlendFunc and AlphaFunc, to improve the state tracking in osg::State and reduce the number of GL calls 2017-02-01 06:00:14 +01:00
scrawl
960d4a96c3 Reduce the number of osg::Material state by setting the default state on the graph root 2017-02-01 06:00:14 +01:00
scrawl
e399e10607 Add missing lock in shareMaterial 2017-02-01 06:00:14 +01:00
scrawl
34deb6e7b1 Add 'showSceneGraph' command to export the scene or a particular object to .osgt for debugging purposes 2017-02-01 06:00:14 +01:00
scrawl
e90941a8b3 Wrap the scene template reference in another object for const correctness and to avoid it from being serialized with the osgDB serializer 2017-02-01 06:00:14 +01:00
David Cernat
2c5cc82f49 [Server] Add script functions for getting world object placement info 2017-01-29 15:29:40 +02:00
David Cernat
08faad9f32 Merge pull request #134 from OpenMW/master
Add OpenMW commits up to 28 Jan
2017-01-29 07:07:06 +02:00
David Cernat
15ed4b8da6 [Components] Use 24 hour format instead of 12 for log file timestamps 2017-01-28 20:20:47 +02:00
David Cernat
8bc6dfe590 [General] Remove duplicate constructor in PacketObjectUnlock 2017-01-28 18:19:24 +02:00
David Cernat
9f1e491a75 [General] Make WorldEvents store information about multiple objects 2017-01-28 12:34:45 +02:00
Allofich
0f20312012 Fix MSVC warnings 2017-01-28 04:37:47 +09:00
David Cernat
244da19a51 [General] Turn ID_PLAYER_CELL_LOAD into ID_PLAYER_CELL_STATE for clarity 2017-01-26 13:49:20 +02:00
David Cernat
4dc0ba21ec [General] Fix packet ID for ID_PLAYER_CELL_LOAD 2017-01-26 12:19:49 +02:00
David Cernat
97aabf4a7d [General] Sketch out sending of cell loading/unloading info in packets 2017-01-26 09:02:01 +02:00
David Cernat
158d606477 [General] Leave one blank line at the end of every tes3mp code file 2017-01-26 06:17:29 +02:00
David Cernat
63c8a98083 [General] Stop using virtual functions in BasePlayer 2017-01-25 17:06:15 +02:00
David Cernat
1d9c6ddd81 [General] Add placeholders for the new packet ID_PLAYER_CELL_LOAD 2017-01-25 14:51:43 +02:00
David Cernat
35e453dec3 [General] Sketch out most of functionality for journal saving/loading 2017-01-24 19:32:25 +02:00
David Cernat
d308897f95 Rename PacketItems, PacketSpells into InventoryChanges, SpellbookChanges 2017-01-20 12:43:05 +02:00
David Cernat
e2c595fc5d Add preliminary structure for journal changes 2017-01-20 12:05:45 +02:00
David Cernat
e9b22814b9 Create placeholder for ID_GAME_JOURNAL 2017-01-20 11:15:10 +02:00
David Cernat
a69f294ef0 Rename ID_GAME_CELL into ID_PLAYER_CELL_CHANGE 2017-01-20 10:30:50 +02:00
David Cernat
745ddd9a69 Merge pull request #130 from OpenMW/master
Add OpenMW commits up to 19 Jan
2017-01-20 09:42:55 +02:00
David Cernat
83277a1512 Send spellbook in LocalPlayer CharGen & change UPDATE action name to SET 2017-01-20 09:07:07 +02:00
scrawl
115e563a7a Fix race conditions caused by Array <-> GLBufferObject interactions (Bug #3580)
The first part of the fix is to assign VBO/EBO's upon loading the array in the Nif reader. This avoids triggering the 'addVertexBufferObjectIfRequired' code path in osg::Geometry which has the race condition when two threads add the same Array at the same time. Essentially, we want the Arrays to be 'const' when they come out of the Nif reader.

The second part of the fix is to make sure not to create empty arrays in the Nif reader (importantly, not assigning a VBO to the empty array). This empty array would be deleted when the NIFFile is cleaned up, and the detachment of the VBO assigned to it (which is still in use by other arrays) would cause threading issues.

This rare crash bug was first introduced with commit a7c5beb7c5. When using OSG dev version 3.5 the crashes were a little more prevalent, because 'addVertexBufferObjectIfRequired' in osg::Geometry is now used even when VBO's are disabled (as part of the VAO support changes).
2017-01-19 22:23:41 +01:00
David Cernat
33e85c54de Rename BasePlayer Inventory & Spellbook into PacketItems & PacketSpells
This avoids confusion when either of those is used to store and send a single item, and no longer requires coming up with confusing variable names like realSpellbook or realInventory for actual full spellbooks and inventories.
2017-01-19 18:06:59 +02:00
David Cernat
78c6ab2a99 Clean up client Networking by putting item & spell logic in LocalPlayer 2017-01-19 15:18:37 +02:00
David Cernat
c77120df6d Merge pull request #129 from OpenMW/master while resolving conflicts
# Conflicts:
#	apps/openmw/mwworld/actiontake.cpp
2017-01-19 06:34:09 +02:00
scrawl
ac61535d2c optimize OSGVertexBuffer by double buffering the vertex array instead of recreating it on every modification 2017-01-19 03:19:17 +01:00
David Cernat
253ded1ee3 Use new getFilenameStamp() method to generate timestamps for filenames 2017-01-13 08:49:21 +02:00
David Cernat
3932654d5d Use log filenames w/ timestamps instead of adding numbers to their ends 2017-01-13 07:58:40 +02:00
Koncord
b5c586d5b7 Add and implement ID_MASTER_QUERY 2017-01-10 18:33:02 +08:00
Koncord
27afb91936 RPI v3 patch #1 2017-01-03 19:03:51 +08:00
Koncord
6311745595 Update version 2016-12-30 02:54:00 +08:00
Koncord
7595b33461 Implement spellbook 2016-12-29 21:19:57 +08:00
Koncord
6e6237541a Fix "comparison between signed and unsigned integer expressions" 2016-12-21 16:13:39 +08:00
Koncord
561a88d441 Fix "comparison between signed and unsigned integer expressions" 2016-12-21 14:46:36 +08:00
Koncord
efb40b3c66 Remove redundant code 2016-12-18 14:14:52 +08:00
Koncord
11be8ed005 Rename copyOldLog to renameOldLog 2016-12-18 12:48:23 +08:00
Koncord
f7b4aea85b add function for keeping old logs 2016-12-18 12:45:03 +08:00
David Cernat
973db7c78a Merge pull request #113 from OpenMW/master
Add OpenMW commits up to 17 Dec
2016-12-17 23:27:09 +02:00
Leon Krieg
170e723cc7 Handle SDL event 0x304 by doing nothing (#3670) 2016-12-17 12:51:11 +01:00
scrawl
eae35af13d Check if the bounding box changed before calling dirtyBound() 2016-12-17 00:23:22 +01:00
scrawl
aafff1deb6 Fix memory leak 2016-12-16 20:40:15 +01:00
scrawl
cca75499ee Clear the Skeleton's bone cache when a node is added/removed (Fixes #3663) 2016-12-16 20:09:20 +01:00
scrawl
c0faeea938 RigGeometry check if mesh has normals (Fixes #3667) 2016-12-15 22:39:21 +01:00
Aussiemon
369272fc70 Handle SDL event 0x302 by doing nothing 2016-12-14 21:08:20 -07:00
mrohrlach
f0f78c9d64 Slight adjustments to disintegration fix 2016-12-09 19:55:26 -07:00
mrohrlach
9624d8aade Added new method and variable to track float remainders of disintegration effections 2016-12-09 19:48:56 -07:00
MiroslavR
99bcf47167 Implement NiSphericalCollider (Closes #3644) 2016-12-06 01:32:13 +01:00
Koncord
7b3e487f91 Register packet ActiveSkills in packet controller 2016-12-03 23:40:30 +08:00
Koncord
b1bb552b65 Add packet ActiveSkills 2016-12-03 23:38:40 +08:00
David Cernat
7bbeed629d Merge pull request #109 from OpenMW/master
Add OpenMW changes up to 25 Nov
2016-11-26 01:58:43 +02:00
scrawl
5297d7b5be Merge pull request #1137 from nikolaykasyanov/osx-structure
[macOS] Move all resources files inside application bundles (fixes #3566)
2016-11-25 02:51:32 +01:00
Nikolay Kasyanov
db69342b5d [macOS] Move all configs & resources into app bundles
Fixes #3566 (https://bugs.openmw.org/issues/3566).
2016-11-23 22:32:54 +01:00
scrawl
505250f6ec Do not use architecture dependent type size_t in esm format (Fixes #3633) 2016-11-22 15:47:06 +01:00
David Cernat
9e290ad799 Fix spacing irregularities 2016-11-21 23:40:50 +02:00
David Cernat
95efb77e53 Implement sending of ID_GAME_SPELLBOOK from client 2016-11-21 06:07:29 +02:00
David Cernat
6ea5f08e9c Create placeholder for ID_GAME_SPELLBOOK 2016-11-21 02:28:05 +02:00
David Cernat
6c8c0827ea Move RequestData() method to BasePacket 2016-11-21 01:31:07 +02:00
David Cernat
fd6dd5daa8 Fix packetID for new packet 2016-11-21 00:03:41 +02:00
David Cernat
ae39daf76a Add and implement ID_MUSIC_PLAY 2016-11-20 22:54:49 +02:00
David Cernat
b028f0b51f Merge pull request #104 from OpenMW/master
Add OpenMW commits up to 17 Nov
2016-11-17 21:13:58 +02:00
scrawl
9d125bcaa2 Merge pull request #1129 from PhillipAnd/phillipand-cmake-fix
Fix various build issues with Visual Studio environment
2016-11-17 18:25:23 +01:00
Koncord
19240b825d Fix macro for MSVC 2016-11-17 20:51:03 +08:00
Koncord
b57ed2c119 Fix parameter type mismatch 2016-11-17 12:43:29 +08:00
Koncord
e2522fa366 Simplify LOG macros 2016-11-17 12:39:35 +08:00
David Cernat
6cd959fac8 Rename BasePlayer's GetCell() into getCell() 2016-11-16 17:43:58 +02:00
David Cernat
fa9d6e810e Use lowerCamelCase in tes3mp client function names like OpenMW does 2016-11-15 21:54:06 +02:00
David Cernat
8d2793401e Merge pull request #103 from OpenMW/master
Add OpenMW commits up to 13 Nov
2016-11-14 14:08:16 +02:00
Phillip Andrews
c18fc113e5 Changed missing library dependencies to simple fix 2016-11-14 00:01:22 -06:00
Allofich
3420121c3f Fix shadowing warnings 2016-11-13 23:20:51 +09:00
David Cernat
f7b5e5e638 Ignore packets from server that try to move LocalPlayer to invalid cells 2016-11-12 22:21:02 +02:00
Koncord
56959ebfda Implement magic 2016-11-12 19:39:16 +08:00
Koncord
37e9cafbf7 Add new API function: SetConsoleAllow
example:
tes3mp.SetConsoleAllow(pid, 0) -- disallow console to the player

The console is allowed by default
2016-11-04 03:01:26 +08:00
Koncord
adb49b7c7d Add New GUI dialog: ListBox
Example:

local GUI_LISTBOX = 42

function OnPlayerSendMessage(pid, message)
    if message == "/lb" then
        local items = "consectetur adipiscing elit\nsed do eiusmod tempor incididunt ut labore\net dolore magna aliqua." -- items can be separated through newline
        local label = "Lorem ipsum dolor sit amet"
        tes3mp.ListBox(pid, GUI_LISTBOX, label, items)
    end
end

function OnGUIAction(pid, idGui, data)
    if idGui == GUI_LISTBOX then
        print("ID: " .. idGui .. " data: " .. tostring(data)) -- if value higher than last item id
    end
end
2016-11-04 00:24:16 +08:00
David Cernat
cd798d5f23 Merge pull request #89 from OpenMW/master
Add OpenMW commits up to 30 Oct
2016-10-30 21:49:07 +02:00
Allofich
125e94ef0e Fix shadowing warnings 2016-10-31 00:39:31 +09:00
David Cernat
41504bd02a Use more accurate position for ID_OBJECT_PLACE 2016-10-30 00:51:23 +03:00
David Cernat
937bf97883 Send gold values correctly with ID_OBJECT_PLACE 2016-10-29 00:34:46 +03:00
David Cernat
180aa3f2f3 Send item count ID_WORLD_OBJECT_PLACE 2016-10-28 22:35:01 +03:00
David Cernat
46397a7dac Add and implement ID_OBJECT_ANIM_PLAY 2016-10-27 16:09:02 +03:00
David Cernat
fd4085725e Set version to 0.3.0 2016-10-27 14:05:20 +03:00
David Cernat
c205e793cb Add and implement ID_SCRIPT_MEMBER_SHORT 2016-10-27 00:41:14 +03:00
David Cernat
6d61c6cf2d Merge pull request #84 from OpenMW/master
Add OpenMW commits from Oct 25
2016-10-26 15:26:42 +03:00
David Cernat
97468980af Add and implement 3 new WorldPackets for ingame script variable values 2016-10-26 12:25:50 +03:00
Assumeru
f6ef1ce276 Fix Calm/Frenzy/Demoralize/Rally Creature weakness and resistance 2016-10-25 15:42:37 +02:00
David Cernat
385b5f39e3 Add and implement ID_OBJECT_ROTATE 2016-10-25 14:28:39 +03:00
David Cernat
54ed9a7ab4 Implement ID_OBJECT_MOVE and send it from ingame scripts 2016-10-25 14:07:00 +03:00
David Cernat
0fb9b6eefb On second thought, rename ID_OBJECT_MOVE_WORLD into ID_OBJECT_MOVE 2016-10-25 12:53:18 +03:00
David Cernat
947a677801 Replace ID_ACTIVATOR_ACTIVATE with ID_OBJECT_MOVE_WORLD 2016-10-25 12:42:29 +03:00
David Cernat
c25ebc34b3 Shorten WorldPacket IDs by removing WORLD from them 2016-10-25 12:15:27 +03:00
David Cernat
bdb53e1cb4 Implement ID_WORLD_DOOR_ACTIVATE and send it from MWBase::World 2016-10-25 10:40:55 +03:00
David Cernat
7264f13b8e Implement ID_WORLD_OBJECT_SCALE and send it from ingame scripts 2016-10-25 00:52:42 +03:00
David Cernat
52d156e136 Make server able to receive the 5 new WorldPackets 2016-10-25 00:50:32 +03:00
David Cernat
4f0a3e8aa1 Add placeholders for 5 new WorldPackets 2016-10-24 23:44:05 +03:00
David Cernat
b6111d16cc Add and implement ID_WORLD_VIDEO_PLAY 2016-10-24 17:52:19 +03:00
David Cernat
3fd93896f2 Add and implement ID_WORLD_OBJECT_LOCK 2016-10-24 13:20:04 +03:00
David Cernat
08ea5163c4 Add and implement ID_WORLD_OBJECT_UNLOCK 2016-10-24 11:26:31 +03:00
David Cernat
47ebd24b4a Merge pull request #79 from OpenMW/master while resolving conflicts
# Conflicts:
#	.travis.yml
#	apps/openmw/mwinput/inputmanagerimp.cpp
2016-10-24 09:18:21 +03:00
David Cernat
d85a1ee1a9 Fix errors remaining from merge with tes3mp-packetexpansion 2016-10-23 18:32:03 +03:00
David Cernat
c639337842 Merge with tes3mp-packetexpansion by fixing conflicts
# Conflicts:
#	apps/openmw-mp/Networking.cpp
#	apps/openmw/mwmp/Networking.cpp
#	components/CMakeLists.txt
#	components/openmw-mp/NetworkMessages.hpp
#	components/openmw-mp/PacketsController.cpp
2016-10-23 17:57:38 +03:00
David Cernat
0a44bea91d Send cell coordinates in tes3mp using mData instead of mCellId.mIndex 2016-10-23 16:55:30 +03:00
David Cernat
cbc132612a Use mRefNum.mIndex instead of just mRefNum and add extra debug 2016-10-23 16:33:53 +03:00
David Cernat
17f66e4e90 Implement ID_WORLD_OBJECT_PLACE 2016-10-23 13:30:32 +03:00
David Cernat
d0027ae3e7 Set correct packetID for ID_WORLD_OBJECT_PLACE 2016-10-23 12:53:49 +03:00
Koncord
77257b0721 Build fix 2016-10-23 14:05:12 +08:00
Koncord
c27351c19e Implement inventory functions
AddItem, RemoveItem, GetItemName, GetItemCount, GetItemHealth, GetInventorySize SendInventory
Example:
```lua
tes3mp.AddItem(pid, "glass dagger", 1, 50)
tes3mp.AddItem(pid, "glass dagger", 1, -1)
tes3mp.SendInventory(pid)
tes3mp.RemoveItem(pid, "glass dagger", 1)
tes3mp.SendInventory(pid)
local invSize = tes3mp.GetInventorySize(pid) - 1
for i = 0, invSize do
    print(("%s %d %d"):format(tes3mp.GetItemName(pid, i), tes3mp.GetItemCount(pid, i), tes3mp.GetItemHealth(pid, i)))
end
```
2016-10-23 02:57:49 +08:00
David Cernat
2b98e349ce Fix include for WorldEvent 2016-10-22 20:15:32 +03:00
David Cernat
6e43baf73e Send Cell instead of CellId because of problems with the latter 2016-10-22 20:09:13 +03:00
David Cernat
103b1e3f72 Send CellId in ID_WORLD_OBJECT_DELETE 2016-10-22 18:44:13 +03:00
David Cernat
3c49157ed7 Rename WorldPackets to ID_WORLD_OBJECT_DELETE and ID_WORLD_OBJECT_PLACE 2016-10-22 18:05:32 +03:00
David Cernat
92463c4a03 Fix Windows server crash caused by printing event->CellRef()->mRefID 2016-10-22 14:13:16 +03:00
David Cernat
565e7e4b9f Create and implement placeholder for ID_WORLD_OBJECT_CREATION 2016-10-21 21:57:05 +03:00
David Cernat
ac666edebd Add a CellRef to WorldEvent 2016-10-20 22:15:47 +03:00
David Cernat
b2845cd17c Create and start using WorldEvent class 2016-10-20 14:28:19 +03:00
MiroslavR
301dd77efb Save controls state (Fixes #3598) 2016-10-20 02:12:01 +02:00
David Cernat
f0fa5e8771 Add ContainsPacket method to packet controllers 2016-10-19 21:15:59 +03:00
David Cernat
285f89573d Create placeholders for WorldPacket classes 2016-10-19 20:36:11 +03:00
David Cernat
790d41e278 Move PlayerPackets into their own subfolder 2016-10-19 19:37:10 +03:00
David Cernat
d99463d752 Fix show-stopping mistake in PlayerPacket 2016-10-19 18:56:12 +03:00
David Cernat
d2212ef80b Rename PacketsController into PlayerPacketController 2016-10-19 16:31:07 +03:00
David Cernat
5e0c0dd5f1 Use logger in server's Networking MainLoop 2016-10-19 13:00:33 +03:00
David Cernat
fcc793a0af Create a new BasePacket that PlayerPacket inherits from 2016-10-17 18:47:16 +03:00
David Cernat
b8f4cb94fb Rename BasePacket into PlayerPacket 2016-10-17 15:54:36 +03:00
David Cernat
3136a12051 Resolve conflicts in pull request #75
# Conflicts:
#	CMakeLists.txt
#	apps/openmw/CMakeLists.txt
2016-10-14 18:34:17 +03:00
MiroslavR
11565b5966 Make actors with non-portable lights in inventory glow (Closes #2042, #3338) 2016-10-08 23:17:12 +02:00
scrawl
5c94e2324f Add missing use plugin macro for static build 2016-10-08 19:20:44 +02:00
Allofich
f6f16b68de Don't let Weakness to Magicka affect paralysis 2016-10-08 17:56:12 +09:00
scrawl
37bfa88b2d Merge pull request #1094 from Allofich/alchemy
Fix reversed use of alembics and retorts
2016-10-06 19:02:24 +02:00
Allofich
498976775a Fix reversed use of alembics and retorts 2016-10-07 01:38:50 +09:00
scrawl
0c981b6fe5 Fix typo in script opcode (Fixes #3583) 2016-10-06 17:36:50 +02:00
David Cernat
6eae017561 Merge pull request #74 from OpenMW/master
Add OpenMW commits up to 5 Oct
2016-10-06 06:16:09 +03:00
Allofich
6ec37b5cfb Fix shadowing warnings 2016-10-02 17:48:54 +09:00
David Cernat
f276edddcc Set version to 0.2.0 2016-09-30 15:26:55 +03:00
David Cernat
6650b74498 Add handling of skill increases 2016-09-30 07:15:59 +03:00
David Cernat
a0e9a672a5 Split updateClassStats in 3 and add handling of level progress 2016-09-30 04:52:21 +03:00
David Cernat
bc0aa86bcf Make variable names more consistent and easier to understand 2016-09-29 12:05:44 +03:00
David Cernat
433190d82e Rename OnPlayerUpdateEquiped into OnPlayerChangeEquipment 2016-09-28 15:20:23 +03:00
David Cernat
b6086ab015 Rename ID_GAME_DYNAMICSTATS_CURRENT into ID_GAME_DYNAMICSTATS 2016-09-28 14:13:24 +03:00
David Cernat
9cbda73586 Remove unused packets IDs 2016-09-28 12:44:39 +03:00
David Cernat
b65deca2ae Remove unused PacketRotation and PacketCreateProjectile 2016-09-28 12:37:08 +03:00
David Cernat
57f07813b0 Rename ID_GAME_UPDATE_POS into ID_GAME_POS 2016-09-28 11:45:14 +03:00
David Cernat
26487598a6 Rename ID_GAME_UPDATE_EQUIPED into ID_GAME_EQUIPMENT 2016-09-28 11:36:29 +03:00
David Cernat
0479eb38cc Update protocol version and make version mismatch error less confusing 2016-09-28 08:26:18 +03:00
David Cernat
ce4b326b02 Rename ID_GAME_UPDATE_BASESTATS into ID_GAME_DYNAMICSTATS_CURRENT 2016-09-28 07:50:16 +03:00
David Cernat
4d7130b12f Improve logic for script-induced cell changes 2016-09-27 11:28:44 +03:00
David Cernat
046a1ea899 Add packet for player levels 2016-09-25 14:28:25 +03:00
David Cernat
3e2fec973d Remove leftover variable 2016-09-25 12:53:30 +03:00
David Cernat
79c561057c Merge pull request #59 from OpenMW/master
Add OpenMW commits up to 18 Sep
2016-09-19 02:47:09 +03:00
scrawl
cd4b182091 Merge pull request #1051 from Allofich/textures
Use spell effect particle textures
2016-09-18 22:37:14 +02:00
Allofich
a8e9f2df67 Cleanup 2016-09-19 05:20:04 +09:00
Koncord
96e2d749c7 New auth protocol 2016-09-18 11:55:51 +08:00
Koncord
9bcca6d141 Init PacketLoaded in PacketsController 2016-09-18 11:55:51 +08:00
Koncord
fe370fa995 Add PacketLoaded 2016-09-18 11:55:51 +08:00
David Cernat
68f974d999 Merge pull request #57 from OpenMW/master
Add OpenMW commits up to 17 Sep
2016-09-17 21:31:51 +03:00
Allofich
be96ff1fd1 Remove redundant parameter 2016-09-18 01:57:47 +09:00
scrawl
8f5347b79b Update comment, osgAnimation::RigGeometry is no longer used 2016-09-17 18:31:39 +02:00
David Cernat
cdada00a8a Merge pull request #56 from OpenMW/master
Add OpenMW commits up to 15 Sep
2016-09-15 22:19:02 +03:00
MiroslavR
55e670c5fe Fix animation state not saving
References with animation state changed but otherwise identical to their content file counterparts
were previously considered unchanged and thus dropped while saving.
2016-09-15 16:11:54 +02:00
David Cernat
3b7693c719 Resolve conflicts in pull request #55
# Conflicts:
#	README.md
#	apps/openmw/mwclass/npc.cpp
#	apps/openmw/mwmechanics/combat.cpp
2016-09-15 08:49:57 +03:00
Allofich
a033ba3bd2 Override spell textures by NiTexturingProperty 2016-09-14 23:03:04 +09:00
emlai
fd2281e825 Fix typo 2016-09-10 21:25:28 +03:00
Koncord
5eaad1b92e again fix headerSize 2016-09-04 18:38:49 +08:00
David Cernat
81999a8179 Remove outdated ID_GAME_UPDATE_SKILLS packet, part 2 2016-09-02 07:58:20 +03:00
David Cernat
8abef0bebe Remove outdated ID_GAME_UPDATE_SKILLS packet 2016-09-02 07:36:39 +03:00
David Cernat
970e9aff2f Remove old class methods and don't include class in ID_GAME_BASE_INFO 2016-09-02 03:45:43 +03:00
David Cernat
e9dce26f38 Resolve conflicts in pull request #50
# Conflicts:
#	CMakeLists.txt
2016-08-31 07:28:32 +03:00
David Cernat
a20e7890a2 Fix formatting 2016-08-30 10:52:30 +03:00
Koncord
cf1a0113a1 Time API 2016-08-30 13:24:42 +08:00
Koncord
e7deff09d9 Update version 2016-08-30 11:27:03 +08:00
Koncord
3405e36ce4 Woops part 2 2016-08-29 22:59:04 +08:00
Koncord
118ab32c9b Woops 2016-08-29 21:03:04 +08:00
Koncord
a661de2a84 PacketClass 2016-08-29 21:01:23 +08:00
Koncord
2054baf7d3 Simplified PacketsController 2016-08-29 20:28:56 +08:00
scrawl
4322e76cb6 Fix shadowing warnings 2016-08-29 12:38:24 +02:00
scrawl
a5da3a269e Fix shadowing warnings 2016-08-29 12:20:00 +02:00
Koncord
a03c2f5019 Now server & client sensitive to version 2016-08-27 15:36:22 +08:00
David Cernat
4d2ca20445 Resolve conflicts in pull request #43
# Conflicts:
#	README.md
2016-08-24 22:03:35 +03:00
scrawl
c968ebee96 Merge pull request #1033 from Allofich/warnings
Remove unnecessary destructor
2016-08-22 14:44:57 +02:00
Allofich
73463cd12f Remove unnecessary virtual destructor 2016-08-22 21:34:57 +09:00
scrawl
f92560986e Merge pull request #1031 from kpp/fix_uninitiaized_escape_hash_filter
Fix uninitialized escape_hash_filter
2016-08-21 22:56:31 +02:00
Allofich
8c5aae0722 Add virtual destructors 2016-08-21 18:31:46 +09:00
Roman Proskuryakov
416466e53e Fix uninitialized escape_hash_filter 2016-08-19 21:13:38 +03:00
David Cernat
2337a0becb Add LOG_APPEND method for writing to log without timestamp and level 2016-08-18 23:17:46 +03:00
David Cernat
535731c018 Fix month in logger 2016-08-18 18:38:24 +03:00
David Cernat
436548413e Resolve conflicts in pull request #39
# Conflicts:
#	CMakeLists.txt
2016-08-18 15:10:52 +03:00
Koncord
dd6ebdeb4f formated C string to C++ 2016-08-18 08:44:47 +08:00
Koncord
1537fdbb76 Add SetLevel function & Verbose log level 2016-08-18 07:57:11 +08:00
Koncord
554810fbeb Removed redundant const in headerSize() 2016-08-18 07:42:08 +08:00
David Cernat
8eda381016 Make formatting consistent, part 2 2016-08-17 18:20:36 +03:00
David Cernat
e39b66af4f Move logger to components 2016-08-17 06:15:44 +03:00
scrawl
341e3846c0 Use initial particle state to compute the initial bounding box (Fixes #3500) 2016-08-16 23:28:03 +02:00
scrawl
dda5bfbc9f CharacterPreview no longer depends on osgViewer 2016-08-16 22:47:45 +02:00
David Cernat
3c6710a7b5 Merge pull request #35 from OpenMW/master
Add OpenMW commits from 2nd week of August
2016-08-15 19:21:09 +03:00
David Cernat
d9cfd5bac2 Resolve conflicts with OpenMW 2016-08-15 19:14:13 +03:00
scrawl
641005b317 Remove Camera's children before removing the Camera
Should work around OSG race condition ( http://forum.openscenegraph.org/viewtopic.php?t=16077 )
2016-08-15 18:12:46 +02:00
scrawl
a44ba0e461 Merge pull request #966 from kpp/find_mygui
Find mygui
2016-08-15 16:36:48 +02:00
Roman Proskuryakov
4cffdb67d8 Uses case-sensitive MyGUI_* variables 2016-08-15 15:59:02 +03:00
Koncord
32a2327f59 fix header size 2016-08-15 07:52:54 +08:00
scrawl
513e1da8a3 Remove unneeded casts 2016-08-14 16:44:11 +02:00
scrawl
33d27a2285 Use ref_ptr 2016-08-14 16:41:33 +02:00
scrawl
2f6075329b Clang warning fixes 2016-08-14 15:10:50 +02:00
David Cernat
babba95413 Merge pull request #34 from OpenMW/master
Add OpenMW commits from 1st week of August
2016-08-08 15:53:56 +03:00
scrawl
46538b9438 Merge pull request #1011 from devnexen/master
Mainly making compilable under OpenBSD.
2016-08-07 20:34:03 +02:00
Marc Zinnschlag
aa1ed9b172 Merge remote-tracking branch 'aesylwinn/RenderWater' 2016-08-07 17:03:58 +02:00
David Carlier
83bab29e4b Mainly making compilable under OpenBSD.
Renaming one resource file as the space led to issue for qt/moc.
2016-08-06 19:00:27 +01:00
Koncord
1022b6b27c Fix a header size 2016-08-06 03:28:01 +08:00
Aesylwinn
5753f52b47 Move water mesh + simple state generation to components library. 2016-08-05 13:25:05 -04:00
Koncord
7898b1181d Reduced package size 2016-08-05 14:21:09 +08:00
David Cernat
8686b9cc12 Merge pull request #29 from OpenMW/master
Add OpenMW commits from end of July
2016-08-04 00:56:36 +03:00
MiroslavR
b65f379b7f Save scripted animation state (Fixes #1931, #2150, #3393) 2016-08-03 03:52:35 +02:00
Koncord
ed3dc8ca7b Reduced server dependings 2016-08-02 18:52:58 +08:00
Koncord
7107136808 New API
SetExterior(pid, x, y)
GetExteriorX(pid)
GetExteriorY(pid)

also "SetCell" will now move to the named external cells (e.g. SetCell(pid, "Balmora"))
2016-07-30 01:33:28 +08:00
Marc Zinnschlag
63fd1e8df7 Merge remote-tracking branch 'origin/master' 2016-07-27 15:49:11 +02:00
AnyOldName3
a0699ce20d Change some <> characters to double quotes, resolving compilation problems. 2016-07-27 01:19:05 +01:00
AnyOldName3
20f73f4a32 Relocate escape-related code to new files escape.hpp and escape.cpp. 2016-07-27 00:58:31 +01:00
Koncord
1e3eff91ac Merged branch tes3mp-gui into tes3mp-gui 2016-07-23 22:08:01 +08:00
Koncord
9ab77cb123 New API functions: MessageBox, CustomMessageBox, InputDialog
New Callback: OnGUIAction
2016-07-23 22:02:06 +08:00
Stanislav Zhukov
917fa63f5c Fixed security issue 2016-07-23 17:14:54 +08:00
MiroslavR
d790747389 Implement deletion of moved references (Bug #3471) 2016-07-22 01:59:02 +02:00
AnyOldName3
7243583963 Change a switch to a series of if/else if/.../else, hopefully resolving compilation issues on OSX and Linux. 2016-07-21 01:36:14 +01:00
AnyOldName3
2b829f7f7b Move some stuff to a header, removing the need for a dodgy hack. 2016-07-21 01:07:25 +01:00
AnyOldName3
becc053555 Trick the software into building by using what I assume is a really dirty hack. 2016-07-21 00:16:00 +01:00
AnyOldName3
519fbab864 Remove useless print 2016-07-20 23:18:09 +01:00
AnyOldName3
32f0ded8f6 Fix bug in unescape filter, but still manage not to fix build issue. 2016-07-20 23:15:44 +01:00
AnyOldName3
423919abb5 Make it not build again (but theoretically enable the desired functionality). 2016-07-20 15:19:34 +01:00
AnyOldName3
59639e3988 Make it build again (but remove the new functionality). 2016-07-20 15:16:53 +01:00
AnyOldName3
d9d5a6561b Adjust the code so that it should (maybe) work, changing the compilation error to a less straighforward one. 2016-07-20 14:50:34 +01:00
AnyOldName3
95d2c7ea5c Attempt to unescape characters when constructing file paths, introducing compilation errors. 2016-07-20 02:48:57 +01:00
David Cernat
360eec30a0 Merge pull request #2 from OpenMW/master
Add recent OpenMW commits by AnyOldName3
2016-07-20 02:58:57 +03:00
Marc Zinnschlag
c17e1ca24a Merge remote-tracking branch 'anyoldname3/ignore-hash-test' 2016-07-19 16:19:28 +02:00
Aesylwinn
b4a000913c Merge remote-tracking branch 'yar/master' into Even
# Conflicts:
#	CMakeLists.txt
#	apps/openmw/mwdialogue/filter.cpp
#	apps/openmw/mwmechanics/character.cpp
#	apps/openmw/mwworld/localscripts.cpp
#	components/CMakeLists.txt
#	components/compiler/exprparser.cpp
#	components/sceneutil/workqueue.cpp
2016-07-17 23:50:52 -04:00
davidcernat
7bf08e5e5a Fix transition between exterior cells for non-local players
Make the local player send a packet whenever moving from one exterior cell to another, don't require objects to have RefNums to be moved correctly between exterior cells, and increase the packet priority for cell changes.
2016-07-17 22:03:20 +03:00
MiroslavR
721fa28c1e Fix assertion failure with NiTextureEffect missing source texture 2016-07-16 18:59:18 +02:00
davidcernat
b7e377c636 Remove _boundingBoxComputed from sceneutil's riggeometry.cpp
Recent versions of OpenSceneGraph have no _boundingBoxComputed, which is why building TES3MP with them causes an error. As expected, recent versions of OpenMW do not use _boundingBoxComputed either.
2016-07-16 15:12:22 +03:00
AnyOldName3
f1b5ad5804 Remove unused unsafe function and properly remove inheritance from std::string, providing implementations of missing stream operators preventing boost reading and writing to escape strings. 2016-07-12 17:09:57 +01:00
GrimKriegor
ace719507c Ported OpenMW's "Don't use unordered_map" commit to TES3MP to fix Issue #1
https://github.com/TES3MP/TES3MP/issues/1
2016-07-12 01:42:05 +01:00
AnyOldName3
e6f78ae5b7 Switch indentation to spaces to remain consistent with the rest of the project 2016-07-12 01:06:57 +01:00
AnyOldName3
08df463c94 Separate declaration and definition of some static members to hopefully calm Travis down. 2016-07-12 00:37:08 +01:00
AnyOldName3
7475d90693 Fix dodgy include by changing backslashes to forwardslashes 2016-07-12 00:14:19 +01:00
AnyOldName3
5121e77a95 Remove the cause of a warning which upset Travis (but not the thing that made the Travis build fail, as I have no idea why it wouldn't work or how to fix it 2016-07-12 00:00:29 +01:00
AnyOldName3
1a0642f1db Make it work by realising that what boost::program_options calls validation is what any sane person would regard as parsing 2016-07-11 22:33:15 +01:00
AnyOldName3
195dd27780 Resolve obvious runtime error revealing more subtle one 2016-07-11 22:05:38 +01:00
MiroslavR
9c6739f1b3 Fix doubled particle spawn range 2016-07-11 22:40:58 +02:00
AnyOldName3
fbe6dc9704 Change compilation error to runtime exception and decide that inheriting from std::string may have been a bad idea in C++ 2016-07-11 21:33:36 +01:00
AnyOldName3
7697406467 Partially fix '2 overloads have similar conversions' compilation error 2016-07-11 14:39:38 +01:00