Sets the basic and extended collide types of the given block */
| 142 | |
| 143 | /* Sets the basic and extended collide types of the given block */ |
| 144 | static void Block_SetCollide(BlockID block, cc_uint8 collide) { |
| 145 | Blocks.ExtendedCollide[block] = collide; |
| 146 | Block_RecalcIsLiquid(block); |
| 147 | |
| 148 | /* Reduce extended collision types to their simpler forms */ |
| 149 | if (collide == COLLIDE_ICE) collide = COLLIDE_SOLID; |
| 150 | if (collide == COLLIDE_SLIPPERY_ICE) collide = COLLIDE_SOLID; |
| 151 | |
| 152 | if (collide == COLLIDE_WATER) collide = COLLIDE_LIQUID; |
| 153 | if (collide == COLLIDE_LAVA) collide = COLLIDE_LIQUID; |
| 154 | Blocks.Collide[block] = collide; |
| 155 | } |
| 156 | |
| 157 | /* Sets draw type and updates related state (e.g. FullOpaque) for the given block */ |
| 158 | static void Block_SetDrawType(BlockID block, cc_uint8 draw) { |
no test coverage detected