Remove ftebug_checkpvs(), undefined behaviour was causing things to pop
in and out of existence. There was no fault with FTE's implementation after all. Change func_dustmotes, prop_rope and env_glow to querying player pos more reliably.
This commit is contained in:
parent
2e8bb7e23c
commit
883a64b744
4 changed files with 16 additions and 16 deletions
|
@ -168,8 +168,8 @@ env_glow::env_glow(void)
|
|||
m_vecColor = [1,1,1];
|
||||
drawmask = MASK_ENGINE;
|
||||
setsize(this, [0,0,0], [0,0,0]);
|
||||
setorigin(this, origin);
|
||||
effects &= ~EF_NOSHADOW;
|
||||
Init();
|
||||
RendererRestarted();
|
||||
setorigin(this, origin);
|
||||
}
|
||||
|
|
|
@ -38,10 +38,16 @@ class func_dustmotes:CBaseEntity
|
|||
float
|
||||
func_dustmotes::predraw(void)
|
||||
{
|
||||
if (m_flNexTime > cltime)
|
||||
vector vecPlayer;
|
||||
|
||||
int s = (float)getproperty(VF_ACTIVESEAT);
|
||||
pSeat = &g_seats[s];
|
||||
vecPlayer = pSeat->m_vecPredictedOrigin;
|
||||
|
||||
if (checkpvs(vecPlayer, this) == FALSE)
|
||||
return (PREDRAW_NEXT);
|
||||
|
||||
if (checkpvs(getproperty(VF_ORIGIN), this) == FALSE)
|
||||
if (m_flNexTime > cltime)
|
||||
return (PREDRAW_NEXT);
|
||||
|
||||
for (int i = 0; i < m_iCount; i++) {
|
||||
|
|
|
@ -115,11 +115,16 @@ prop_rope::predraw(void)
|
|||
float travel;
|
||||
float segments;
|
||||
float sc;
|
||||
vector vecPlayer;
|
||||
|
||||
entity x = find(world, ::targetname, target);
|
||||
|
||||
if (checkpvs(getproperty(VF_ORIGIN), this) == FALSE) {
|
||||
if (checkpvs(getproperty(VF_ORIGIN), x) == FALSE) {
|
||||
int s = (float)getproperty(VF_ACTIVESEAT);
|
||||
pSeat = &g_seats[s];
|
||||
vecPlayer = pSeat->m_vecPredictedOrigin;
|
||||
|
||||
if (checkpvs(vecPlayer, this) == FALSE) {
|
||||
if (checkpvs(vecPlayer, x) == FALSE) {
|
||||
return (PREDRAW_NEXT);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,17 +107,6 @@ precache_model(string m)
|
|||
return prior(m);
|
||||
}
|
||||
|
||||
/* fun little hack for us engine bug lovers */
|
||||
var int autocvar_ftebug_checkpvs = 1;
|
||||
__wrap float
|
||||
checkpvs(vector viewpos, entity ent)
|
||||
{
|
||||
if (autocvar_ftebug_checkpvs)
|
||||
return 1;
|
||||
else
|
||||
return prior(viewpos, ent);
|
||||
}
|
||||
|
||||
__wrap void
|
||||
setmodel(entity ent, string mname)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue