1
0
Commit Graph

37 Commits

Author SHA1 Message Date
Mattes D
9ee47e5999 Using Super. 2020-04-16 20:07:48 +00:00
Mat
0b0d6b23d2
Fix effect crashes (#4530)
* Fix effect crashes

* Change according to suggestion
2020-03-22 17:34:24 +02:00
peterbell10
c94d7184eb Broadcast refactor (#4264)
* Move Broadcast functions from cChunkMap to cBroadcaster

- Remove cBroadcastInterface in favour of cBroadcaster.

- cChunk: Remove broadcast functions.

* resurect broadcast interface

* Absorb cBroadcaster into cWorld.
Removes the need for forwarding the function calls.

* Improve const-correctness

* Use Int8 instead of char

+ Comment `ForClients` functions

* Improve comments

* Broadcaster: Rename ForClients functions
2018-07-24 22:30:49 +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
peterbell10
d3c1c626f5
Deal with covered switches consistently (#4161)
* Fixes a number of "<function>: not all control paths return a value" warnings on MSVC.

* Introduces the UNREACHABLE global macro and uses it instead of conditionally compiled switch defaults.

* Move cNBTParseErrorCategory from FastNBT.h into FastNBT.cpp to prevent bad calls to message()
2018-02-04 23:07:12 +00:00
Alexander Harkness
705deea205
Water bottles are drinkable potions (#4114)
Water bottles are now drinkable potions

Fixes #4111

Also update outdated mcwiki references
2017-12-26 20:27:24 +00:00
mathiascode
02775e52c4 Minor changes (#3909) 2017-08-24 11:19:40 +02:00
peterbell10
79eb4c3aed Implement invisibility effect 2017-08-03 15:34:38 +02:00
Mattes D
d1dee3c909 Fixed RasPi builds of unit tests.
On RasPi with gcc 4.8.2, the asserts wouldn't compile when tests were enabled.
Enforced the assumption that ASSERT code is generated only in Debug builds.
2016-08-04 20:47:53 +02:00
Blitz Rakete
4e0f829729 Fixed leaping potion not giving jump boost 2016-03-18 11:54:28 +01:00
LogicParrot
ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Samuel Barney
804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
Mattes D
c13b1931ff More style checking.
Spaces around some operators are checked.
2015-05-09 12:58:54 +02:00
Tiger Wang
a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Tycho
9c459cbe50 Merge branch 'master' into redstoneTests
Conflicts:
	src/Mobs/Monster.h
2014-09-25 15:22:08 +01:00
Chris Darnell
806871b86f A few compiler warning fixes 2014-09-22 18:23:56 -04:00
Tycho
045d54e0e2 Merge branch 'master' into redstoneTests
Conflicts:
	src/Blocks/ChunkInterface.h
2014-09-17 18:47:33 +01:00
Tycho
6e7c0e33b5 Added first test to show the object can be created 2014-09-17 18:40:10 +01:00
Howaner
1223a24d3c Merge branch 'master' into Effects 2014-09-12 19:13:46 +02:00
madmaxoft
1cc65b6264 Fixed style and alpha-sorting. 2014-09-03 10:29:10 +02:00
archshift
b414e91883 EntityEffect.cpp: Enable 1.8's leaping potion 2014-09-02 22:56:39 -07:00
Howaner
38e824dbcf Renamed SetWalkSpeed() to SetRelativeWalkSpeed() 2014-09-02 20:10:41 +02:00
Howaner
003206b1b0 Added slowness effect and added entity support. 2014-08-30 12:45:39 +02:00
Hownaer
240ec9b4bd Added speed entity effect. 2014-08-28 23:02:20 +02:00
madmaxoft
6ce61d1a6f Fixed a ToLua warning - operator = not supported. 2014-08-03 22:04:48 +02:00
Howaner
84462ba8b2 Fixed hunger bugs, Implemented golden apple, added jump statistic, added correct food effects. 2014-07-31 23:04:00 +02:00
archshift
60d4a16514 Fixed indentations, removed redundant init code in SplashPotionEntity.cpp 2014-07-26 03:48:16 -07:00
archshift
0298d34406 Moved potion static functions to EntityEffect to create splash potions through world 2014-07-26 03:48:16 -07:00
madmaxoft
2423fbf2ef Normalized comments.
This was mostly done automatically and then visually inspected for obvious errors.
All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
2014-07-17 22:15:34 +02:00
madmaxoft
f5259d7651 Only the cEntityEffect::effXXX constants are Lua-exported.
The rest of the classes don't need exporting, there's no interface using them anyway.
2014-07-15 11:24:48 +02:00
madmaxoft
5193335efa Reformatted EntityEffect code. 2014-07-15 09:48:11 +02:00
madmaxoft
d274851578 Fixed a MSVC warning in cEntityEffect::CreateEntityEffect(). 2014-07-15 09:43:45 +02:00
archshift
061010288a Readability and clarity changes 2014-07-14 13:46:43 -07:00
archshift
0409daf736 EntityEffect: Inlined functions, added explicit copy constructor and operator. 2014-07-13 15:43:49 -07:00
archshift
f77723128c Changed separating comment style from asterisks to slashes. 2014-07-13 15:23:23 -07:00
archshift
4e6395d6ff For now, removed creator member from Entity Effect for pointer safety 2014-07-11 17:27:29 -07:00
archshift
f5529e544c EntityEffects.x -> EntityEffect.x, Object-Oriented effects
Changed effect map to take a pointer of the effect as a result.
2014-06-18 22:54:14 -07:00