func_pushable: Save/Restore naming fixes

This commit is contained in:
Marco Cawthorne 2023-10-03 10:56:36 -07:00
parent 7d69ab96fc
commit 51f572378f
Signed by: eukara
GPG key ID: CE2032F0A2882A22

View file

@ -39,9 +39,6 @@ This entity was introduced in Half-Life (1998).
class class
func_pushable:func_breakable func_pushable:func_breakable
{ {
entity m_pPuller;
entity m_eCollBox;
public: public:
void func_pushable(void); void func_pushable(void);
@ -53,6 +50,9 @@ public:
virtual void OnPlayerUse(void); virtual void OnPlayerUse(void);
virtual void OnRemoveEntity(void); virtual void OnRemoveEntity(void);
private:
entity m_pPuller;
entity m_eCollBox;
}; };
void void
@ -66,18 +66,18 @@ void
func_pushable::Save(float handle) func_pushable::Save(float handle)
{ {
super::Save(handle); super::Save(handle);
SaveEntity(handle, "puller", m_pPuller); SaveEntity(handle, "m_pPuller", m_pPuller);
SaveEntity(handle, "collbox", m_eCollBox); SaveEntity(handle, "m_eCollBox", m_eCollBox);
} }
void void
func_pushable::Restore(string strKey, string strValue) func_pushable::Restore(string strKey, string strValue)
{ {
switch (strKey) { switch (strKey) {
case "puller": case "m_pPuller":
m_pPuller = ReadEntity(strValue); m_pPuller = ReadEntity(strValue);
break; break;
case "collbox": case "m_eCollBox":
m_eCollBox = ReadEntity(strValue); m_eCollBox = ReadEntity(strValue);
break; break;
default: default: