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 new functions get/setObjectProperty #162

Merged
merged 24 commits into from Sep 6, 2018

Conversation

Projects
None yet
8 participants
@lex128
Copy link
Contributor

lex128 commented Oct 8, 2017

@CrosRoad95

This comment has been minimized.

Copy link
Contributor

CrosRoad95 commented Oct 8, 2017

do this allow to enable physics for any object?

@Einheit-101

This comment has been minimized.

Copy link

Einheit-101 commented Oct 10, 2017

For me this looks like its just possible to edit some more physics properties of objects, but it doesnt magically convert a static object into a dynamic one.

@lex128

This comment has been minimized.

Copy link
Contributor Author

lex128 commented Jan 1, 2018

May be better a common function like vehicle handling

bool setObjectPhysics ( element theObject, string property, var value )

and

table getObjectPhysics ( element theObject )
@qaisjp

This comment has been minimized.

Copy link
Member

qaisjp commented Jan 1, 2018

Your suggestion is fantastic Lex.

How about prop getObjectProperty ( element theObject, string prop ). And a prop of "all" would return the table of all props?


bool CStaticFunctionDefinitions::SetObjectAirResistance ( CClientEntity& Entity, float fAirResistance )
{
//if ( fAirResistance > 0.0f && fAirResistance <= 1.0f )

This comment has been minimized.

Copy link
@Citizen01

Citizen01 Jan 1, 2018

Collaborator

Do you plan to uncomment that out before pushing ? (same for elasticity ?)

This comment has been minimized.

Copy link
@lex128

lex128 Feb 20, 2018

Author Contributor

I dont know yet how better

@Necktrox Necktrox added pr:tested and removed pr:needs-testing labels Feb 26, 2018

lex128 added some commits May 2, 2018

Merge branch 'feature/objectProperties' of https://github.com/lex128/…
…mtasa-blue into feature/objectProperties

# Conflicts:
#	Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.cpp
#	Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.h
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
…into feature/objectProperties

# Conflicts:
#	Client/game_sa/CPhysicalSA.cpp
#	Client/game_sa/CPhysicalSA.h
#	Client/mods/deathmatch/logic/CClientObject.cpp
#	Client/mods/deathmatch/logic/CClientObject.h
#	Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp
#	Client/mods/deathmatch/logic/CStaticFunctionDefinitions.h
#	Client/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp
#	Client/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h
#	Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.cpp
#	Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.h
#	Client/sdk/game/CPhysical.h
#	Server/mods/deathmatch/logic/CResourceChecker.Data.h
@lex128

This comment has been minimized.

Copy link
Contributor Author

lex128 commented May 3, 2018

Done

bool  setObjectProperty(element theObject, string property, ...)
...   getObjectProperty(element theObject, string property)
table getObjectProperties(element theObject)

And how better "property" takes values?
as now like enum
"mass", "turn_mass", "air_resistance", "elasticity", "center_of_mass", "buoyancy"

or like vehicle handling
"mass", "turnMass", "airResistance", "elasticity", "centerOfMass", "buoyancy"

@qaisjp

This comment has been minimized.

Copy link
Member

qaisjp commented May 3, 2018

Like enum 👍

qaisjp added some commits Aug 4, 2018

@lex128 lex128 changed the title Added functions for object properties Added new functions get/setObjectProperty Sep 4, 2018

@patrikjuvonen

This comment has been minimized.

Copy link
Member

patrikjuvonen commented Sep 5, 2018

qaisjp added some commits Sep 5, 2018

@qaisjp qaisjp self-assigned this Sep 6, 2018

@qaisjp qaisjp changed the base branch from master to next Sep 6, 2018

qaisjp added some commits Sep 6, 2018

@qaisjp qaisjp merged commit 8001f44 into multitheftauto:next Sep 6, 2018

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 added a commit that referenced this pull request Sep 6, 2018

Add new functions get/setObjectProperty (#162)
* Added functions for object properties

* Tabs

* More correct OOP vars

* Return Vector3 in Object.centerOfMass

* Tiny comment corrections

* Combining functions

* Deprecate get/setObjectMass

* Clang format

* rem extra lines

* rem extra lines again

* comment out deprecation and save it for later

* Fix formatting

* Reset CResourceChecker.Data.h

* Merge getObjectProperties in getObjectProperty

* Fix oop

Co-authored-by: Qais Patankar <qaisjp@gmail.com>

qaisjp added a commit that referenced this pull request Sep 6, 2018

Add new functions get/setObjectProperty (#162)
Squashed commit of the following:

commit 5f2a8005d43d2159bd7220f132e24f1619096a04
Author: Qais Patankar <qaisjp@gmail.com>
Date:   Thu Sep 6 11:04:07 2018 +0100

    set fields to enumtostring value

commit d970844
Author: Qais Patankar <qaisjp@gmail.com>
Date:   Thu Sep 6 10:59:49 2018 +0100

    Fix oop

commit 41d4155
Author: Qais Patankar <qaisjp@gmail.com>
Date:   Thu Sep 6 10:58:23 2018 +0100

    Merge getObjectProperties in getObjectProperty

commit 97b8b0f
Author: Qais Patankar <qaisjp@gmail.com>
Date:   Thu Sep 6 10:21:20 2018 +0100

    Reset CResourceChecker.Data.h

commit 3fa2635
Author: Qais Patankar <qaisjp@gmail.com>
Date:   Thu Sep 6 10:17:36 2018 +0100

    Fix formatting

commit 24b5009
Merge: 5e04140 ea1dbae
Author: Qais Patankar <qaisjp@gmail.com>
Date:   Thu Sep 6 10:05:42 2018 +0100

    Merge branch 'next' into feature/objectProperties

commit 5e04140
Merge: ff661b8 dc27d47
Author: Qais Patankar <qaisjp@gmail.com>
Date:   Wed Sep 5 03:02:27 2018 +0100

    Merge branch 'master' into feature/objectProperties

commit ff661b8
Author: Qais Patankar <qaisjp@gmail.com>
Date:   Sat Aug 4 22:53:02 2018 +0100

    comment out deprecation and save it for later

commit 5531b87
Author: Qais Patankar <qaisjp@gmail.com>
Date:   Sat Aug 4 22:51:54 2018 +0100

    rem extra lines again

commit 1c0d84e
Author: Qais Patankar <qaisjp@gmail.com>
Date:   Sat Aug 4 22:50:54 2018 +0100

    rem extra lines

commit 9c57135
Merge: d4b5374 8da5f88
Author: Qais Patankar <qaisjp@gmail.com>
Date:   Sat Aug 4 22:49:19 2018 +0100

    Merge branch 'master' into feature/objectProperties

commit d4b5374
Merge: f015e8a 3924406
Author: Alexander <lexr128@gmail.com>
Date:   Mon Jul 23 13:43:40 2018 +0700

    Merge branch 'master' into feature/objectProperties

commit f015e8a
Author: Alexander Lex128 <lexr128@gmail.com>
Date:   Thu May 3 00:37:23 2018 +0700

    Clang format

commit f4e0a28
Merge: b8bdc10 4b20544
Author: Alexander Lex128 <lexr128@gmail.com>
Date:   Wed May 2 23:43:00 2018 +0700

    Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue into feature/objectProperties

    # Conflicts:
    #	Client/game_sa/CPhysicalSA.cpp
    #	Client/game_sa/CPhysicalSA.h
    #	Client/mods/deathmatch/logic/CClientObject.cpp
    #	Client/mods/deathmatch/logic/CClientObject.h
    #	Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp
    #	Client/mods/deathmatch/logic/CStaticFunctionDefinitions.h
    #	Client/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp
    #	Client/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h
    #	Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.cpp
    #	Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.h
    #	Client/sdk/game/CPhysical.h
    #	Server/mods/deathmatch/logic/CResourceChecker.Data.h

commit b8bdc10
Author: Alexander Lex128 <lexr128@gmail.com>
Date:   Wed May 2 23:15:29 2018 +0700

    Deprecate get/setObjectMass

commit b529577
Merge: cfe2644 14a1abb
Author: Alexander Lex128 <lexr128@gmail.com>
Date:   Wed May 2 17:54:01 2018 +0700

    Merge branch 'feature/objectProperties' of https://github.com/lex128/mtasa-blue into feature/objectProperties

    # Conflicts:
    #	Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.cpp
    #	Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.h

commit cfe2644
Author: Alexander Lex128 <lexr128@gmail.com>
Date:   Wed May 2 17:43:21 2018 +0700

    Combining functions

commit 14a1abb
Author: Marek Kulik <necktrox@gmail.com>
Date:   Mon Feb 26 15:31:35 2018 +0100

    Tiny comment corrections

commit d7bed51
Author: Marek Kulik <necktrox@gmail.com>
Date:   Mon Feb 26 15:10:45 2018 +0100

    Return Vector3 in Object.centerOfMass

commit d3b0b93
Merge: debd106 9f7117f
Author: Marek Kulik <necktrox@gmail.com>
Date:   Mon Feb 26 10:45:28 2018 +0100

    Merge remote-tracking branch 'upstream/master' into feature/objectProperties

commit debd106
Merge: 1e01cdd 45185a6
Author: Marek Kulik <necktrox@gmail.com>
Date:   Sun Feb 25 13:18:39 2018 +0100

    Merge remote-tracking branch 'upstream/master' into feature/objectProperties

commit 1e01cdd
Author: Alexander Lex128 <lexr128@gmail.com>
Date:   Fri Oct 13 22:51:32 2017 +0700

    More correct OOP vars

commit c084287
Author: Alexander Lex128 <lexr128@gmail.com>
Date:   Sun Oct 8 15:56:56 2017 +0700

    Tabs

commit b3c0e98
Merge: ab330f0 510990e
Author: Alexander Lex128 <lexr128@gmail.com>
Date:   Sun Oct 8 00:03:21 2017 +0700

    Merge branch 'master' into feature/objectProperties

commit ab330f0
Author: lex128 <lexr128@gmail.com>
Date:   Tue Sep 13 18:23:24 2016 +0700

    Added functions for object properties

Co-authored-by: Qais Patankar <qaisjp@gmail.com>
@qaisjp

This comment has been minimized.

Copy link
Member

qaisjp commented Sep 6, 2018

sorry for the confusion, that last one should be the right one!

@lex128

This comment has been minimized.

Copy link
Contributor Author

lex128 commented Sep 6, 2018

It's not related @patrikjuvonen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.