Infection is a mechanic which was cut from the final game, but it was never fully removed from the game.
The mechanic is quite similar to sanity from TDD. It is a meter which fills up in certain circumstances and plays visual and sound effects, which depend on the meter's value.
Currently the only known way of raising the infection meter is the infection areas. There are multiple of them placed in the game, but they all have been deactivated (which means that they can be restored).
There are 4 levels of infection, all of which play increasingly noticeable effects. The first level is when the player has infection above zero. After reaching level 3, the player can't run, and at level 4 their movement speed is cut in half.
The meter goes down automatically after the player leaves the infected area. It will gradually fall to zero, unless the player has gathered above 80 infection; in that case, they will die even if the meter goes down to level 3. Interestingly, above 75 the infection stops to fall, which leaves a tight margin of 5 infection points which won't kill the player but will not decrease.
Currently the only way to view the meter (aside from the audiovisual effects) is to press F1 in debug mode and turn on player info.
According to this fragment of game.cfg, the infection system was a slightly modified version of the sanity mechanic.
<Infection EventsFile = "misc/main_sanity_events.cfg" MinTimeBetweenEvents = "300" MaxEventSanity = "65" MaxSanity_LongWait = "65" MaxSanity_MedWait = "45" MaxSanity_ShortWait = "25" TimeBetween_LongWait = "270" TimeBetween_MedWait = "180" TimeBetween_ShortWait = "80" MinExamineInfection = "50" InfectionArea_CheckTimeMin = "1" InfectionArea_CheckTimeMax = "2" />
However, in the game it uses a separate meter (which is visible via the aforementioned debug menu method).
The mentioned sanity events config file contains exactly the same data as TDD, which means that it wasn't used in the end.
Interestingly, infection was supposed to fall near creatures:
NearEnemyDecrease = "0.3" NearCritterDecrease = "0.1"
However, this seems to have no effect. Being near either of those doesn't seem to lower the infection meter.
The lantern might have shone brighter, too:
LightLampMinInfectionIncrease = "0.1" LightLampMaxInfectionIncrease = "5"
Pigman enemies have unused vomit animations and unused entity parameters, such as:
These seem to indicate that the pig enemies would have to run away from the player and would attack them with vomit in the process, possibly increasing their infection meter. It is also further evidenced by this part of the game.cfg:
<Player_Infection HitZoomInSpeed = "3.5" HitZoomOutSpeed = "0.6" HitZoomInFOVMul = "0.06" HitZoomInAspectMul = "0.15"
A particle effect called pig_attack_vomit was also left in the game.
When the infection is used in-game by enabling the infection areas, some errors get printed to the log:
ERROR: Could not load sound 'infection_loop_1' ERROR: Can't find sound 'infection_loop_1'! ERROR: Couldn't create SoundEntity 'infection_drain_high.snt' ERROR: Couldn't create SoundEntity 'infection_heartbeat.snt' WARNING: Could not find language file entry 'InfectionHigh' ERROR: Couldn't create SoundEntity 'infection_pant.snt'
This indicates that some ofthe sound files are missing. They don't have the recording files either.
Furthermore, the game displays an empty hint when player reaches level 4 of infection. It's lang file name is “InfectionHigh”, which means that it can be remade. It is unknown if hints for other infection levels exist.