| 95 | } |
| 96 | |
| 97 | static cc_bool IntersectsBlock(struct Particle* p, CanPassThroughFunc canPassThrough) { |
| 98 | BlockID cur = GetBlock((int)p->nextPos.x, (int)p->nextPos.y, (int)p->nextPos.z); |
| 99 | float minY = Math_Floor(p->nextPos.y) + Blocks.MinBB[cur].y; |
| 100 | float maxY = Math_Floor(p->nextPos.y) + Blocks.MaxBB[cur].y; |
| 101 | |
| 102 | return !canPassThrough(cur) && p->nextPos.y >= minY && p->nextPos.y < maxY && CollidesHor(&p->nextPos, cur); |
| 103 | } |
| 104 | |
| 105 | static cc_bool PhysicsTick(struct Particle* p, float gravity, CanPassThroughFunc canPassThrough, float delta) { |
| 106 | Vec3 velocity; |
no test coverage detected