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

Method AddColor

core/UserMessagePBHelpers.h:883–896  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

881 }
882
883 inline bool AddColor(const char *pszFieldName, const Color &value)
884 {
885 GETCHECK_FIELD();
886 CHECK_FIELD_TYPE(MESSAGE);
887 CHECK_FIELD_REPEATED();
888
889 CMsgRGBA *msgRGBA = (CMsgRGBA *)msg->GetReflection()->AddMessage(msg, field);
890 msgRGBA->set_r(value.r());
891 msgRGBA->set_g(value.g());
892 msgRGBA->set_b(value.b());
893 msgRGBA->set_a(value.a());
894
895 return true;
896 }
897
898 inline bool GetVector2D(const char *pszFieldName, Vector2D *out)
899 {

Callers 1

smn_PbAddColorFunction · 0.80

Calls 1

AddMessageMethod · 0.80

Tested by

no test coverage detected