-
-
Notifications
You must be signed in to change notification settings - Fork 464
Closed
Labels
Feature Requestuser requested featureuser requested feature
Description
Description
Feature request: FindSendPropInfo with array support ?
- Easier way to check array PropFieldType
Problematic Code (or Steps to Reproduce)
char cls[64];
char prop[] = "m_hMyWeapons";
if(HasEntProp(client, Prop_Send, "m_hMyWeapons"))
{
GetEntityNetClass(client, cls, sizeof(cls));
offset = FindSendPropInfo(cls, prop, type, num_bits, local_offset);
switch(type)
{
case PropField_Unsupported:
{
arraysize = GetEntPropArraySize(client, Prop_Send, prop);
// How get PropFieldType from array ?
//offset = FindSendPropInfo(cls, prop, type, num_bits, local_offset);
for(int y = 0; y < arraysize; y++)
{
// Hacky hacky, "m_b*", "m_f*", "m_h*" etc. etc.
if(StrContains(prop, "m_f", true) == 0)
{
float m_fnewvalue = GetEntPropFloat(client, Prop_Send, prop, y);
...
}
else if(StrContains(prop, "m_i", true) == 0)
{
int newvalue = GetEntProp(client, Prop_Send, prop, _, y);
...
}
}
}
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Feature Requestuser requested featureuser requested feature