Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added get/setElementAngularVelocity #73

Merged
merged 24 commits into from Aug 27, 2018

Conversation

@lex128
Copy link
Contributor

@lex128 lex128 commented Sep 14, 2016

if ( !argStream.HasErrors () )
{
// Grab the element, verify it
if ( pEntity )

This comment has been minimized.

@qaisjp

qaisjp Sep 14, 2016
Contributor

"verifications" are done by CScriptArgReader now, so you don't need to manually do LogBadPointer.

// Verify the arguments
if ( !argStream.HasErrors () )
{
if ( pEntity )

This comment has been minimized.

@qaisjp

qaisjp Sep 14, 2016
Contributor

This needs changing too (see first comment)

case CElement::PED:
case CElement::PLAYER:
{
// TODO

This comment has been minimized.

@qaisjp

qaisjp Sep 14, 2016
Contributor

Client side only?

This comment has been minimized.

@lex128

lex128 Sep 14, 2016
Author Contributor

While setting turn speed only on the server side for peds, without saving/getting

This comment has been minimized.

@qaisjp

qaisjp Sep 14, 2016
Contributor

Sorry, please can you rephrase?

This comment has been minimized.

@lex128

lex128 Sep 15, 2016
Author Contributor

Because now the server side synchronizes only move speed of peds, without turn speed. And not synchronized objects at all. I think it can be done later. Sorry for my bad english 😊

@qaisjp
Copy link
Contributor

@qaisjp qaisjp commented Sep 14, 2016

I haven't tested this yet, but it looks good so far.

You may also want to add a commit to deprecate setVehicleTurnVelocity and rewrite it to setElementTurnVelocity. Refer to 6b3aee3 for help on this (there are separate lists for client/server).

@qaisjp qaisjp added the enhancement label Sep 14, 2016
lex128 and others added 3 commits Sep 14, 2016
@eAi
Copy link

@eAi eAi commented Jan 10, 2017

Wouldn't get/setElementAngularVelocity be a better name?

@qaisjp qaisjp added the feedback label Jul 2, 2017
Copy link
Contributor

@qaisjp qaisjp left a comment

Please rename to get/setElementAngularVelocity

@lex128 lex128 changed the title Added get/setElementTurnVelocity Added get/setElementAngularVelocity Oct 6, 2017
@Necktrox
Copy link
Contributor

@Necktrox Necktrox commented Feb 12, 2018

Applying the angular velocity on peds cause weird side-effects, which might not be desirable: https://www.youtube.com/watch?v=_eiS_UA_DQU

Applying the angular velocity on objects is weird, because they don't work unless the object has any kind of positional velocity on them (a value of 0.0001 would be enough) and the angular velocity decreases after time, but positional velocity doesn't.

I need feedback on this.

@lex128
Copy link
Contributor Author

@lex128 lex128 commented Feb 20, 2018

@Necktrox with high velocity values usually something cause weird effects, mostly with upside peds.

As we known the objects behaves as frozen when their linear velocity is zero. So do you suggest to apply a bit linear velocity when applying some angular velocity for the defrost effect?

@Necktrox
Copy link
Contributor

@Necktrox Necktrox commented Feb 20, 2018

I personally would rather prefer a patch to make it possible to apply angular velocity without any kind of positional velocity and applying linear velocity (if it's zero) beforehand is a dirty hack.

@lex128
Copy link
Contributor Author

@lex128 lex128 commented May 3, 2018

@qaisjp renamed

@qaisjp qaisjp dismissed their stale review Jul 14, 2018

changes addressed

@@ -109,7 +111,6 @@ void CLuaElementDefs::AddClass(lua_State* luaVM)
lua_classfunction(luaVM, "removeData", "removeElementData");

lua_classfunction(luaVM, "setParent", "setElementParent");
lua_classfunction(luaVM, "setVelocity", "setElementVelocity");

This comment has been minimized.

@qaisjp

qaisjp Jul 14, 2018
Contributor

👍 nice catch with the erroneous extra setVelocity function

Copy link
Contributor

@qaisjp qaisjp left a comment

Code looks good to me. I'm happy for this to be squash merged once it has been tested.

qaisjp and others added 5 commits Jul 22, 2018
@qaisjp qaisjp dismissed their stale review Jul 24, 2018

Tested! Looks amazing and I can see many, many possibilities here. There are a few code tweaks to be done, however. Needs more commenting for deprecation and is missing a client/serverFunctionInitList entry. Refer to #243 for further details on deprecation.

@qaisjp qaisjp added this to the 1.5.6 milestone Aug 10, 2018
qaisjp added 5 commits Aug 27, 2018
@qaisjp qaisjp merged commit 938aaff into multitheftauto:master Aug 27, 2018
1 of 3 checks passed
1 of 3 checks passed
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
WIP ready for review
Details
@qaisjp qaisjp added this to In progress in release/v1.5.6 via automation Aug 27, 2018
@qaisjp qaisjp moved this from In progress to Done in release/v1.5.6 Aug 27, 2018
@lex128 lex128 deleted the lex128:feature/setElementTurnVelocity branch Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants