mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
Merge pull request #815 from Fam0r/master
Make BlockPermissions affect gas blocks better
This commit is contained in:
commit
ebbff5a35a
@ -738,6 +738,10 @@ void InputHandler_PlaceBlock(void) {
|
||||
if (Game_CanPick(old) || !Blocks.CanPlace[block]) return;
|
||||
/* air-ish blocks can only replace over other air-ish blocks */
|
||||
if (Blocks.Draw[block] == DRAW_GAS && Blocks.Draw[old] != DRAW_GAS) return;
|
||||
|
||||
/* undeletable gas blocks can't be replaced with other blocks */
|
||||
if (Blocks.Collide[old] == COLLIDE_GAS && !Blocks.CanDelete[old]) return;
|
||||
|
||||
if (!CheckIsFree(block)) return;
|
||||
|
||||
Game_ChangeBlock(pos.X, pos.Y, pos.Z, block);
|
||||
|
@ -296,7 +296,6 @@ static void MPConnection_BeginConnect(void) {
|
||||
String_InitArray(title, titleBuffer);
|
||||
|
||||
/* Default block permissions (in case server supports SetBlockPermissions but doesn't send) */
|
||||
Blocks.CanPlace[BLOCK_AIR] = false; Blocks.CanDelete[BLOCK_AIR] = false;
|
||||
Blocks.CanPlace[BLOCK_LAVA] = false; Blocks.CanDelete[BLOCK_LAVA] = false;
|
||||
Blocks.CanPlace[BLOCK_WATER] = false; Blocks.CanDelete[BLOCK_WATER] = false;
|
||||
Blocks.CanPlace[BLOCK_STILL_LAVA] = false; Blocks.CanDelete[BLOCK_STILL_LAVA] = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user