createBuilding optional arguments not handled correctly
Describe the bug
doing code below will throw error for arg 5 expect vector get none
Steps to reproduce
createBuilding ( 3534, -2412.30884, -601.68127, 132.56250)
or
createBuilding ( 3534, -2412.30884, -601.68127, 132.56250,90) without rz or ry gives error
Version
No response
Additional context
No response
Relevant log output
No response
Security Policy
- [X] I have read and understood the Security Policy and this issue is not security related.
createBuilding expects 7 parameters
Providing just the model and position works though
createBuildingexpects 7 parametersProviding just the model and position works though
but doing createBuilding ( 3534, -2412.30884, -601.68127, 132.56250,90,0) will break it xd
createBuildingexpects 7 parametersProviding just the model and position works though
but doing createBuilding ( 3534, -2412.30884, -601.68127, 132.56250,90,0) will break it xd
because you need to provide full vector
createBuildingexpects 7 parametersProviding just the model and position works though
but doing createBuilding ( 3534, -2412.30884, -601.68127, 132.56250,90,0) will break it xd
because you need to provide full vector
we should correct it anyway if not ry given it should be set 0 as for createObject does
we should correct it anyway if not ry given it should be set 0 as for createObject does
Then we should use x,y,z instead of CVector
we should correct it anyway if not ry given it should be set 0 as for createObject does
Then we should use x,y,z instead of CVector
we still could use vectors but handled them in a correct way
if you look for
CClientObject* CStaticFunctionDefinitions::CreateObject(CResource& Resource, unsigned short usModelID, const CVector& vecPosition, const CVector& vecRotation, bool bLowLod)
CStaticFunctionDefinitions::CreateObject is a terrible example.
CVector is already constructed when you call CreateObject, whereas in createBuilding it is being constructed when calling the function from lua.
