-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
[Minor] Randomized anims for several behaviors #1380
base: develop
Are you sure you want to change the base?
Conversation
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
15e42fb
to
2b28804
Compare
Add a function to create random anim from |
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.
What Starkku said.
Additionally, I think that adding a separate tag is unnecessary, because changing *Anim
to work with a list is backwards compatible (from INI perspective) and less confusing than an extra override. Depends on what others think.
42342b7
to
29f26ce
Compare
29f26ce
to
0f30f2d
Compare
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.
Please add an entry in the changelog and credits as well.
src/Ext/Anim/Body.cpp
Outdated
@@ -239,6 +239,43 @@ void AnimExt::HandleDebrisImpact(AnimTypeClass* pExpireAnim, AnimTypeClass* pWak | |||
} | |||
} | |||
|
|||
AnimClass* AnimExt::CreateRandomAnim(std::vector<AnimTypeClass*> AnimList, CoordStruct coords, TechnoClass* pTechno, HouseClass* pHouse, bool invoker) |
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.
AnimClass* AnimExt::CreateRandomAnim(std::vector<AnimTypeClass*> AnimList, CoordStruct coords, TechnoClass* pTechno, HouseClass* pHouse, bool invoker) | |
AnimClass* AnimExt::CreateRandomAnim(const std::vector<AnimTypeClass*>& AnimList, CoordStruct coords, TechnoClass* pTechno, HouseClass* pHouse, bool invoker) |
Since we're only accessing elements, this vector should be passed as an immutable reference.
3dfad0a
to
ce28807
Compare
ce28807
to
13e9ef1
Compare
Allow several Phobos anim logic to display one of the random anims in the list, instead of one fixed anim. Most of them are related to destroy/take damage behaviors. You can either use their old tags to input the list directly, or use the following new tags in plural forms to override them.
In
rulesmd.ini
: