MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / GetRepeatedColor

Method GetRepeatedColor

core/UserMessagePBHelpers.h:849–865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

847 }
848
849 inline bool GetRepeatedColor(const char *pszFieldName, int index, Color *out)
850 {
851 GETCHECK_FIELD();
852 CHECK_FIELD_TYPE(MESSAGE);
853 CHECK_FIELD_REPEATED();
854 CHECK_REPEATED_ELEMENT(index);
855
856 const CMsgRGBA &msgRGBA = (const CMsgRGBA &)msg->GetReflection()->GetRepeatedMessage(*msg, field, index);
857 out->SetColor(
858 msgRGBA.r(),
859 msgRGBA.g(),
860 msgRGBA.b(),
861 msgRGBA.a()
862 );
863
864 return true;
865 }
866
867 inline bool SetRepeatedColor(const char *pszFieldName, int index, const Color &value)
868 {

Callers 1

smn_PbReadColorFunction · 0.80

Calls 2

GetRepeatedMessageMethod · 0.80
SetColorMethod · 0.80

Tested by

no test coverage detected