NSPointTrigger: Save/Restore for the debug texture.
This commit is contained in:
parent
3d32e75e88
commit
dcb87039b1
3 changed files with 27 additions and 0 deletions
|
@ -119,6 +119,8 @@ infodecal::Spawned(void)
|
|||
void
|
||||
infodecal::Respawn(void)
|
||||
{
|
||||
InitPointTrigger();
|
||||
|
||||
/* this will be invisible by default */
|
||||
if (!targetname) {
|
||||
#if 0
|
||||
|
|
|
@ -33,6 +33,9 @@ public:
|
|||
nonvirtual void InitPointTrigger(void);
|
||||
|
||||
#ifdef SERVER
|
||||
virtual void Save(float);
|
||||
virtual void Restore(string, string);
|
||||
|
||||
private:
|
||||
string m_strDebugTexture;
|
||||
#endif
|
||||
|
|
|
@ -52,3 +52,25 @@ NSPointTrigger::DebugDraw(void)
|
|||
R_EndPolygon();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef SERVER
|
||||
void
|
||||
NSPointTrigger::Save(float handle)
|
||||
{
|
||||
super::Save(handle);
|
||||
SaveString(handle, "m_strDebugTexture", m_strDebugTexture);
|
||||
}
|
||||
|
||||
void
|
||||
NSPointTrigger::Restore(string strKey, string strValue)
|
||||
{
|
||||
switch (strKey) {
|
||||
case "m_strDebugTexture":
|
||||
m_strDebugTexture = ReadString(strValue);
|
||||
break;
|
||||
default:
|
||||
super::Restore(strKey, strValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue