File tree Expand file tree Collapse file tree 4 files changed +25
-1
lines changed Expand file tree Collapse file tree 4 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -838,6 +838,8 @@ class CScriptGameObject
838838 void IterateFeelTouch (luabind::functor<void > functor);
839839 u32 GetSpatialType ();
840840 void SetSpatialType (u32 sptype);
841+ u8 GetRestrictionType ();
842+ void SetRestrictionType (u8 type);
841843
842844 // Weapon
843845 void Weapon_AddonAttach (CScriptGameObject* item);
Original file line number Diff line number Diff line change @@ -1534,5 +1534,25 @@ u32 CScriptGameObject::GetSpatialType()
15341534{
15351535 return object ().spatial .type ;
15361536}
1537+
1538+ u8 CScriptGameObject::GetRestrictionType ()
1539+ {
1540+ CSpaceRestrictor* restr = smart_cast<CSpaceRestrictor*>(&object ());
1541+ if (restr)
1542+ return restr->m_space_restrictor_type ;
1543+
1544+ return -1 ;
1545+ }
1546+
1547+ void CScriptGameObject::SetRestrictionType (u8 type)
1548+ {
1549+ CSpaceRestrictor* restr = smart_cast<CSpaceRestrictor*>(&object ());
1550+ if (restr)
1551+ {
1552+ restr->m_space_restrictor_type = type;
1553+ if (type != RestrictionSpace::eRestrictorTypeNone)
1554+ Level ().space_restriction_manager ().register_restrictor (restr, RestrictionSpace::ERestrictorTypes (type));
1555+ }
1556+ }
15371557#endif
15381558// -Alundaio
Original file line number Diff line number Diff line change @@ -247,6 +247,8 @@ class_<CScriptGameObject>& script_register_game_object2(class_<CScriptGameObject
247247 .enum_ (" CLSIDS" )[value (" no_pda_msg" , int (ePdaMsgMax))]
248248
249249 // CustomZone
250+ .def (" set_restrictor_type" , &CScriptGameObject::SetRestrictionType)
251+ .def (" get_restrictor_type" , &CScriptGameObject::GetRestrictionType)
250252 .def (" enable_anomaly" , &CScriptGameObject::EnableAnomaly)
251253 .def (" disable_anomaly" , &CScriptGameObject::DisableAnomaly)
252254 .def (" get_anomaly_power" , &CScriptGameObject::GetAnomalyPower)
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class CSpaceRestrictor : public CGameObject
4141 mutable Fsphere m_selfbounds;
4242 mutable bool m_actuality;
4343
44- private :
44+ public :
4545 u8 m_space_restrictor_type;
4646
4747private:
You can’t perform that action at this time.
0 commit comments