1
0
Commit Graph

32 Commits

Author SHA1 Message Date
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
319b30eec6
Fix fishing timer (#4217)
Fixes ["Fishing Speed Too Slow"](https://forum.cuberite.org/thread-3175-post-29000.html#pid29000).

Interestingly, the constants @NiLSPACE points out are actually correct:
```cpp
(Random.RandInt(100, 900) - static_cast<int>(a_Player->GetEquippedItem().m_Enchantments.GetLevel(cEnchantments::enchLure) * 100))
```
100 to 900 ticks is the correct timing of 5-45 seconds. However, the timer is only updated when the floater is in the water and the server side position was actually bobbing in and out of the water. This meant the timer took ~2-3x longer than it should.

With this change the floater position is always in the water and so the timer works as expected.
2018-04-27 16:33:45 +01: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
peterbell10
360d8eade0 FastRandom rewrite (#3754) 2017-06-13 21:35:30 +02:00
Alex
9cb1ad546f Changed fish launching mechanism (#3520)
Fish and other fishing loot now correctly fly towards played when reeled in.
2017-02-20 10:03:19 +01:00
mathiascode
dae2adde65 Updated sounds and effect IDs (#3422) 2017-02-15 06:05:24 +01:00
LogicParrot
ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Gargaj
d05fdbdee9 Test for correct coordinates when fishing
Fun fact: this was able to actually deadlock the server depending on where you were standing :)
2015-12-10 20:54:55 +01:00
Mattes D
6e4122e551 Unified the doxy-comment format. 2015-07-31 16:49:10 +02:00
Samuel Barney
804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
tycho
448df85e56 Added support for additional data in the ParticleEffect Packet
Also started refactoring how broadcasts are handled
2015-05-07 03:47:46 +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
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
Tycho
8ba6f73169 Fixed most of the reordering warnings 2014-02-05 09:43:49 -08:00
Tycho
8464f689ea Improved Type safety of eBlockFace
May Fix #640
2014-02-04 10:59:05 -08:00
STRWarrior
5eacf327b7 Fixed Parentheses. 2013-12-25 18:14:00 +01:00
STRWarrior
17a84111ce You are now able to sweep mobs to your position using fishing rods. 2013-12-25 17:26:17 +01:00
STRWarrior
8d51c22b36 Fishing underground is slower and fishing while raining is faster. 2013-12-22 15:22:50 +01:00
STRWarrior
caccf72b46 Fixed compiler warnings. 2013-12-22 14:54:07 +01:00
STRWarrior
7a299f1ba6 Fishing now uses a countdown instead of a random number each tick. 2013-12-22 14:48:22 +01:00
STRWarrior
128de10a2f You could now only get fish from non-source blocks. Fixed it. 2013-12-21 14:11:21 +01:00
STRWarrior
8efde94e4e Fixed bug where you could get fish from non-source blocks. 2013-12-21 14:07:32 +01:00
STRWarrior
af98fc6170 Fixed bug where the floater could pop in the water while you could already get a fish. 2013-12-20 18:34:08 +01:00
madmaxoft
8570d08eb4 More reordering fixes. 2013-12-20 17:11:51 +01:00
STRWarrior
a1ce0a6d73 Fixed #include in Floater.cpp. 2013-12-19 22:44:10 +01:00
STRWarrior
32d117a498 The floater now actualy dives under water. 2013-12-19 22:18:05 +01:00
STRWarrior
86bfed735e Added cFloater class. 2013-12-19 17:32:06 +01:00