SP's update changes

Please post any questions about developing your plugin here. Please use the search function before posting!
Speed0x
Member
Posts: 84
Joined: Sun Feb 05, 2017 4:55 pm

SP's update changes

Postby Speed0x » Sat May 19, 2018 6:30 pm

e.g. does ".angles =" only accept QAngle now? It used to accept Vectors too... ( not sure, shouldn't the function read both the same ? )

Code: Select all

Boost.Python.ArgumentError: Python argument types in
    None.None(Entity, Vector)
did not match C++ signature:
    None(class CBaseEntityWrapper {lvalue}, class QAngle {lvalue})


thanks, if someone could clear this for me. i couldn't find this change in the update news...

is there any way i can view all changes in SP for x time? because i haven't updated SP for a while... and may need to update code... without trial and error... thanks again
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: SP's update changes

Postby decompile » Sat May 19, 2018 8:54 pm

Im not exactly sure, but I remember that I've always had to convert the Vector into a QAngle with:

Syntax: Select all

angles = Vector(0, 0, 0)
new_angles = QAngle(*angles)
User avatar
VinciT
Senior Member
Posts: 331
Joined: Thu Dec 18, 2014 2:41 am

Re: SP's update changes

Postby VinciT » Sat May 19, 2018 9:42 pm

Speed0x wrote:is there any way i can view all changes in SP for x time? because i haven't updated SP for a while... and may need to update code... without trial and error... thanks again
I guess you could go through the commits on github?
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: SP's update changes

Postby satoon101 » Sat May 19, 2018 10:09 pm

We do give monthly updates:

viewforum.php?f=40

Each update also includes a link that shows all commits made during that month.
Image
Speed0x
Member
Posts: 84
Joined: Sun Feb 05, 2017 4:55 pm

Re: SP's update changes

Postby Speed0x » Sun May 20, 2018 12:47 am

so DID ".angles" change in the past ~6 months to accept QAngle only? ( my main question )

about github commits or forums updates: there are a lot of updates, that are enhancements, bug fixes, additions etc.
but as explained, i am looking for a clean overview on crucial changes that need rework more than revision. api def/syntax related changes etc...

and: i am not the keenest fisherman.

thanks
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: SP's update changes

Postby satoon101 » Sun May 20, 2018 12:54 am

Yes.

https://github.com/Source-Python-Dev-Te ... n/pull/235

Prior to that pull request, that functionality was primary handled by Python. We moved most of the CBaseEntity properties to C++ for performance reasons. Due to those changes, angles now must explicitly use QAngle and not Vector.
Image
Speed0x
Member
Posts: 84
Joined: Sun Feb 05, 2017 4:55 pm

Re: SP's update changes

Postby Speed0x » Sun May 20, 2018 1:40 am

thanks i found the issue is with the C++ signature definition of BoostPython..

i think this boost python automatically translates the assertions from its the predefined functions.. and the CBaseEntityWrapper uses QAngle as the input for setangles, so that sp runtime will think vector is a wrong argument when called... although for the actual engine it would work the same way... (matrices/float memory section)...

https://github.com/ValveSoftware/source ... se.cpp#L45#L46

but.. i guess it's nicer to not confuse the 2 and to strictly handle them with their proper nominations.


thanks for the help :)
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: SP's update changes

Postby Ayuto » Sun May 20, 2018 6:18 am

No, there is no issue. Everything works as intended. Even in C++ it would lead to an error when compiling your code if you pass a Vector instance to a function that requires a QAngle instance. You would need to type cast the Vector instance to QAngle before doing that.
Speed0x
Member
Posts: 84
Joined: Sun Feb 05, 2017 4:55 pm

Re: SP's update changes

Postby Speed0x » Sun May 20, 2018 6:25 pm

okay whatever...

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 25 guests