NSTrigger: read 'globalname' key, used for level transitions.
This commit is contained in:
parent
7d37cc228c
commit
f76c169671
3 changed files with 10 additions and 2 deletions
|
@ -830,7 +830,7 @@ void NSEntity::SpawnKey( string strKey, string strValue ) {
|
|||
break;
|
||||
#endif
|
||||
default:
|
||||
NSTrigger::SpawnKey( strKey, strValue );
|
||||
super::SpawnKey( strKey, strValue );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,6 +143,7 @@ private:
|
|||
#ifdef SERVER
|
||||
string m_oldstrTarget; /* needed due to trigger_changetarget */
|
||||
|
||||
string m_strGlobalName;
|
||||
string m_strGlobalState;
|
||||
string m_strKillTarget;
|
||||
string m_strMessage;
|
||||
|
|
|
@ -227,6 +227,7 @@ NSTrigger::Save(float handle)
|
|||
SaveFloat(handle, "team", team);
|
||||
SaveInt(handle, "m_iValue", m_iValue);
|
||||
SaveFloat(handle, "m_flDelay", m_flDelay);
|
||||
SaveString(handle, "m_strGlobalName", m_strGlobalName);
|
||||
}
|
||||
void
|
||||
NSTrigger::Restore(string strKey, string strValue)
|
||||
|
@ -259,6 +260,9 @@ NSTrigger::Restore(string strKey, string strValue)
|
|||
case "m_flDelay":
|
||||
m_flDelay = ReadFloat(strValue);
|
||||
break;
|
||||
case "m_strGlobalName":
|
||||
m_strGlobalName = ReadString(strValue);
|
||||
break;
|
||||
default:
|
||||
super::Restore(strKey, strValue);
|
||||
}
|
||||
|
@ -318,9 +322,12 @@ NSTrigger::SpawnKey(string strKey, string strValue)
|
|||
case "globalstate":
|
||||
m_strGlobalState = strValue;
|
||||
break;
|
||||
case "globalname":
|
||||
m_strGlobalName = strValue;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
NSIO::SpawnKey(strKey, strValue);
|
||||
super::SpawnKey(strKey, strValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue