mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-23 12:04:38 -04:00
parent
60d9deae96
commit
bf163d8f3e
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "doomtype.h"
|
#include "doomtype.h"
|
||||||
|
#include "hu_crosshair.h"
|
||||||
#include "i_printf.h"
|
#include "i_printf.h"
|
||||||
#include "i_video.h"
|
#include "i_video.h"
|
||||||
#include "info.h"
|
#include "info.h"
|
||||||
@ -707,6 +708,18 @@ boolean VX_ProjectVoxel (mobj_t * thing)
|
|||||||
vis->brightmap = R_BrightmapForSprite(thing->sprite);
|
vis->brightmap = R_BrightmapForSprite(thing->sprite);
|
||||||
vis->color = thing->bloodcolor;
|
vis->color = thing->bloodcolor;
|
||||||
|
|
||||||
|
// [Alaux] Lock crosshair on target
|
||||||
|
if (STRICTMODE(hud_crosshair_lockon) && thing == crosshair_target)
|
||||||
|
{
|
||||||
|
HU_UpdateCrosshairLock
|
||||||
|
(
|
||||||
|
BETWEEN(0, viewwidth - 1, (centerxfrac + FixedMul(tx, xscale)) >> FRACBITS),
|
||||||
|
BETWEEN(0, viewheight - 1, (centeryfrac + FixedMul(viewz - gz - crosshair_target->actualheight/2, xscale)) >> FRACBITS)
|
||||||
|
);
|
||||||
|
|
||||||
|
crosshair_target = NULL; // Don't update it again until next tic
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user