diff options
author | aap <aap@papnet.eu> | 2021-02-18 12:21:47 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2021-02-18 12:21:47 +0100 |
commit | 9db87fc6365ee76f3281ca2474f92ec4f155920d (patch) | |
tree | 1b60c229e7ac6212d1d96025d32473c9ec9f6eef /src/weapons/WeaponEffects.cpp | |
parent | update librw (diff) | |
download | re3-9db87fc6365ee76f3281ca2474f92ec4f155920d.tar re3-9db87fc6365ee76f3281ca2474f92ec4f155920d.tar.gz re3-9db87fc6365ee76f3281ca2474f92ec4f155920d.tar.bz2 re3-9db87fc6365ee76f3281ca2474f92ec4f155920d.tar.lz re3-9db87fc6365ee76f3281ca2474f92ec4f155920d.tar.xz re3-9db87fc6365ee76f3281ca2474f92ec4f155920d.tar.zst re3-9db87fc6365ee76f3281ca2474f92ec4f155920d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/weapons/WeaponEffects.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/weapons/WeaponEffects.cpp b/src/weapons/WeaponEffects.cpp index 214ae9c7..32e55fb1 100644 --- a/src/weapons/WeaponEffects.cpp +++ b/src/weapons/WeaponEffects.cpp @@ -1,5 +1,6 @@ #include "common.h" +#include "main.h" #include "WeaponEffects.h" #include "TxdStore.h" #include "Sprite.h" @@ -84,11 +85,15 @@ CWeaponEffects::Render(void) float w, h; if ( CSprite::CalcScreenCoors(gCrossHair.m_vecPos, &pos, &w, &h, true) ) { + PUSH_RENDERGROUP("CWeaponEffects::Render"); + float recipz = 1.0f / pos.z; CSprite::RenderOneXLUSprite(pos.x, pos.y, pos.z, gCrossHair.m_fSize * w, gCrossHair.m_fSize * h, gCrossHair.m_nRed, gCrossHair.m_nGreen, gCrossHair.m_nBlue, 255, recipz, 255); + + POP_RENDERGROUP(); } RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)FALSE); |