-
-
Couldn't load subscription status.
- Fork 496
Surface property editing functions #702
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
Surface property editing functions #702
Conversation
Just some possibly useful info: I was running around with that skin that has rollerblades and on a grass object I was running slower, so I guess that is one of the effects one of those surface properties has, maybe it's what the unknown roughness effects.
Tested and everything works good.
Mantis issue: https://bugs.mtasa.com/view.php?id=7656
Client/game_sa/CWorldSA.cpp
Outdated
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.
This function only returns true. Please change the function to return void.
Client/game_sa/CWorldSA.cpp
Outdated
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.
Use size_t instead of short
Client/game_sa/CWorldSA.cpp
Outdated
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.
Use size_t instead of short
Client/game_sa/CWorldSA.cpp
Outdated
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.
Use size_t instead of short
Client/game_sa/CWorldSA.cpp
Outdated
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.
Use size_t instead of short
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.
Replace (void) with ()
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.
break; not required after return 1;. Remove it for the other case X:s too!
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.
Not required because you have a return 1; after the if-else.
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.
if (argStream.HasErrors()) { m_pScriptDebugging->LogCustom(luaVM, argStream.GetFullErrorMessage()); lua_pushnil(luaVM); } else lua_pushboolean(luaVM, false);
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.
Use lua_pushnil(luaVM); because the code above can only fail due to invalid input.
This pr introducing functions that allow to manipulate surface properties.
Properties are resetting after connect/reconnect to ther server.
There are 2 disabled properties
createobjectsandcreateplantsfor future, or i can just remove this code.Functions
Properties and values
Test resource
Download
Gui
At left are valid values, at right current value.
image
Usage
Arrows up and down navigate over menu.
Press z to show/hide cursor, click over surface to select them.
Command
/set valueset value of selected propertyType
/resetto reset selected surface values to default.