diff --git a/game.project b/game.project index 1516df7..9b14a9f 100644 --- a/game.project +++ b/game.project @@ -3,7 +3,7 @@ include_dirs = walker [project] title = Kinematic Walker -version = 1.3.1 +version = 1.3.2 dependencies#0 = https://github.com/indiesoftby/defold-pointer-lock/archive/refs/tags/2.0.0.zip dependencies#1 = https://github.com/astrochili/defold-operator/archive/refs/tags/1.5.2.zip dependencies#2 = https://github.com/astrochili/defold-trenchfold/archive/refs/tags/1.6.1.zip diff --git a/walker/body.script b/walker/body.script index 56e955e..16ff1a5 100644 --- a/walker/body.script +++ b/walker/body.script @@ -13,14 +13,14 @@ local hashes = require 'walker.hashes' function on_message(self, message_id, message, sender) if self.walker then - if message_id == hash 'contact_point_response' then + if message_id == hashes.contact_point_response then local message = { point = message, sender = sender} - msg.post(self.walker, hashes.contact_point, message) - elseif message_id == hash 'trigger_response' then + msg.post(self.walker, hashes.contact_point_info, message) + elseif message_id == hashes.trigger_response then local message = { point = message, sender = sender} - msg.post(self.walker, hashes.trigger, message) + msg.post(self.walker, hashes.trigger_info, message) end - elseif message_id == hash 'walker_here' then + elseif message_id == hashes.walker_here then self.walker = sender end end \ No newline at end of file diff --git a/walker/hashes.lua b/walker/hashes.lua index 01d98f1..49c40fe 100644 --- a/walker/hashes.lua +++ b/walker/hashes.lua @@ -9,7 +9,8 @@ local hashes = { acquire_input_focus = hash 'acquire_input_focus', collision_mask = hash 'collision_mask', - contact_point = hash 'contact_point', + contact_point_info = hash 'contact_point_info', + contact_point_response = hash 'contact_point_response', debug = hash 'debug', default = hash 'default', did_init = hash 'did_init', @@ -30,7 +31,8 @@ local hashes = { ray_cast_response = hash 'ray_cast_response', spectator_mode = hash 'spectator_mode', teleport = hash 'teleport', - trigger = hash 'trigger', + trigger_info = hash 'trigger_info', + trigger_response = hash 'trigger_response', unfollow_camera_rotation = hash 'unfollow_camera_rotation', walker_crouching = hash 'walker_crouching', walker_falling = hash 'walker_falling', diff --git a/walker/walker.script b/walker/walker.script index e3485b5..4441c97 100644 --- a/walker/walker.script +++ b/walker/walker.script @@ -833,9 +833,9 @@ end function on_message(self, message_id, message, sender) if message_id == hashes.post_update then post_update(self) - elseif message_id == hashes.contact_point then + elseif message_id == hashes.contact_point_info then handle_contact_point(self, message.point, message.sender) - elseif message_id == hashes.trigger then + elseif message_id == hashes.trigger_info then handle_trigger(self, message.point, message.sender) elseif message_id == hashes.collision_mask then self.collision_mask = message