Place blocks by holding LMB

This commit is contained in:
yvt 2013-09-06 12:42:11 +09:00
parent 776bafe1d8
commit 378d29b3d9
2 changed files with 5 additions and 1 deletions

View File

@ -2666,7 +2666,8 @@ namespace spades {
// draw block cursor
// FIXME: don't use debug line
if(p){
if(p->IsBlockCursorActive()){
if(p->IsBlockCursorActive() &&
p->IsReadyToUseTool()){
std::vector<IntVector3> blocks;
if(p->IsBlockCursorDragging()){
blocks = world->CubeLine(p->GetBlockCursorDragPos(),

View File

@ -199,6 +199,9 @@ namespace spades {
pendingPlaceBlock = true;
pendingPlaceBlockPos = blockCursorPos;
}
if(!blockCursorActive) {
newInput.primary = false;
}
blockCursorDragging = false;
blockCursorActive = false;