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

Function DecodePassMethod

extensions/sdktools/vcaller.cpp:59–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57ValvePassInfo s_params[SP_MAX_EXEC_PARAMS];
58
59inline void DecodePassMethod(ValveType vtype, SDKPassMethod method, PassType &type, unsigned int &flags)
60{
61 if (method == SDKPass_Pointer || method == SDKPass_ByRef)
62 {
63 type = PassType_Basic;
64 if (vtype == Valve_POD
65 || vtype == Valve_Float
66 || vtype == Valve_Bool
67 || vtype == Valve_SMAddress)
68 {
69 flags = PASSFLAG_BYVAL | PASSFLAG_ASPOINTER;
70 } else {
71 flags = PASSFLAG_BYVAL;
72 }
73 } else if (method == SDKPass_Plain) {
74 type = PassType_Basic;
75 flags = PASSFLAG_BYVAL;
76 } else if (method == SDKPass_ByValue) {
77 if (vtype == Valve_Vector
78 || vtype == Valve_QAngle)
79 {
80 type = PassType_Object;
81 } else {
82 type = PassType_Basic;
83 }
84 flags = PASSFLAG_BYVAL;
85 }
86}
87
88static cell_t StartPrepSDKCall(IPluginContext *pContext, const cell_t *params)
89{

Callers 2

PrepSDKCall_AddParameterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected