The function as described in the wiki.
void AddAttachedPropToProp(string& asPropName, string& asAttachName, string& asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);
However, upon usage i found that "afPosZ" does
nothing, and "afRotz" controls
both the Z-position and the Z-rotation. I set up a subdivision routine, to illustrate this point.
Image 1: "Swapped" order
Image 2: Order as described in wiki
In the second image, you can see that whilst there is clearly no rotation, there is also no depth, the Z-position parameter was ignored. When looking at the first image there is depth, but also a rotation around zx - the rotation parameter counted as both!
Below is the relevant function call I am making in my code:
//First image (Which shouldn't behave like this)
AddAttachedPropToProp(cp00,_cpQUAD,"sdiv"+sz+".ent",dx,dy,0,0,0,dz);
//Second image (Which should be correct!)
AddAttachedPropToProp(cp00,_cpQUAD,"sdiv"+sz+".ent",dx,dy,dz,0,0,0);
Any workarounds or chance of a fix?
UPDATE:
Turns out it really is broken in that way, the following function fixes the problem, provided you do not want the attached prop to be rotated:
void FixedAttachPropToProp(string target, string attach, string entity, float x, float y, float z) {
AddAttachedPropToProp(target,attach,entity,x,y,0,z,90,z); }