FLIBOBUG

Flibobug 


Flibobug or collision model bug, is a consequence of model’s boundaries being grid aligned.

As you may know, the hull of the player in counter-strike is a rectangular parallelepiped with a base of 32x32 units and, if standing, 72 units of height.

collision-model

Collision Model

Try to imagine a top-down perspective of the game’s grid where we can represent the player by its 32x32 units square base.

flibobug-grid

Top-down perspective

As mentioned, model is grid aligned so it won’t be allowed to rotate in the x/y plane causing every move to be done with a different collision model length based on the offset angle between movement’s direction and grid.
This length will be minimal when direction is parallel to grid’s vertical or horizontal axis (0° / 90° / 180° / 270°) and maximal when movement’s direction is in the middle of both (45° / 135° / 225° / 315°).

flibobug-square

Player’s model measured

After all the explanations, we can infer that when jumping diagonally we’ll need to actually travel less distance in order to reach the other end because we will be covering the difference with our own collision model.


Example:

Flibobug example

Flibobug example

On the left side of the previous diagram, there’s a vertical aligned jump of 250 units. With a model of 32 units, you’ll need to jump 218 units (as long as you jump at the edge of the block).

250 - 32 = 218

On the right side, instead, there’s a 45° diagonal jump of 250 units as well. This time, with a model of 32 units, you’ll need to jump ≈205 units.
The diagonal length of a square is sqrt(2) * side

250 - sqrt(2) * 32  204.74

The difference in distance is just that of the difference in model’s lengths:

sqrt(2) * 32 - 32  13.25

- Updated 02/2019 -