- Make floatbobbing a purely cosmetic effect that does not alter an actor's real position in the world.
SVN r3744 (trunk)
This commit is contained in:
parent
154e83331d
commit
5e2b4bddda
4 changed files with 16 additions and 53 deletions
|
|
@ -61,6 +61,7 @@
|
|||
#include "r_data/r_translate.h"
|
||||
#include "r_data/colormaps.h"
|
||||
#include "r_data/voxels.h"
|
||||
#include "p_local.h"
|
||||
|
||||
// [RH] A c-buffer. Used for keeping track of offscreen voxel spans.
|
||||
|
||||
|
|
@ -513,6 +514,12 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
fy = thing->PrevY + FixedMul (r_TicFrac, thing->y - thing->PrevY);
|
||||
fz = thing->PrevZ + FixedMul (r_TicFrac, thing->z - thing->PrevZ);
|
||||
|
||||
// [RH] Make floatbobbing a renderer-only effect.
|
||||
if (thing->flags2 & MF2_FLOATBOB)
|
||||
{
|
||||
fz += finesine[(Scale(thing->FloatBobPhase + level.maptime, FINEANGLES, 64) + r_TicFrac * ((FINEANGLES/64) / 1000)) & FINEMASK] * 8;
|
||||
}
|
||||
|
||||
// transform the origin point
|
||||
tr_x = fx - viewx;
|
||||
tr_y = fy - viewy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue