mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
- cap the frame rate of RRRA's cactus drug mode.
This was running at full render speed.
This commit is contained in:
parent
d8e331ef0f
commit
977223287e
1 changed files with 11 additions and 5 deletions
|
@ -309,13 +309,17 @@ void animatecamsprite(double smoothratio)
|
||||||
// RRRA's drug distortion effect
|
// RRRA's drug distortion effect
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
int DrugTimer;
|
||||||
|
|
||||||
void setdrugmode(player_struct *p, int oyrepeat)
|
void setdrugmode(player_struct *p, int oyrepeat)
|
||||||
{
|
{
|
||||||
if (playrunning())
|
int now = I_GetBuildTime() >> 1; // this function works on a 60 fps setup.
|
||||||
|
if (playrunning() && p->DrugMode > 0)
|
||||||
{
|
{
|
||||||
if (p->DrugMode > 0)
|
if (now - DrugTimer > 4 || now - DrugTimer < 0) DrugTimer = now - 1;
|
||||||
|
while (DrugTimer < now)
|
||||||
{
|
{
|
||||||
|
DrugTimer++;
|
||||||
int var_8c;
|
int var_8c;
|
||||||
if (p->drug_stat[0] == 0)
|
if (p->drug_stat[0] == 0)
|
||||||
{
|
{
|
||||||
|
@ -376,6 +380,7 @@ void setdrugmode(player_struct *p, int oyrepeat)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else DrugTimer = now;
|
||||||
if (p->DrugMode > 0)
|
if (p->DrugMode > 0)
|
||||||
{
|
{
|
||||||
renderSetAspect(p->drug_aspect, yxaspect);
|
renderSetAspect(p->drug_aspect, yxaspect);
|
||||||
|
@ -501,9 +506,6 @@ void displayrooms(int snum, double smoothratio)
|
||||||
setgamepalette(BASEPAL);
|
setgamepalette(BASEPAL);
|
||||||
animatecamsprite(smoothratio);
|
animatecamsprite(smoothratio);
|
||||||
|
|
||||||
// The camera texture must be rendered with the base palette, so this is the only place where the current global palette can be set.
|
|
||||||
// The setting here will be carried over to the rendering of the weapon sprites, but other 2D content will always default to the main palette.
|
|
||||||
setgamepalette(setpal(p));
|
|
||||||
if (ud.cameraactor)
|
if (ud.cameraactor)
|
||||||
{
|
{
|
||||||
spritetype* s;
|
spritetype* s;
|
||||||
|
@ -537,6 +539,10 @@ void displayrooms(int snum, double smoothratio)
|
||||||
setdrugmode(p, i);
|
setdrugmode(p, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The camera texture must be rendered with the base palette, so this is the only place where the current global palette can be set.
|
||||||
|
// The setting here will be carried over to the rendering of the weapon sprites, but other 2D content will always default to the main palette.
|
||||||
|
setgamepalette(setpal(p));
|
||||||
|
|
||||||
// set screen rotation.
|
// set screen rotation.
|
||||||
rotscrnang = !cl_syncinput ? p->angle.rotscrnang : p->angle.interpolatedrotscrn(smoothratio);
|
rotscrnang = !cl_syncinput ? p->angle.rotscrnang : p->angle.interpolatedrotscrn(smoothratio);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue