1
0
Commit Graph

189 Commits

Author SHA1 Message Date
Mattes D
365cbc6e1c
Refactored more of Entities and BlockEntities to use Vector3. (#4403) 2019-09-29 14:59:24 +02:00
Mattes D
26d0605121
Improved CMake generator (#4365) 2019-08-10 13:15:51 +02:00
Mattes D
e7016b1525
Removed coord-based API from cCuboid. (#4362) 2019-08-09 03:13:15 +02:00
peterbell10
950aeffff8
CheckBasicStyle: Check number of empty lines between functions (#4267)
Add check for number of empty lines between functions and fix the corresponding failures
2018-07-26 22:24:36 +01:00
peterbell10
a4dbb5c582
Prefer static_cast to reinterpret_cast (#4223)
* Change reinterpret_cast -> static_cast wherever possible
* Remove more unnecessary `const_cast`s.

reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there.
2018-05-02 08:50:36 +01:00
Alexander Harkness
ad22922393 Rename cEntity swim states (#3996)
* Replace cEntity:m_IsSubmerged with m_IsHeadInWater
* Replace cEntity:m_IsSwimming with m_IsInWater
* Add API documentation for new symbols
* Apply SetSwimState to all entities, not just mobs and players
* Pickups now use IsOnFire to check if they are on fire before destruction

Fixes #3987
2018-01-14 18:44:45 +00:00
peterbell10
757231cc6e
Add the fmt library (#4065)
* Replaces AppendVPrintf with fmt::sprintf
* fmt::ArgList now used as a type safe alternative to varargs.
* Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu.
* Adds FLOG functions to log with fmt's native formatting style.
2018-01-03 17:41:16 +00:00
bibo38
532731e6f4 Fixed Clang 5.0 compile errors (#4085)
* Fixed Clang 5.0 compile errors

* Fixed wrong comment

* Only disable warnings in Clang 5 or higher

* Added a CMake condition for the Clang 5 no-zero-as-null-pointer-constant warning

* Now using the use_nullptr branch of the Cuberite specific SQLiteCpp fork
2017-12-21 11:36:58 +00:00
Lukas Pioch
c5f590d460 Removed UTF-8 BOM (#4033) 2017-09-19 10:34:08 +02:00
peterbell10
e225b7f826 Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
LogicParrot
49c443896d Revert "Replace ItemCallbacks with lambdas (#3948)"
This reverts commit 496c337cdf.
2017-09-02 08:50:23 +01:00
peterbell10
496c337cdf Replace ItemCallbacks with lambdas (#3948) 2017-09-01 13:04:50 +02:00
Tiger Wang
da0778dfaa Merge pull request #3969 from peterbell10/cuboid
cCuboid: restore default copy construct and assign
2017-08-30 15:04:09 +01:00
peterbell10
84941bcc9f Update mbedtls to 2.5.1 (#3964)
* Renaming changes:
  * macro prefix "POLARSSL" -> "MBEDTLS"
  * functions now prefixed with "mbedtls_"
  * rename PolarSSL++ -> mbedTLS++
  * rename polarssl submodule

* Use mbedtls' AES-CFB8 implementation.

* Add cSslConfig to wrap mbedtls_ssl_config

* Update cTCPLink and cBlockingSslClientSocket to use cSslConfig

* Use cSslConfig in cHTTPServer

* Use cSslConfig for cMojangAPI::SecureRequest

* CI Fixes

* Set -fomit-frame-pointer on the right target
2017-08-30 15:00:06 +01:00
peterbell10
3687ef397c Cleanup Vector3 constructors and Abs 2017-08-28 13:48:07 +01:00
satoshinm
6bc5031517 Implement Forge protocol handshake support (#3869) 2017-08-27 23:10:20 +02:00
peterbell10
f4f2fc7c3d Add cUUID class (#3871) 2017-08-25 13:43:18 +01:00
peterbell10
b8dda388e0 Represent cItem::m_Lore as an AStringVector (#3882)
* Replace cItem::m_Lore with AStringVector

* Reword deprecation warning

* Fix lua bindings
2017-08-18 11:29:54 +01:00
Lane Kolbly
1ec85a2b2c Add cLuaWindow OnClicked Callback (#3901) 2017-08-17 16:27:43 +02:00
peterbell10
759618b035 Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
Lane Kolbly
b61898c30c Lua plugin cColor (#3833) 2017-07-12 12:30:43 +02:00
Mattes D
e05ca49459 Moved ApiParamError into cLuaState. 2017-06-26 10:52:59 +02:00
Mattes D
fe42538349 cBlockArea supports block entities. (#3795) 2017-06-24 11:58:06 +02:00
peterbell10
ad4172d21c Minor cBrewingRecipes cleanup (#3731) 2017-05-28 20:08:23 +02:00
Mattes D
2c3c1f1527 Tracer replacement (#3704)
* Replaced cTracer usage with cLineBlockTracer.

* Exported new cLineBlockTracer utility functions to Lua API.
2017-05-11 13:34:36 +01:00
Mattes D
3d5ee3e5c7 Fixed Lua bindings for const objects. 2017-05-09 14:10:53 +02:00
Lukas Pioch
74e6f41958 Don't return const ref params and removed functions from
ManualBindings.cpp
2017-05-01 11:10:21 +02:00
Mattes D
b3b723b453 Refactored to put URL Encoding / Decoding in a single place. (#3491) 2016-12-25 18:29:21 +01:00
Lukas Pioch
0c10704d1f Export GetPosition and GetSpeed from cEntity as a copy instead of a pointer to lua. 2016-12-10 13:32:11 +01:00
Mattes D
b1530bb28e LuaAPI: Fixed possible crashes in HTTPRequest bindings. 2016-09-26 12:47:40 +02:00
Mattes D
e169043a84 Fixed cCompositeChat's constructor LuaAPI bindings.
The tolua-generated constructor would return an extra string value.
2016-09-25 12:42:05 +02:00
Mattes D
c83b051c1a Bindings: Fixed some function signatures comments. 2016-09-08 23:06:38 +02:00
Mattes D
9493488e48 cLuaState: Added direct support for pushing a nil constant. 2016-08-22 20:09:56 +02:00
Mattes D
d4aff474c2 cLuaState: Added template to push multiple values in a single call. (#3331) 2016-08-21 11:03:10 +02:00
Mattes D
0f51f7e358 Fixed cWorld:ChunkStay bindings. (#3319)
Introduced new cLuaState::cOptionalCallback for representing optional callbacks (nil from Lua side).
Introduced new cLuaState::cStackTable class for easy access to Lua table's elements.

Fixes #3305.
2016-08-14 16:26:31 +02:00
Mattes D
2d58789d66 Converted cLuaState::cTableRef to use cTrackedRef.
This makes the table-based callbacks resistent to LuaState unloads and safer to use.
2016-08-13 21:16:21 +02:00
Mattes D
778b29b6f4 Fixed cFile API bindings. 2016-08-06 22:08:18 +02:00
Mattes D
f0c53dbad4 LuaAPI: Fixed bindings for cChunkDesc:GetBlockTypeMeta 2016-07-18 22:11:38 +02:00
Mattes D
bf88312a16 Converted cLuaState::cCallbackPtr into a UniquePtr. 2016-06-27 20:51:53 +02:00
Mattes D
257c5a1a54 cPluginManager: Use a callback for command handler registration. 2016-06-27 20:51:52 +02:00
Mattes D
fb4c3fc4d9 Changed cLuaWindow callbacks to use cLuaState::cCallback. 2016-06-27 20:51:50 +02:00
Mattes D
4489a89fde Changed plugin hook registrations to use cLuaState::cCallback. 2016-06-27 20:51:49 +02:00
Mattes D
af8c96026d Removed cWebPlugin, WebAdmin uses cLuaState::cCallback. 2016-06-27 20:51:48 +02:00
Mattes D
c2759186c0 Bindings: Fixed cBoundingBox API. 2016-06-05 18:23:16 +02:00
PlasmaPower
b4d9732fe9 Added GetTeamNames to cScoreboard (#3217)
Resolves #3210
2016-05-29 19:12:18 +02:00
Mattes D
e3d34d9917 Revert "Lua callback" 2016-03-21 09:58:15 +01:00
Mattes D
af200dfaae Changed cLuaWindow callbacks to use cLuaState::cCallback. 2016-03-17 19:29:03 +01:00
Mattes D
eb044e140e Changed plugin hook registrations to use cLuaState::cCallback. 2016-03-17 19:29:01 +01:00
Mattes D
62d81eb763 Removed cWebPlugin, WebAdmin uses cLuaState::cCallback. 2016-03-17 19:29:01 +01:00
Mattes D
fea556ca1b Renamed HTTPServer folder to HTTP.
It contains client code as well.
2016-03-01 16:19:56 +01:00