- Changed the earthquake view shaking so that it works for anything and not
just players. SVN r235 (trunk)
This commit is contained in:
parent
207c84e3dd
commit
0398ddcc76
8 changed files with 144 additions and 62 deletions
|
|
@ -45,6 +45,7 @@
|
|||
#include "i_video.h"
|
||||
#include "i_system.h"
|
||||
#include "vectors.h"
|
||||
#include "a_sharedglobal.h"
|
||||
|
||||
// MACROS ------------------------------------------------------------------
|
||||
|
||||
|
|
@ -1082,13 +1083,16 @@ void R_SetupFrame (AActor *actor)
|
|||
viewz = theZ;
|
||||
}
|
||||
|
||||
if (player && player->xviewshift && !paused)
|
||||
if (!paused)
|
||||
{
|
||||
int intensity = player->xviewshift;
|
||||
viewx += ((pr_torchflicker() % (intensity<<2))
|
||||
-(intensity<<1))<<FRACBITS;
|
||||
viewy += ((pr_torchflicker() % (intensity<<2))
|
||||
-(intensity<<1))<<FRACBITS;
|
||||
int intensity = DEarthquake::StaticGetQuakeIntensity (camera);
|
||||
if (intensity != 0)
|
||||
{
|
||||
viewx += ((pr_torchflicker() % (intensity<<2))
|
||||
-(intensity<<1))<<FRACBITS;
|
||||
viewy += ((pr_torchflicker() % (intensity<<2))
|
||||
-(intensity<<1))<<FRACBITS;
|
||||
}
|
||||
}
|
||||
|
||||
extralight = camera->player ? camera->player->extralight : 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue