HALF-LIFE , SPEEDRUNNING

Hornet punching

The hornet gun can be used to fire hornets that punch through walls. To do this, fire at least two hornets in primary mode roughly perpendicularly at a wall. Occasionally, some of the fired hornets will magically punch through the wall and dart forward on the other side.

This is probably not very useful in most runs, because if the intention is to damage something at the opposite side of a wall, the Gauss is likely to be more useful. However, Gauss punching works very differently from hornet punching. A Gauss beam does not pierce through a wall and emerge as an intact beam on the other side. Instead, what emerges on the other side is an explosion, which, of course, has a limited range. I imagine hornet punching to be more useful if you need to damage something some distance away on the other side of the wall.

Hornet punching is possible likely because the origin of a hornet is displaced by four units in a direction dependent on its velocity when collided with another entity. The relevant code is in CHornet::TrackTouch:

// hit something we don't want to hurt, so turn around.

pev->velocity = pev->velocity.Normalize();

pev->velocity.x *= -1;
pev->velocity.y *= -1;

pev->origin = pev->origin + pev->velocity * 4; // bounce the hornet off a bit.
pev->velocity = pev->velocity * m_flFlySpeed;

Investigations into the exact movements of the hornets are challenging due to their size and haphazard movements. At the time of writing, I have not been able to visualise what exactly went down when a hornet successfully punches through a wall. Nevertheless, I can outline some of the research techniques here.

We first need to understand that the weapon fires two types of hornets, a red hornet and an orange hornet. The red hornet has a degree of indeterminism in its movements and has a lower flying speed, while the orange hornet is, perhaps surprisingly, fully deterministic and has a higher flying speed. Whether a red or an orange hornet is fired itself is random. When researching the behaviours of hornets, it is best to fire only orange hornets to ensure reproducibility.

It is also important to reproduce an experiment with a fixed and stable frame rate. I found that I was more successful in reproducing hornet punching at lower frame rates, with 100 fps being my preferred frame rate for investigations. This may be achieved with host_framerate 0.01 and hli_min_frametime 0.01 using my HLInspect mod. Then, we must log the velocities and positions of each hornet in each physics frame. I had to hook the SV_Frame function in hw.dll to accomplish this. What is left to do is to analyse the logs.