From ZDoom Wiki
Jump to navigation Jump to search

Earthquakes are a feature introduced to the Doom engine by Hexen. However, the implementation in ZDoom predates the release of Raven Software's source code, and as a result the earthquake code in ZDoom is completely different from its equivalent in Hexen.

Earthquakes can be created with the following functions:

Earthquakes shake the player's camera. Every tic, they inflict 1d8 damage to actors within their damage radius and thrust them in a random direction with a force equal to half their intensity.

Earthquakes also play a continuous sound as long as they are rumbling. By default, this sound is the one defined in SNDINFO as "world/quake"; however both A_Quake and Radius_Quake2 allow to specify a different sound.

The camera shaking effect is subject to r_quakeintensity.

Earthquakes can be manipulated to shake along the axis relative to the player with A_QuakeEx, can be scaled up and/or down to cause intensifying effects, and can have intensities set on each individual planes for maximum customizability.

Earthquakes can be set to a different type of quake, using sine waves instead of random jittering. These can be controlled further with the use of A_QuakeEx's parameters to adjust the number of waves per second, allowing more realistic quakes to be defined. Unlike the regular quakes, these also operate based on the current in-game tic to preserve the current offset. These quakes are always overridden by the newest wave quake generated after it.