MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / WhatUnitsVehicle

Function WhatUnitsVehicle

engine/Poseidon/Game/Chat.cpp:390–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388 else
389 {
390 buffer = item.from + RString(": \"") + item.text + RString("\"");
391 }
392 PackedColor color, colorB;
393 color = _colors[item.channel];
394 color = PackedColorRGB(color, toIntFloor(color.A8() * alpha));
395 colorB = PackedColorRGB(_bgColor, toIntFloor(_bgColor.A8() * alpha));
396
397 if (item.playerMsg)
398 {
399 // make background less intensive
400 colorB = PackedColorRGB(color, color.A8() / 2);
401 // make foreground more intensive
402 color = PackedColor(Color(0, 0, 0, alpha));
403 }
404
405 AUTO_STATIC_ARRAY(int, lines, 32);
406 lines.Add(0);
407
408 if (GEngine->GetTextWidth(_size, _font, buffer) > _w)
409 {
410 const char* p = buffer;

Callers 1

WhatUnitsFunction · 0.85

Calls 5

DriverMethod · 0.80
IsRemotePlayerMethod · 0.80
GunnerMethod · 0.80
AddMethod · 0.45
CommanderMethod · 0.45

Tested by

no test coverage detected