NSTrigger: Make sure SpawnKey sets 'target' on the client progs too.

prop_rope: Fix the ropes not looking towards the right direction.
This commit is contained in:
Marco Cawthorne 2021-10-23 12:40:35 +02:00
parent f5a8ec8ef3
commit 090edf53ff
Signed by: eukara
GPG Key ID: C196CD8BA993248A
3 changed files with 8 additions and 5 deletions

View File

@ -166,6 +166,7 @@ prop_rope::predraw(void)
vector lit2 = /*[0.1,0.1,0.1] */ getlight(pos2) / 255;
makevectors(getproperty(VF_CL_VIEWANGLES));
setproperty(VF_ORIGIN, vecPlayer);
R_BeginPolygon(m_strShader, 0, 0);
R_PolygonVertex(pos1, [0,0], lit1, 1.0f);
R_PolygonVertex(pos2, [0,1], lit2, 1.0f);
@ -195,10 +196,11 @@ prop_rope::predraw(void)
#ifndef ROPE_RIBBON
draw_segment(pos1, pos2, 0);
#else
vector lit1 = /*[0.1,0.1,0.1] */ getlight(pos1) / 255;
vector lit2 = /*[0.1,0.1,0.1] */ getlight(pos2) / 255;
vector lit1 = getlight(pos1) / 255;
vector lit2 = getlight(pos2) / 255;
makevectors(getproperty(VF_CL_VIEWANGLES));
setproperty(VF_ORIGIN, vecPlayer);
R_BeginPolygon(m_strShader, 0, 0);
R_PolygonVertex(pos1, [0,0], lit1, 1.0f);
R_PolygonVertex(pos2, [0,1], lit2, 1.0f);

View File

@ -47,11 +47,10 @@ class NSTrigger:NSIO
virtual int(void) GetMaster;
/* overrides */
virtual void(string, string) SpawnKey;
virtual void(float) Save;
virtual void(string,string) Restore;
#endif
virtual void(string, string) SpawnKey;
};
enum

View File

@ -141,6 +141,7 @@ NSTrigger::Restore(string strKey, string strValue)
super::Restore(strKey, strValue);
}
}
#endif
void
NSTrigger::SpawnKey(string strKey, string strValue)
@ -149,6 +150,7 @@ NSTrigger::SpawnKey(string strKey, string strValue)
case "target":
target = strValue;
break;
#ifdef SERVER
case "killtarget":
m_strKillTarget = strValue;
break;
@ -164,12 +166,12 @@ NSTrigger::SpawnKey(string strKey, string strValue)
case "delay":
m_flDelay = stof(strValue);
break;
#endif
default:
NSIO::SpawnKey(strKey, strValue);
break;
}
}
#endif
void
NSTrigger::NSTrigger(void)