MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / ReceiveASVec3Message

Method ReceiveASVec3Message

Source/Objects/envobject.cpp:1789–1798  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1787}
1788
1789void EnvObject::ReceiveASVec3Message(int type, const vec3& vec_a, const vec3& vec_b) {
1790 if (type == _plant_movement_msg && plant_component_.get()) {
1791 const vec3& pos = vec_a;
1792 const vec3& vel = vec_b;
1793 plant_component_->HandleCollision(pos - GetTranslation(), vel);
1794 if (update_list_entry == -1) {
1795 update_list_entry = scenegraph_->LinkUpdateObject(this);
1796 }
1797 }
1798}
1799
1800void PlantComponent::Update(float timestep) {
1801 angle += ang_vel * timestep;

Callers 1

ASSendMessageFunction · 0.45

Calls 4

GetTranslationFunction · 0.85
HandleCollisionMethod · 0.80
LinkUpdateObjectMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected