From: TimePath Date: Wed, 4 Nov 2015 09:44:10 +0000 (+1100) Subject: Net: allow overriding CSQCPLAYER_FORCE_UPDATES X-Git-Tag: xonotic-v0.8.2~1724 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=beb44fb5e5add14d6d8c28fa8fe382167939ae26;p=xonotic%2Fxonotic-data.pk3dir.git Net: allow overriding CSQCPLAYER_FORCE_UPDATES --- diff --git a/qcsrc/common/csqcmodel_settings.qh b/qcsrc/common/csqcmodel_settings.qh index eacc1947e..29a0bf44a 100644 --- a/qcsrc/common/csqcmodel_settings.qh +++ b/qcsrc/common/csqcmodel_settings.qh @@ -76,7 +76,9 @@ CSQCPlayer_SetViewLocation(); // force updates of player entities that often even if unchanged +#ifndef CSQCPLAYER_FORCE_UPDATES #define CSQCPLAYER_FORCE_UPDATES 0.25 +#endif // mod must define: //vector PL_MIN = ...; diff --git a/qcsrc/lib/csqcmodel/sv_model.qc b/qcsrc/lib/csqcmodel/sv_model.qc index 012149887..cadb77467 100644 --- a/qcsrc/lib/csqcmodel/sv_model.qc +++ b/qcsrc/lib/csqcmodel/sv_model.qc @@ -61,7 +61,7 @@ bool CSQCModel_Send(entity to, int sf) return true; } -#ifdef CSQCPLAYER_FORCE_UPDATES +#if CSQCPLAYER_FORCE_UPDATES .float csqcmodel_nextforcedupdate; #endif void CSQCModel_CheckUpdate(entity e) @@ -75,7 +75,7 @@ void CSQCModel_CheckUpdate(entity e) unused_float = islocalplayer; unused_float = isnolocalplayer; -#ifdef CSQCPLAYER_FORCE_UPDATES +#if CSQCPLAYER_FORCE_UPDATES if(isplayer && time > e.csqcmodel_nextforcedupdate) { e.SendFlags |= CSQCMODEL_PROPERTY_ORIGIN;