mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- added a user-settable factor for earthquake intensity. Value can be between 0 (no shaking) and 1 (normal shaking.)
This commit is contained in:
parent
b9c032461e
commit
cbed4624fa
2 changed files with 10 additions and 4 deletions
|
@ -89,6 +89,11 @@ CVAR (Bool, r_deathcamera, false, CVAR_ARCHIVE)
|
|||
CVAR (Int, r_clearbuffer, 0, 0)
|
||||
CVAR (Bool, r_drawvoxels, true, 0)
|
||||
CVAR (Bool, r_drawplayersprites, true, 0) // [RH] Draw player sprites?
|
||||
CUSTOM_CVAR(Float, r_quakeintensity, 1.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
{
|
||||
if (self < 0.f) self = 0.f;
|
||||
else if (self > 1.f) self = 1.f;
|
||||
}
|
||||
|
||||
DCanvas *RenderTarget; // [RH] canvas to render to
|
||||
|
||||
|
@ -837,10 +842,10 @@ void R_SetupFrame (AActor *actor)
|
|||
int intensity = DEarthquake::StaticGetQuakeIntensity (camera);
|
||||
if (intensity != 0)
|
||||
{
|
||||
viewx += ((pr_torchflicker() % (intensity<<2))
|
||||
-(intensity<<1))<<FRACBITS;
|
||||
viewy += ((pr_torchflicker() % (intensity<<2))
|
||||
-(intensity<<1))<<FRACBITS;
|
||||
fixed_t quakefactor = FLOAT2FIXED(r_quakeintensity);
|
||||
|
||||
viewx += quakefactor * ((pr_torchflicker() % (intensity<<2)) - (intensity<<1));
|
||||
viewy += quakefactor * ((pr_torchflicker() % (intensity<<2)) - (intensity<<1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -686,6 +686,7 @@ OptionMenu "VideoOptions"
|
|||
Option "Show player sprites", "r_drawplayersprites", "OnOff"
|
||||
Option "Death camera", "r_deathcamera", "OnOff"
|
||||
Option "Teleporter zoom", "telezoom", "OnOff"
|
||||
Slider "Earthquake shake intensity", "r_quakeintensity", 0.0, 1.0, 0.05, 2
|
||||
Option "Interpolate monster movement", "nomonsterinterpolation", "NoYes"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue