diff --git a/BunnymodXT/triangle_drawing.cpp b/BunnymodXT/triangle_drawing.cpp index 05326a6f..7050d209 100644 --- a/BunnymodXT/triangle_drawing.cpp +++ b/BunnymodXT/triangle_drawing.cpp @@ -199,16 +199,17 @@ namespace TriangleDrawing continue; const bool active = ent->v.solid != SOLID_NOT || std::strcmp(classname, "trigger_transition") == 0; + float r, g, b, a; + ServerDLL::GetTriggerColor(classname, r, g, b); + ServerDLL::GetTriggerAlpha(classname, !active, true, a); + r /= 255.0f; + g /= 255.0f; + b /= 255.0f; + a /= 255.0f; + for (int i = 0; i < model->nummodelsurfaces; ++i) { // Offset to make each surface look slightly different const float offset = i * float(M_PI) / 7; - float r, g, b, a; - ServerDLL::GetTriggerColor(classname, r, g, b); - ServerDLL::GetTriggerAlpha(classname, !active, true, a); - r /= 255.0f; - g /= 255.0f; - b /= 255.0f; - a /= 255.0f; if (active) a = GetPulsatingAlpha(a, svTime + offset);