@@ -85,6 +85,11 @@ function actor_binder:net_destroy()
8585 self.object:set_callback(callback.take_item_from_box, nil)
8686 self.object:set_callback(callback.use_object, nil)
8787
88+ ----| aVo |--------------------------------------------------------------------
89+ self.object:set_callback(callback.hit, nil)
90+ --self.object:set_callback(123, nil)
91+ ----| end:aVo |----------------------------------------------------------------
92+
8893 log("--------->"..tostring(_G.amb_vol))
8994 log("--------->"..tostring(_G.mus_vol))
9095 if(_G.amb_vol~=0) then
@@ -118,7 +123,25 @@ function actor_binder:reinit()
118123 self.object:set_callback(callback.task_state, self.task_callback, self)
119124 self.object:set_callback(callback.take_item_from_box, self.take_item_from_box, self)
120125 self.object:set_callback(callback.use_object, self.use_inventory_item, self)
126+
127+ ----| aVo |--------------------------------------------------------------------
128+ self.object:set_callback(callback.hit, self.actor_hit, self)
129+ -- self.object:set_callback(123, self.key_press, self)
130+ ----| end:aVo |----------------------------------------------------------------
131+ end
132+ ---------------------------------------------------------------------------------------------------------------------
133+
134+
135+ ----| aVo |--------------------------------------------------------------------
136+ -- Actor hit callback
137+ function actor_binder:actor_hit(obj, amount, local_direction, who, bone_index)
138+ -- local msg = string.format("actor_hit %f, %i", amount, bone_index)
139+ -- get_console():execute("load ~:"..msg)
121140end
141+ -- x-ray extensions key press callback
142+ --function actor_binder:key_press(key)
143+ --sm:call("key_press", key)
144+ --end
122145----------------------------------------------------------------------------------------------------------------------
123146function actor_binder:take_item_from_box(box, item)
124147 local box_name = box:name()
0 commit comments