Skip to content

Commit 748246c

Browse files
abramcumnerXottab-DUTY
authored andcommitted
Bind wallmark life time on dynamic objects to r__wallmark_ttl
Increased max wallmark lifetime to 10 minutes
1 parent d711d59 commit 748246c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Layers/xrRender/SkeletonCustom.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,6 @@ void CKinematics::AddWallmark(
726726
wallmarks.push_back(wm);
727727
}
728728

729-
static const float LIFE_TIME = 30.f;
730729
struct zero_wm_pred : public std::unary_function<intrusive_ptr<CSkeletonWallmark>, bool>
731730
{
732731
bool operator()(const intrusive_ptr<CSkeletonWallmark> x) { return x == nullptr; }
@@ -741,7 +740,7 @@ void CKinematics::CalculateWallmarks()
741740
for (auto it = wallmarks.begin(); it != wallmarks.end(); it++)
742741
{
743742
intrusive_ptr<CSkeletonWallmark>& wm = *it;
744-
float w = (RDEVICE.fTimeGlobal - wm->TimeStart()) / LIFE_TIME;
743+
float w = (RDEVICE.fTimeGlobal - wm->TimeStart()) / ps_r__WallmarkTTL;
745744
if (w < 1.f)
746745
{
747746
// append wm to WallmarkEngine
@@ -777,7 +776,7 @@ void CKinematics::RenderWallmark(intrusive_ptr<CSkeletonWallmark> wm, FVF::LIT*&
777776
for (u32 f_idx = 0; f_idx < wm->m_Faces.size(); f_idx++)
778777
{
779778
CSkeletonWallmark::WMFace F = wm->m_Faces[f_idx];
780-
float w = (RDEVICE.fTimeGlobal - wm->TimeStart()) / LIFE_TIME;
779+
float w = (RDEVICE.fTimeGlobal - wm->TimeStart()) / ps_r__WallmarkTTL;
781780
for (u32 k = 0; k < 3; k++)
782781
{
783782
Fvector P;

src/Layers/xrRender/xrRender_console.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ void xrRender_initconsole()
677677
CMD4(CCC_Float, "r__wallmark_shift_v", &ps_r__WallmarkSHIFT_V, 0.0f, 1.f);
678678
CMD1(CCC_ModelPoolStat, "stat_models");
679679
#endif // DEBUG
680-
CMD4(CCC_Float, "r__wallmark_ttl", &ps_r__WallmarkTTL, 1.0f, 5.f * 60.f);
680+
CMD4(CCC_Float, "r__wallmark_ttl", &ps_r__WallmarkTTL, 1.0f, 10.f * 60.f);
681681

682682
CMD4(CCC_Integer, "r__supersample", &ps_r__Supersample, 1, 8);
683683

0 commit comments

Comments
 (0)