lib/game_machine/actor/base.rb in game_machine-0.0.10 vs lib/game_machine/actor/base.rb in game_machine-0.0.11
- old
+ new
@@ -111,10 +111,14 @@
if message.is_a?(MessageLib::Entity) && message.has_json_entity
# Don't convert outgoing messages
if message.send_to_player
message
else
- message = Model.from_entity(message)
+ model = Model.from_entity(message)
+ if message.has_player
+ model.player_id = message.player.id
+ end
+ return model
end
end
message
end