| 3906 | } // namespace |
| 3907 | |
| 3908 | void MovementObject::SetEnabled(bool val) { |
| 3909 | if (val != enabled_) { |
| 3910 | if (Online::Instance()->IsHosting()) { |
| 3911 | Online::Instance()->Send<OnlineMessages::SetObjectEnabledMessage>(GetID(), val); |
| 3912 | } |
| 3913 | Object::SetEnabled(val); |
| 3914 | ASArglist args; |
| 3915 | args.Add(val); |
| 3916 | as_context->CallScriptFunction(as_funcs.set_enabled, &args); |
| 3917 | |
| 3918 | if (!enabled_) { |
| 3919 | scenegraph_->UnlinkUpdateObject(this, update_list_entry); |
| 3920 | update_list_entry = -1; |
| 3921 | scenegraph_->abstract_bullet_world_->UnlinkObject(char_sphere); |
| 3922 | } else { |
| 3923 | update_list_entry = scenegraph_->LinkUpdateObject(this); |
| 3924 | scenegraph_->abstract_bullet_world_->LinkObject(char_sphere); |
| 3925 | } |
| 3926 | } |
| 3927 | } |
| 3928 | |
| 3929 | void MovementObject::ReceiveMessage(std::string msg) { |
| 3930 | ASArglist args; |
nothing calls this directly
no test coverage detected