Skip to content

Conversation

lex128
Copy link
Contributor

@lex128 lex128 commented Oct 8, 2017

@CrosRoad95
Copy link

do this allow to enable physics for any object?

@Einheit-101
Copy link

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.

@Necktrox Necktrox added the enhancement New feature or request label Nov 15, 2017
@lex128
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
Copy link
Contributor

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 )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know yet how better

lex128 added 5 commits May 2, 2018 17:43
…mtasa-blue into feature/objectProperties

# Conflicts:
#	Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.cpp
#	Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.h
…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
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
Copy link
Contributor

qaisjp commented May 3, 2018

Like enum 👍

@botder botder added review-required and removed enhancement New feature or request labels Jul 9, 2018
@lex128 lex128 changed the title Added functions for object properties Added new functions get/setObjectProperty Sep 4, 2018
@patrikjuvonen patrikjuvonen added enhancement New feature or request and removed new feature labels Sep 4, 2018
@patrikjuvonen
Copy link
Contributor

patrikjuvonen commented Sep 5, 2018

@qaisjp qaisjp self-assigned this Sep 6, 2018
@qaisjp qaisjp changed the base branch from master to next September 6, 2018 09:06
@qaisjp qaisjp merged this pull request into multitheftauto:next Sep 6, 2018
qaisjp added a commit that referenced this pull request Sep 6, 2018
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
Copy link
Contributor

qaisjp commented Sep 6, 2018

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

@lex128
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
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants