NSPointTrigger: Save/Restore for the debug texture.

This commit is contained in:
Marco Cawthorne 2024-03-06 19:13:48 -08:00
parent 3d32e75e88
commit dcb87039b1
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
3 changed files with 27 additions and 0 deletions

View File

@ -119,6 +119,8 @@ infodecal::Spawned(void)
void
infodecal::Respawn(void)
{
InitPointTrigger();
/* this will be invisible by default */
if (!targetname) {
#if 0

View File

@ -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

View File

@ -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