1
0
Commit Graph

37 Commits

Author SHA1 Message Date
Tiger Wang
6e80f7544d Update entity sizes 2021-04-12 22:35:07 +01:00
peterbell10
13144a08e4
Enable some more clang-tidy linter checks (#4738)
* Avoid inefficient AString -> c_str() -> AString round trip

* Avoid redundant string init expressions

* Avoid unnecessary return, continue, etc.

* Add .clang-format to help with clang-tidy fix-its

* Avoid unnecessary passing by value

* Avoid unnecessary local copying

* Avoid copying in range-for loops

* Avoid over-complicated boolean expressions

* Some violations missed by my local clang-tidy

* Allow unnecessary continue statements

* Add brackets

* Another expression missed locally

* Move BindingsProcessor call into clang-tidy.sh and add space

* Fix pushd not found error

* Different grouping of CheckBlockInteractionRate
2020-05-14 22:15:35 +00:00
Mattes D
9ee47e5999 Using Super. 2020-04-16 20:07:48 +00:00
Mat
9ddf433ae7
Add ambient mob sounds (#4521) 2020-03-22 15:50:34 +00: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
b4aa19f329
Item durability loss now depends on the item used. (#4123)
Armour durability also no longer changes when it
is used to break blocks or attack mobs.

Fixes #4119
2018-01-05 11:28:06 +00:00
Lane Kolbly
30c8470a52 Changed BroadcastSoundEffect, SendSoundEffect, and CastThunderbolt parameters to vectors (#3959)
* Made BroadcastSoundEffect take vector parameters.

* Added docs for new vectored methods

* Removed old code

* Fixed lua warnings

* Made old BroadcastSoundEffect not an override.

* m_Block to m_BlockPos, used Vector3d constructor where prettier.

* a_Block to a_BlockPos

* Changed thunderbolt a_Block to a_BlockPos
2017-09-19 15:12:54 +01: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
Pablo Beltrán
b18f6637b6 Fully implemented leashes (#3798) 2017-08-21 10:46:41 +02:00
Bond-009
6e8ec2fe34 Creepers explode when burned by flint and steel (#3865)
Fixed an issue where creepers didn't explode when they were burned with flint and steel
2017-07-22 22:05:09 +01:00
mathiascode
dae2adde65 Updated sounds and effect IDs (#3422) 2017-02-15 06:05:24 +01:00
LogicParrot
90be4e7efd Entities now bail out of ticks if destroyed (#3363) 2016-09-03 14:31:27 +03:00
LogicParrot
4aade202e0 cMonster::m_Target safety across worlds 2016-02-03 22:50:17 +02:00
LogicParrot
3a24ed4b61 Fixed creeper calling TargetIsInRange with null m_Target 2016-01-12 15:26:51 +02:00
Gargaj
86ea2ee50c stop creepers from exploding even if they just died 2015-12-08 22:34:32 +01:00
Gargaj
392a3d319c fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

Merge branch 'cavespider-attack' of github.com:Gargaj/cuberite into cavespider-attack

code style

fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

Merge branch 'cavespider-attack' of github.com:Gargaj/cuberite into cavespider-attack

code style

Merge branch 'cavespider-attack' of github.com:Gargaj/cuberite into cavespider-attack

Merge branch 'master' into cavespider-attack

Merge branch 'master' into cavespider-attack

fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

Merge branch 'cavespider-attack' of github.com:Gargaj/cuberite into cavespider-attack

code style

fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

Merge branch 'cavespider-attack' of github.com:Gargaj/cuberite into cavespider-attack

code style

Merge branch 'cavespider-attack' of github.com:Gargaj/cuberite into cavespider-attack

Merge branch 'master' into cavespider-attack

Merge branch 'master' into cavespider-attack

Merge branch 'cavespider-attack' of github.com:Gargaj/cuberite into cavespider-attack
2015-11-08 21:01:02 +01:00
Gargaj
429c896e33 Only send creeper updates when there is a change
Otherwise this keeps spamming the metadata packet for all the creepers on the server.
2015-11-07 21:57:32 +01:00
SafwatHalaby
9c6c6af75a Fixed creeper explosions 2015-05-30 09:54:32 +03:00
tycho
dae9e5792a Made -Weverything an error. 2015-05-24 12:56:56 +01:00
tycho
77f1f58c0a Make -Werror disabling file only
Ad fix a load of warnings
2015-05-19 19:32:10 +01:00
Mattes D
b698286e86 Creeper: Fixed skeleton check. 2015-03-21 15:52:49 +01:00
Tycho
2a9664d6ca Initial convertion of a_Dt to std::chrono
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2015-01-11 21:12:26 +00:00
Tiger Wang
a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
madmaxoft
d0cc9aedb3 More trailing whitespace fixes. 2014-07-17 23:16:54 +02: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
Howaner
d529971e27 Changed BroadcastSoundEffect function to take floating pos. 2014-07-13 02:08:02 +02:00
Tiger Wang
460d6bd0cb Changed everything to callbacks 2014-07-05 22:59:22 +01:00
Tiger Wang
9ef4b9d52d Exploded creepers drop nothing, part of #1058 2014-06-04 09:27:50 +01:00
Howaner
7e76f030aa Add entity invulnerable 2014-04-26 00:32:30 +02:00
tonibm19
10fdc51b0a Creeper fixes
- Fixed explosion time (1.5s, according to minecraftwiki)
- Creeper explodes if right clicked with flint and steel
2014-03-02 14:35:03 +01:00
TheJumper
2cc597372a Fixed Formatting, Added DropChances and CanPickUpLoot attributes to Monsters 2014-02-23 19:50:51 +01:00
Tiger Wang
8fbb936b63 Fixed TNT fizzing everywhere 2014-02-15 15:53:02 +00:00
Tiger Wang
cdd6478cea Did what xoft recommended 2014-01-25 21:29:27 +00:00
Tiger Wang
3e675f8c38 Implemented creeper abilities
* Creepers now explode with a sound effect
* Creepers drop a music disc on the unlikely event of being killed by a
skeleton's arrow

Inspired by @maniak89's PR #132.
2014-01-24 19:52:52 +00:00
Alexander Harkness
675b4aa878 Moved source to src 2013-11-24 14:19:41 +00:00