Fix #190
This commit is contained in:
parent
b1c87560c9
commit
8ebc1ffe15
@ -1052,12 +1052,15 @@ namespace spades {
|
|||||||
|
|
||||||
std::vector<IntVector3> cells;
|
std::vector<IntVector3> cells;
|
||||||
if(action == 0){
|
if(action == 0){
|
||||||
|
bool replace = GetWorld()->GetMap()->IsSolidWrapped(pos.x, pos.y, pos.z);
|
||||||
if(!p){
|
if(!p){
|
||||||
GetWorld()->CreateBlock(pos, temporaryPlayerBlockColor);
|
GetWorld()->CreateBlock(pos, temporaryPlayerBlockColor);
|
||||||
}else{
|
}else{
|
||||||
GetWorld()->CreateBlock(pos, p->GetBlockColor());
|
GetWorld()->CreateBlock(pos, p->GetBlockColor());
|
||||||
client->PlayerCreatedBlock(p);
|
client->PlayerCreatedBlock(p);
|
||||||
p->UsedBlocks(1);
|
if(!replace) {
|
||||||
|
p->UsedBlocks(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}else if(action == 1){
|
}else if(action == 1){
|
||||||
cells.push_back(pos);
|
cells.push_back(pos);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user