diff --git a/src/gs-entbase/server/func_conveyor.qc b/src/gs-entbase/server/func_conveyor.qc index 378611cc..d7fbbe9b 100644 --- a/src/gs-entbase/server/func_conveyor.qc +++ b/src/gs-entbase/server/func_conveyor.qc @@ -36,6 +36,8 @@ class func_conveyor:NSRenderableEntity void(void) func_conveyor; + virtual void(float) Save; + virtual void(string,string) Restore; virtual void(void) Respawn; virtual void(entity, int) Trigger; virtual void(void) touch; @@ -43,6 +45,29 @@ class func_conveyor:NSRenderableEntity virtual void(entity, string, string) Input; }; +void +func_conveyor::Save(float handle) +{ + SaveFloat(handle, "m_flSpeed", m_flSpeed); + SaveVector(handle, "m_vecMoveDir", m_vecMoveDir); + super::Save(handle); +} + +void +func_conveyor::Restore(string strKey, string strValue) +{ + switch (strKey) { + case "m_flSpeed": + m_flSpeed = ReadFloat(strValue); + break; + case "m_vecMoveDir": + m_vecMoveDir = ReadVector(strValue); + break; + default: + super::Restore(strKey, strValue); + } +} + void func_conveyor::SetMovementDirection(void) { @@ -79,7 +104,7 @@ func_conveyor::Respawn(void) SetMovementDirection(); SetModel(GetSpawnModel()); SetMovetype(MOVETYPE_NONE); - SetSolid(SOLID_BSPTRIGGER); + SetSolid(SOLID_BSP); /* TODO: Apply some effect flag the engine handles? */ if (!(spawnflags & SF_CONVEYOR_VISUAL)) {