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

Method ReceiveObjectMessageVAList

Source/Objects/dynamiclightobject.cpp:149–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149void DynamicLightObject::ReceiveObjectMessageVAList(OBJECT_MSG::Type type, va_list args) {
150 DynamicLight *light;
151 switch (type) {
152 case OBJECT_MSG::SET_COLOR:
153 if (light_id_ != -1) {
154 color = *va_arg(args, vec3 *);
155 light = scenegraph_->dynamic_light_collection.GetLightFromID(light_id_);
156 if (light) {
157 light->color = color * (1.0f + overbright * 0.3f);
158 }
159 }
160 break;
161 case OBJECT_MSG::SET_OVERBRIGHT:
162 if (light_id_ != -1) {
163 overbright = *va_arg(args, float *);
164 light = scenegraph_->dynamic_light_collection.GetLightFromID(light_id_);
165 if (light) {
166 light->color = color * (1.0f + overbright * 0.3f);
167 }
168 }
169 break;
170 default:
171 Object::ReceiveObjectMessageVAList(type, args);
172 break;
173 }
174}
175
176void DynamicLightObject::SetEnabled(bool val) {
177 if (!enabled_ && val) {

Callers

nothing calls this directly

Calls 1

GetLightFromIDMethod · 0.80

Tested by

no test coverage detected