Counter-Türkiye sheetSheet Note N1 · Sheet 06 TR / EN

Note N1 · Counter-Türkiye

SMOKE AND KILL FEED

CS2 smoke in Minecraft: how to tell whether a bullet went through the smoke

Sheet
COUNTER-TÜRKİYE
Topic
Java · Paper API
Source
silah/BombaSistemi.java
Date
2026-11-12
Reading
2 min

Short answer: keep the smoke as an ellipsoid with a 4.8-block horizontal radius, flattened vertically. To tell whether a bullet passed through it, find the point on the bullet's line closest to the smoke's centre and check whether that point lies inside the ellipsoid. If they intersect, work out the entry and exit points, record a tunnel in the smoke that stays open for 1.8 seconds, and mark the kill as "through smoke" in the kill feed.

01The smoke volume

Counter-Türkiye is a co-developed project that brings CS2's weapon, economy and match systems to Minecraft (Paper) without client mods. This note covers the smoke and the kill feed.

Whether a point is inside the smoke comes down to one inequality. The centre is lifted 1.2 blocks off the ground; dividing the vertical distance by 0.8 flattens the smoke vertically.

Vector merkez = d.merkez.toVector().add(new Vector(0, 1.2, 0));
double dx = loc.getX() - merkez.getX();
double dy = (loc.getY() - merkez.getY()) / 0.8;
double dz = loc.getZ() - merkez.getZ();
return dx * dx + dy * dy + dz * dz < DUMAN_YARICAP * DUMAN_YARICAP;   // 4.8

A grenade exploding inside the smoke opens a gap for a while; a point inside that gap doesn't count as in the smoke.

02The bullet's line

A bullet is a line segment: start a, impact point b. The projection of the smoke's centre onto that segment is found; t is clamped between 0 and 1 so the point can't fall outside the segment. The ellipsoid test above is applied to that point.

Vector ab = b.toVector().subtract(a.toVector());
double t = Math.max(0, Math.min(1,
        merkez.clone().subtract(a.toVector()).dot(ab) / ab.lengthSquared()));
Vector enYakin = a.toVector().add(ab.clone().multiply(t));

03A tunnel in the smoke

If they intersect, the bullet's entry and exit points are worked out: from the closest point, half the smoke's thickness at that point to either side. A tunnel living 36 ticks (1.8 seconds) is recorded between those two points, and particles are drawn along the bullet's line; the player sees the smoke being split.

04Kill feed icons

Every hit is recorded with what the kill feed will show:

public record Kayit(UUID atici, String silah, long zaman, boolean kafa,
                    boolean noscope, boolean kor, boolean duvar, boolean duman,
                    boolean yanma, boolean havada) {}
  • Wallbang: the bullet penetrated at least one block on the way.
  • Smoke: the shooter or the target is in smoke, or the bullet's line crossed smoke.
  • Blind: the shooter has the blindness effect (flash).
  • Noscope: a sniper rifle fired without opening the scope.
  • Airborne: the shooter isn't on the ground, climbing or in water.
  • Burn: the damage came from a molotov or incendiary grenade.

05Friendly fire and the fire lock

In competitive mode, bullet damage to a teammate is multiplied by 0.33, CS2's ff_damage_reduction_bullets value. During buy time and when a round or match ends, shooting, knifing and throwing grenades are locked.

—End of notewritten by MUHAMMEDPYZ