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

Method ReceiveObjectMessageVAList

Source/Objects/envobject.cpp:1955–1978  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1953}
1954
1955void EnvObject::ReceiveObjectMessageVAList(OBJECT_MSG::Type type, va_list args) {
1956 switch (type) {
1957 case OBJECT_MSG::SET_COLOR: {
1958 // vec3 old_color = color_tint_component_.temp_tint();
1959 color_tint_component_.ReceiveObjectMessageVAList(type, args);
1960 for (auto& detail_object_surface : detail_object_surfaces) {
1961 detail_object_surface->SetColorTint(GetDisplayTint());
1962 }
1963 CalculateDisplayTint_();
1964 break;
1965 }
1966 case OBJECT_MSG::SET_OVERBRIGHT: {
1967 color_tint_component_.ReceiveObjectMessageVAList(type, args);
1968 for (auto& detail_object_surface : detail_object_surfaces) {
1969 detail_object_surface->SetOverbright(GetOverbright());
1970 }
1971 CalculateDisplayTint_();
1972 break;
1973 }
1974 default:
1975 Object::ReceiveObjectMessageVAList(type, args);
1976 break;
1977 }
1978}
1979
1980void EnvObject::CalculateDisplayTint_() {
1981 cached_combined_tint_ = color_tint_component_.tint_ * (1.0f + color_tint_component_.overbright_ * 0.3f) * base_color_tint;

Callers

nothing calls this directly

Calls 2

SetColorTintMethod · 0.80
SetOverbrightMethod · 0.80

Tested by

no test coverage detected