Tiger Wang
6b25ef4fa3
Fixed a door bug and reduced code
...
Doors wouldn't get powered by repeaters, and some blocks, like glass,
were viable middle blocks when they shouldn't have been.
2014-01-11 01:52:14 +00:00
Tiger Wang
d5b38402ed
Fixed doors, fixes #453
2014-01-10 21:35:41 +00:00
Tiger Wang
e7fba08e6c
Major refactoring of redstone
...
This commit is a refactoring of the redstone code, mainly the functions
handling the removal of invalid blocks from power supplier data
structures. Its aim is to improve performance and potentially reduce the
memory footprint of the data structures.
It works to reduce the amount of GetBlock()s triggered every tick.
Before, a GetBlock() was requested for every single item in the data
lists, as well as for every single redstone block in a chunk. Following
these changes, the AddBlock() event is utilised more effectively to only
update the lists when needed (a block is changed), as well as to insert
the block type (and update it when needed) alongside the coordinates
into the main redstone simulator chunkdata list.
In short, a single GetBlock() is now cached, with this cache being
updated when the simulator is awoken due to a block change.
At least, I *hope* that this is what it does :P
2014-01-10 20:31:05 +00:00
Tycho Bickerstaff
2e1588820d
fixed warnings in World.cpp
2013-12-31 09:16:42 +01:00
Tycho Bickerstaff
d724241407
converted commneted paramater names to the unused macro
2013-12-22 13:46:55 +00:00
Tycho Bickerstaff
94ca07cfbf
Merge branch 'master' of github.com:mc-server/MCServer
2013-12-22 13:19:27 +00:00
Mattes D
e0e01d0615
Merge pull request #461 from mc-server/repeaters
...
Repeaters, pressure plates, and others
2013-12-25 23:57:02 -08:00
Tiger Wang
d0572e73a0
Moved increment operator to back of variables
2013-12-26 00:12:06 +00:00
Tiger Wang
c6314e8935
Implemented stone and wooden pressure plates
2013-12-24 15:02:55 +00:00
Tiger Wang
76444470a4
Provides an enhancement to daylight sensors
2013-12-23 15:22:05 +00:00
Tiger Wang
11fbfb458d
Daylight sensor sensing enhancement
2013-12-22 23:20:43 +00:00
Tiger Wang
48b388aa97
A fix for daylight sensors
2013-12-22 20:06:15 +00:00
Tiger Wang
acb5a36a6a
Daylight sensors
2013-12-22 00:33:22 +00:00
Tiger Wang
5b2ac381b6
Fixed them again, confound it
2013-12-22 00:30:21 +00:00
Tycho Bickerstaff
5034ae29b8
Piston is now warnings clean
2013-12-21 15:08:01 +00:00
Tycho Bickerstaff
38f808ac3d
ChunkSender is now warnings clean
2013-12-21 15:00:31 +00:00
Tycho Bickerstaff
779aca6051
Merge branch 'master' into cmake
2013-12-21 13:32:40 +00:00
Tiger Wang
432a28d935
Fixed repeaters delay, maybe
...
Also added basic daylight sensors, though because GetBlockSkylight
always is 15, it doesn't work.
2013-12-20 21:19:13 +00:00
Tycho Bickerstaff
32e6be002d
Merge branch 'master' into cmake
2013-12-20 15:33:04 +00:00
madmaxoft
8610d45ef1
Fixed compiler warning when iterating over a fixed array of items (ARRAYCOUNT).
2013-12-20 16:01:34 +01:00
Tycho Bickerstaff
0e6107bfdd
Merge branch 'master' into cmake
2013-12-19 16:16:35 +00:00
Tiger Wang
b083979cb2
Fixed repeaters not updating power
2013-12-19 15:57:15 +00:00
Tycho Bickerstaff
e627f2f98c
Merge branch 'master' into cmake
2013-12-18 19:06:11 +00:00
Tiger Wang
13a22918e5
Fixed wire powering blocks beneath
2013-12-17 23:05:42 +00:00
Tiger Wang
09c47fabd2
Fixed bad repeater power queuing in corner case
...
Repeaters remain queued to power even if their original source has since
unpowered. Also functionised and cleaned up code.
2013-12-17 23:05:27 +00:00
Tiger Wang
ba4eae2d16
Implemented xoft's suggestions
2013-12-15 15:36:20 +00:00
Tiger Wang
b87055f7a5
Fixed wire repeater checking
2013-12-15 13:56:32 +00:00
Tiger Wang
bbcef6d6eb
Wires now power repeaters properly
2013-12-15 13:08:08 +00:00
Tiger Wang
ceb11cb477
Fixed the hopefully final wire self-powering bug
2013-12-15 12:17:29 +00:00
Tiger Wang
765b847281
Potentially fixed debug asserts
2013-12-14 19:29:50 +00:00
Tiger Wang
7f9f6f5095
Wires no longer power if a block cuts them off
...
Also reduced more unneeded code.
2013-12-14 19:11:15 +00:00
Tiger Wang
95be80cdb5
Implemented note block playing and fixed wire
...
Game of Thrones music in Minecraft, here I come!
2013-12-14 16:52:22 +00:00
Tiger Wang
5685e5ba33
Fixed compilating!
2013-12-14 12:10:05 +00:00
Tiger Wang
0aeece7fda
Fixes to redstone wire and torches
...
+ Wires now power blocks around the block beneath
* Torches no longer power off if it is on a linked powered block
* Enhanced code, split functions, etc.
2013-12-14 02:40:54 +00:00
Tiger Wang
d94ee0fa79
Removed loads of unneeded code again
2013-12-14 01:14:09 +00:00
Tiger Wang
d110d798d2
Reduced loads of unneeded code
...
Merged wire powering detection code into a single function.
2013-12-14 00:43:05 +00:00
Tiger Wang
cd35bd2c49
Fixed pistons being viable middle block
...
Also an excuse to update submodules
2013-12-11 18:42:38 +00:00
Tycho Bickerstaff
948fb78fa1
moved simulor to globs
2013-12-10 23:06:15 +00:00
Tycho Bickerstaff
dd633d5a94
Merge branch 'master' into cmake
2013-12-10 23:01:35 +00:00
Tycho Bickerstaff
6cdc990884
more cmake
2013-12-10 21:39:20 +00:00
Tiger Wang
9987611792
Provides a possible fix for repeater timings
...
Not completely reliable, but at least some types of clock work.
2013-12-10 21:24:02 +00:00
Mattes D
9cfd8f6910
Merge pull request #412 from mc-server/fixes
...
Main feature: repeater delays!
2013-12-10 06:19:38 -08:00
Tiger Wang
e2e8c9624c
Readded initial line
2013-12-10 10:31:42 +00:00
Tiger Wang
b6e0234985
Fixed compile (alas, no more goto)
2013-12-10 10:29:36 +00:00
Tiger Wang
0905369fc7
Fixed Floody lava to stone fizzle
2013-12-10 00:29:59 +00:00
Tiger Wang
1dec73be0b
Added repeater delays
...
They DO sometimes get stuck though :P
2013-12-10 00:21:24 +00:00
Tiger Wang
ebad87d870
Slight redstone wire performance improvement
2013-12-09 23:48:06 +00:00
Tiger Wang
aecdfebf36
Changed more FastSetBlocks to SetBlocks
...
Fixes duplication bugs.
2013-12-09 23:43:26 +00:00
worktycho
187449824c
Fix Unused Variable Warning at FluidSimulator.cpp line 169 and 176
2013-12-09 14:15:30 +00:00
Tiger Wang
a61082ffee
Changed some FastSetBlocks to SetBlock
...
Should fix some duplication glitches.
2013-12-07 14:55:19 +00:00
Tiger Wang
1932cc38a1
Fixed trapdoors not toggling
...
The redstone simulator kept on resetting them.
2013-12-07 14:41:58 +00:00
Tiger Wang
126577214a
Re-implemented redstone duplicate checking
2013-12-06 20:33:48 +00:00
Samuel Barney
d62bfdaca4
Merged if statements.
2013-12-05 10:01:23 -07:00
Samuel Barney
3d9396b097
Finished Merge
2013-12-05 07:34:56 -07:00
Samuel Barney
efae54db0a
Made suggested changes
2013-12-03 19:05:34 -07:00
Samuel Barney
30906a597c
Fire no longer goes out when on top of nether rack
2013-12-02 14:11:45 -07:00
madmaxoft
3dfd051fcb
Fixed linux compile errors and formatting in RedstoneSimulator.cpp
2013-12-01 13:58:04 +01:00
Tiger Wang
fad43f0c40
Fixed pistons extending
...
They didn't when a source was in front, but now they do! Yay!
2013-11-30 15:07:21 +00:00
Tiger Wang
363db1bdc4
Removed redstone duplicate power checking
...
There was no need for it, and it introduced some bugs.
2013-11-30 13:52:11 +00:00
Tiger Wang
d12106ee97
Improved piston direction checking
...
Now uses AddFaceDirection, as suggested by xoft.
2013-11-30 13:41:40 +00:00
Tiger Wang
455686e3ad
Pistons no longer accept power through front face
...
This fixes #60 .
2013-11-30 12:11:39 +00:00
Tiger Wang
8d88c8f26f
Improved redstone speed and fixed a wire bug
...
The redstone simulator no longer goes through the Powered and
LinkedPowered blocks lists for EVERY item in the chunk data, instead,
only at every tick.
Also, wires powering each other that had the same data value is now
fixed.
2013-11-30 00:30:49 +00:00
Tiger Wang
1d69c80ad3
Implemented trapdoors, fixes #43 and #105
...
Also updated redstone simulator to support it
2013-11-29 22:27:08 +00:00
Tiger Wang
a6630d3239
Merged master into redstonefixes
2013-11-27 21:35:13 +00:00
Alexander Harkness
d925cf4def
Fixed the remaining derps
2013-11-27 07:40:59 +00:00
Tiger Wang
32449f1fca
Further attempts to fix compile
2013-11-25 18:29:36 +00:00
Tiger Wang
e3db69c4ae
Attempt to fix compilation
2013-11-24 18:44:22 +00:00
Alexander Harkness
c3cd436ec3
Merge remote-tracking branch 'origin/master' into foldermove2
...
Conflicts:
GNUmakefile
2013-11-24 14:37:03 +00:00
Alexander Harkness
675b4aa878
Moved source to src
2013-11-24 14:19:41 +00:00