1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

62 Commits

Author SHA1 Message Date
Petr Mikheev
790ddcf32e Fix #7420 (Local scripts on items cause the game to crash when activated) 2023-06-12 21:25:48 +02:00
Petr Mikheev
8d1e52ed51 Extract engine handlers processing from LuaManager to a new class EngineEvents 2023-03-26 03:38:40 +02:00
Petr Mikheev
0b385d5db9 Create MWWorld::SafePtr 2023-03-13 23:44:00 +01:00
Petr Mikheev
e9420b2b68 Remove implicit conversion MWWorld::Ptr -> bool 2023-01-18 02:40:56 +01:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
psi29a
9ed4d17f8a Merge branch 'hidden_marker' into 'master'
Use single implementation to check whether marker is hidden

See merge request OpenMW/openmw!2096
2022-07-06 07:30:56 +00:00
elsid
bef15edf0b
Remove redundant ostream, istream, iostream and sstream includes
* Replace by std::to_string and operator+ where possible.
* Move the code requiring to include <sstream> from .hpp to .cpp files.
2022-07-05 01:41:28 +02:00
elsid
20c15b30de
Move getLuaType out of MWWorld::PtrBase
This function is used only for Lua related code and don't need to be present
everywhere ptr.hpp is included.
2022-07-05 00:53:19 +02:00
elsid
4613840914
Use single implementation to check whether marker is hidden 2022-07-05 00:36:37 +02:00
Matt
49e21e121a Revert "Merge branch 'refactor/6677-2' into 'master'"
This reverts merge request !1733
2022-04-04 17:09:52 +00:00
Matt
21e4c10fa9 Introduce IndexedVector 2022-04-04 13:56:19 +00:00
Petr Mikheev
d251c4e2a1 [Lua] Change behavior of obj.type 2022-03-15 23:35:36 +01:00
wareya
d5aaa0394a Fix a missing required include 2021-11-04 17:48:21 -04:00
Bo Svensson
6fb376f1cf
templatise ptr.hpp (#3185)
With this PR we consolidate identical logic for Ptr and ConstPtr with the help of a template.
2021-10-25 09:08:50 +02:00
psi29a
e86b9a7b89 Merge branch 'add_comment' into 'master'
Add comment for MWWorld::Ptr::getType() because it is not obvious.

See merge request OpenMW/openmw!1291
2021-10-14 12:44:04 +00:00
Petr Mikheev
4e9d691715 Add comment for MWWorld::Ptr::getType() because it is not obvious. 2021-10-12 21:30:37 +02:00
Petr Mikheev
a8acc19988 Avoid copying std::string in MWWorld::Ptr::getTypeDescription() 2021-10-12 00:18:23 +02:00
Bo Svensson
ef906cbfa8
improves MWClass mapping (#3166)
Currently, we use a peculiar mapping of ESM classes by their std::type_info::name. This mapping is an undefined behaviour because std::type_info::name is strictly implementation defined. It could return a non-unique value on some platforms. With this PR we use the unsigned int sRecordId of the ESM class as a more efficient lookup type that does not build on undefined behaviour. We can expect marginally faster save-game loading with these changes as well.
2021-10-11 13:46:21 +02:00
Andrei Kortunov
8084a336b5 Replace zeroes and nulls by nullptrs 2020-11-29 11:14:07 +04:00
Rafael Moura
ecbde7b11e Added ConstContainerStoreIterator
using base template for ContainerStoreIterators

less template arguments for ContainerStoreIteratorBase
2017-02-18 13:47:18 +00:00
scrawl
edde5bd065 Accept a ConstPtr in ContainerStore::stacks 2015-12-18 17:01:21 +01:00
scrawl
d4eba794c3 Add ConstPtr 2015-12-17 23:34:52 +01:00
dteviot
407cd50890 fixed warning C4099:
type name first seen using 'class' now seen using 'struct'
2015-03-06 21:36:42 +13:00
scrawl
eb99ed697b Reduce includes 2015-01-10 01:00:52 +01:00
scrawl
039398c8ae Basic RefData and CellRef change tracking
Wrapped item charge handling in getItemHealth function
2014-05-25 14:30:07 +02:00
Emanuel Guevel
20cfdd4b43 Move LiveCellRefBase ctor where it belongs to 2014-05-22 20:50:00 +02:00
Marc Zinnschlag
367919200f moved CellRefList into a separate file 2014-02-23 20:11:05 +01:00
Marc Zinnschlag
f220867144 make Ptr a bit more pointer-like 2014-02-23 18:17:41 +01:00
Marc Zinnschlag
dd674566a2 store content of containers in saved game files 2014-01-31 13:25:32 +01:00
Marc Zinnschlag
e818d43bc3 removed an outdated typedef and some dead code 2013-12-05 13:21:26 +01:00
Chris Robinson
21121d5ba5 Store the object class in the LiveCellRef 2013-08-16 04:18:48 -07:00
Chris Robinson
2853b56ed5 Throw an exception when trying to get an empty Ptr's type 2013-08-15 04:52:01 -07:00
Chris Robinson
0f2b2ff1ce Small header cleanup 2013-08-15 01:21:43 -07:00
Chris Robinson
86f2cd5848 Use dynamic_cast to get the LiveCellRef 2013-08-14 20:26:50 -07:00
Chris Robinson
48c07fbd98 Remove some unnecessary fields from Ptr 2013-08-14 17:05:42 -07:00
Chris Robinson
74f855e948 Move common LiveCellRef fields to the base class 2013-08-14 01:55:51 -07:00
Chris Robinson
11166a1a17 Don't store the type name string in the Ptr
This should get rid of all heap allocations caused by constructing or copying
Ptr objects.
2013-08-14 00:45:28 -07:00
Chris Robinson
b6d2888c48 Avoid using boost::any in MWWorld::Ptr
Reduces dependency on Boost, and should improve performance a bit when
copying or constructing Ptr objects.
2013-08-14 00:45:27 -07:00
Chris Robinson
a9cc3a2844 Ensure a valid CellStore for Ptr::isInCell 2013-08-06 19:49:01 -07:00
scrawl
c41f119ba6 Added new game button 2013-05-15 17:54:18 +02:00
Tom Mason
3c6ddd7fa7 fixed isInCell method 2013-01-20 14:10:04 +00:00
greye
3c2ce25f5f m prefix for mwworld/cellstore.hpp 2012-11-05 16:07:59 +04:00
guidoj
0549e949ba Mostly removal of unnecessary #include's and a little clean up 2012-07-17 09:27:12 +02:00
Marc Zinnschlag
7fcd41c69d Issue #107: Detemplateised CellStore; some include cleanup 2012-06-29 18:54:23 +02:00
Marc Zinnschlag
76174098c7 Issue #107: CellStore moved from ESMS to MWWorld 2012-06-29 16:48:50 +02:00
scrawl
ab6336b745 using items via the inventory is now possible by dragging them on the avatar (only implemented for books right now) 2012-05-15 18:05:53 +02:00
Marc Zinnschlag
a1d3516e0a constness fix 2012-03-30 17:01:23 +02:00
Marc Zinnschlag
a0ee2954bd Issue #217: moved some functino implementations from ptr.hpp to ptr.cpp 2012-03-21 12:29:07 +01:00
Marc Zinnschlag
0adbe258fd Issue #217: made Ptr track container; fixed a cmake script bug 2012-03-21 12:20:19 +01:00
Marc Zinnschlag
c081160591 replaced container store in ref data with new custom data implementation 2012-01-27 14:55:58 +01:00