The following error occurs when running the same code on a linux system that works on a windows system.
PHP Code:
ERROR: Tried to SetParentAttachmentMaintainOffset for entity prop_dynamic (prop_dynamic), but it has no attachment named baseorigin.
The model I've created only has a single bone and that bone is used as an attachment point with no offset.
The QC file to compile the model is really simple.
Both the windows and linux server are running the same base sourcemod install plugins.
Looking at the function in the SDK the
LookupAttachment function is failing.
This should obviously only fail if the entity's model doesn't have any attachments with the lookup name.
This is how the code is structured
PHP Code:
new ent = CreateEntityByName("prop_dynamic_override");
....
TeleportEntity(ent, or, ang, NULL_VECTOR);
SetVariantString("!activator");
AcceptEntityInput(ent, "SetParent", client, ent, 0);
SetVariantString("baseorigin");
AcceptEntityInput(ent, "SetParentAttachmentMaintainOffset", ent, ent, 0);
I check the model before setting it like so to validate it's the correct one.
PHP Code:
decl String:m_ModelName[PLATFORM_MAX_PATH];
GetEntPropString(client, Prop_Data, "m_ModelName", m_ModelName, sizeof(m_ModelName));
if (strcmp(m_ModelName, "models/player/Placeholder_Model/placeholder_model.mdl") != 0)
{
PrintToChat(client, "%s", m_ModelName);
Format(m_OrginalModelName[client], PLATFORM_MAX_PATH, "%s", m_ModelName);
SetEntityModel(client, "models/player/Placeholder_Model/placeholder_model.mdl");
}
Using delays in timers after setting the model or using BoneMerge doesn't seem to fix the issue either.
PHP Code:
public void Bonemerge(int ent)
{
int m_iEntEffects = GetEntProp(ent, Prop_Send, "m_fEffects");
m_iEntEffects &= ~32;
m_iEntEffects |= 1;
m_iEntEffects |= 128;
SetEntProp(ent, Prop_Send, "m_fEffects", m_iEntEffects);
}
I'm curious if anyone knows the reason for this as i haven't seen a single topic about this issue. Is there some dumb rule that isn't mentioned on the
Developer.Valve website like "root bones can not be attachments and must have a child bone"? (which i know isn't right since it works on windows)
__________________