File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -835,6 +835,9 @@ class CScriptGameObject
835835 void StartTrade (CScriptGameObject* obj);
836836 void StartUpgrade (CScriptGameObject* obj);
837837 void SetWeight (float w);
838+ void IterateFeelTouch (luabind::functor<void > functor);
839+ u32 GetSpatialType ();
840+ void SetSpatialType (u32 sptype);
838841
839842 // Weapon
840843 void Weapon_AddonAttach (CScriptGameObject* item);
Original file line number Diff line number Diff line change 4646#include " CharacterPhysicsSupport.h"
4747#include " player_hud.h"
4848#include " eatable_item.h"
49+ #include " script_callback_ex.h"
50+ #include " xrEngine/feel_touch.h"
4951#endif
5052// -Alundaio
5153
@@ -1507,5 +1509,30 @@ u8 CScriptGameObject::GetMaxUses()
15071509
15081510 return eItm->GetMaxUses ();
15091511}
1512+
1513+ void CScriptGameObject::IterateFeelTouch (luabind::functor<void > functor)
1514+ {
1515+ Feel::Touch* touch = smart_cast<Feel::Touch*>(&object ());
1516+ if (touch)
1517+ {
1518+ for (const auto & game_object : touch->feel_touch )
1519+ {
1520+ // Xottab_DUTY: Do we need this cast from IGameObject* to IGameObject* ?
1521+ IGameObject* o = smart_cast<IGameObject*>(game_object);
1522+ if (o)
1523+ functor (game_object->ID ());
1524+ }
1525+ }
1526+ }
1527+
1528+ void CScriptGameObject::SetSpatialType (u32 sptype)
1529+ {
1530+ object ().spatial .type = sptype;
1531+ }
1532+
1533+ u32 CScriptGameObject::GetSpatialType ()
1534+ {
1535+ return object ().spatial .type ;
1536+ }
15101537#endif
15111538// -Alundaio
Original file line number Diff line number Diff line change @@ -361,12 +361,15 @@ class_<CScriptGameObject>& script_register_game_object2(class_<CScriptGameObject
361361 .def (" get_attached_vehicle" , &CScriptGameObject::GetAttachedVehicle)
362362
363363#ifdef GAME_OBJECT_EXTENDED_EXPORTS
364+ .def (" iterate_feel_touch" , &CScriptGameObject::IterateFeelTouch)
364365 .def (" get_luminocity_hemi" , &CScriptGameObject::GetLuminocityHemi)
365366 .def (" get_luminocity" , &CScriptGameObject::GetLuminocity)
366367 .def (" bone_visible" , &CScriptGameObject::IsBoneVisible)
367368 .def (" set_bone_visible" , &CScriptGameObject::SetBoneVisible)
368369 .def (" set_health_ex" , &CScriptGameObject::SetHealthEx) // AVO
369370 .def (" force_set_position" , &CScriptGameObject::ForceSetPosition)
371+ .def (" set_spatial_type" , &CScriptGameObject::SetSpatialType)
372+ .def (" get_spatial_type" , &CScriptGameObject::GetSpatialType)
370373
371374 // For Weapons
372375 .def (" weapon_addon_attach" , &CScriptGameObject::Weapon_AddonAttach)
You can’t perform that action at this time.
0 commit comments