-
-
Notifications
You must be signed in to change notification settings - Fork 486
Added new functions get/setObjectProperty #162
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
Conversation
do this allow to enable physics for any object? |
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. |
May be better a common function like vehicle handling bool setObjectPhysics ( element theObject, string property, var value ) and table getObjectPhysics ( element theObject ) |
Your suggestion is fantastic Lex. How about |
|
||
bool CStaticFunctionDefinitions::SetObjectAirResistance ( CClientEntity& Entity, float fAirResistance ) | ||
{ | ||
//if ( fAirResistance > 0.0f && fAirResistance <= 1.0f ) |
There was a problem hiding this comment.
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 ?)
There was a problem hiding this comment.
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
…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
Done bool setObjectProperty(element theObject, string property, ...)
... getObjectProperty(element theObject, string property)
table getObjectProperties(element theObject) And how better or like vehicle handling |
Like enum 👍 |
Are these related? |
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>
sorry for the confusion, that last one should be the right one! |
It's not related @patrikjuvonen |
Patch for https://bugs.mtasa.com/view.php?id=9740