Money switch building active animation - #2380
Open
dh381-1 wants to merge 16 commits into
Open
Conversation
NetsuNegi
reviewed
Aug 31, 2026
NetsuNegi
reviewed
Aug 31, 2026
|
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. |
NetsuNegi
requested changes
Aug 31, 2026
| && pTypeExt->ActiveAnimThree_MoneyAmount != -1 | ||
| && pTypeExt->ActiveAnimFour_MoneyAmount != -1) | ||
| { | ||
| if(auto pBuildingExt = BuildingExt::Fetch(pThis)) |
| && pTypeExt->ActiveAnimThree_MoneyAmount != -1 | ||
| && pTypeExt->ActiveAnimFour_MoneyAmount != -1) | ||
| { | ||
| if(auto pBuildingExt = BuildingExt::Fetch(pThis)) |
| { | ||
| int Grade = pBuildingExt->MoneyGrade; | ||
| R->EAX(Grade); | ||
| __asm { cmp eax, 3 } |
Contributor
There was a problem hiding this comment.
You should manually compare and jump to the corresponding address instead of directly writing the assembly.
你应当手动检查并跳转到对应地址,而不是直接写汇编。
| __asm | ||
| { | ||
| cmp eax, 3 | ||
| mov [esi + 0x6F0], eax |
|
To Chinese users:
|
NetsuNegi
reviewed
Sep 2, 2026
TaranDahl
approved these changes
Sep 7, 2026
Comment on lines
+1556
to
+1559
| if(pTypeExt->ActiveAnim_MoneyAmount != -1 | ||
| && pTypeExt->ActiveAnimTwo_MoneyAmount != -1 | ||
| && pTypeExt->ActiveAnimThree_MoneyAmount != -1 | ||
| && pTypeExt->ActiveAnimFour_MoneyAmount != -1) |
Contributor
There was a problem hiding this comment.
Caching these in BuildingTypeExt would be better.
- only AE that's been applied through the TechnoType tags should be considered as self owned - other scenario (e.g. applied through warhead from itself) shouldn't be handled in the same way - if simply checking whether the source is equal to the target, some process will be wrong
- SourceHouse of damage arg is likely to be null in some cases (e.g. AmbientDamage), resulting in wrong damage calculation - use the same method as Ares now: try to use Attacker's owner as source house first, and fallback to SourceHouse if not exists
…ectory to ignore settings such as `BounceTimes` (Phobos-developers#2383) <!-- If the changes are solely made to the documentation, please set the target branch to the pull request named "Weekly Regular Documentation Revisions", rather than the repository's existing branches. --> ## What kind of change is this? <!-- Tick the row that matches your change. It tells the maintainers which of the changelog, docs and credits checks should run, and which `Skip` labels to apply for the ones that don't. --> - [ ] **New feature, vanilla bugfix or enhancement of a released feature** - changelog, docs and credits entries are needed. - [ ] **Improvement to a new (unreleased) feature** - docs and credits entries are needed; no changelog entry (`Skip Changelog`). - [ ] **Bugfix to a new (unreleased) feature** - credits entry is needed; no changelog or docs entries (`Skip Changelog`, `Skip Docs`). - [X] **Bugfix to an old (released) feature** - changelog and credits entries are needed; no docs entry (`Skip Docs`). - [ ] **Completely minor change (e.g. a typo fix)** - no entries are needed (`Skip Changelog`, `Skip Docs`, `Skip Credits`). ## Description In vanilla, `Ranged=true` runs a check that, once the fuse timer has expired, snaps the bullet onto the target coordinates and detonates it as soon as the projectile comes within 64 leptons of them. This check runs after the trajectory system has decided the projectile should keep flying (the trajectory `BulletClass_AI_Trajectories` hook at 0x4666F7) and bypasses all of the trajectory's detonation logic - including the shared `DetonationDistance` / `TargetSnapDistance` handling and the Parabola bouncing mechanism.
<!--
If the changes are solely made to the documentation, please set the
target branch to the pull request named "Weekly Regular Documentation
Revisions", rather than the repository's existing branches.
-->
## What kind of change is this?
<!-- Tick the row that matches your change. It tells the maintainers
which of the changelog, docs and credits checks should run, and which
`Skip` labels to apply for the ones that don't. -->
- [X] **New feature, vanilla bugfix or enhancement of a released
feature** - changelog, docs and credits entries are needed.
- [ ] **Improvement to a new (unreleased) feature** - docs and credits
entries are needed; no changelog entry (`Skip Changelog`).
- [ ] **Bugfix to a new (unreleased) feature** - credits entry is
needed; no changelog or docs entries (`Skip Changelog`, `Skip Docs`).
- [ ] **Bugfix to an old (released) feature** - changelog and credits
entries are needed; no docs entry (`Skip Docs`).
- [ ] **Completely minor change (e.g. a typo fix)** - no entries are
needed (`Skip Changelog`, `Skip Docs`, `Skip Credits`).
## Description
In vanilla, the number of game frames each animation frame of the
infantry sequence stays (i.e., its playback rate) is hardcoded. Now it
can be customized for each sequence in each infantry's sequence section.
- `<Sequence>Rate` defines the number of game logic frames that 1
animation frame stays; 0 means still, for example, the `Ready` and
`Guard` sequences in vanilla are still.
- `<Sequence>Normalized` defines whether the playback rate is affected
by game speed, for example, the `Idle1`, `Idle2`, `WetIdle1`,
`WetIdle2`, `Hover`, and `Cheer` sequences in vanilla are affected by
game speed.
```{note}
The effective rate of a normalized sequence is `rate` adjusted by the game speed:
- `rate < 5`: from the table below (`rate` row, `GameSpeed` column).
- `rate >= 5`: `rate * 8 / (GameSpeed + 1)`.
| Rate \ GameSpeed | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
| ---------------- | - | - | - | - | - | - | - |
| 1 | 2 | 2 | 1 | 1 | 1 | 1 | 1 |
| 2 | 3 | 3 | 3 | 2 | 2 | 2 | 1 |
| 3 | 5 | 4 | 4 | 3 | 3 | 2 | 2 |
| 4 | 7 | 6 | 5 | 4 | 4 | 4 | 3 |
`GameSpeed` goes from `0` (fastest) to `6` (slowest).
```
In `rulesmd.ini`:
```ini
[AudioVisual]
Sequence.<Sequence>.DefaultRate=0 ; integer
Sequence.<Sequence>.DefaultNormalized=no ; boolean
```
```{dropdown} Default value table
| Name | DefaultRate | Normalized |
|-----------------|-------------|------------|
| Ready | 0 | false |
| Guard | 0 | false |
| Prone | 6 | false |
| Walk | 3 | false |
| FireUp | 1 | false |
| Down | 1 | false |
| Crawl | 1 | false |
| Up | 1 | false |
| FireProne | 1 | false |
| Idle1 | 3 | true |
| Idle2 | 3 | true |
| Die1 | 1 | false |
| Die2 | 1 | false |
| Die3 | 1 | false |
| Die4 | 1 | false |
| Die5 | 1 | false |
| Tread | 3 | false |
| Swim | 1 | false |
| WetIdle1 | 3 | true |
| WetIdle2 | 3 | true |
| WetDie1 | 1 | false |
| WetDie2 | 1 | false |
| WetAttack | 1 | false |
| Hover | 2 | true |
| Fly | 1 | false |
| Tumble | 1 | false |
| FireFly | 1 | false |
| Deploy | 1 | false |
| Deployed | 1 | false |
| DeployedFire | 1 | false |
| DeployedIdle | 1 | false |
| Undeploy | 1 | false |
| Cheer | 3 | true |
| Paradrop | 1 | false |
| AirDeathStart | 3 | false |
| AirDeathFalling | 1 | false |
| AirDeathFinish | 3 | false |
| Panic | 4 | false |
| Shovel | 6 | false |
| Carry | 3 | false |
| SecondaryFire | 1 | false |
| SecondaryProne | 1 | false |
```
In `artmd.ini`:
```ini
[SEQUENCE] ; Sequence
<Sequence>Rate= ; integer, defaults to [AudioVisual] -> Sequence.<Sequence>.DefaultRate
<Sequence>Normalized= ; boolean, defaults to [AudioVisual] -> Sequence.<Sequence>.DefaultNormalized
```
> [!Tip]
> The naming of each infantry flag is aligned with `[Sequence] ->
<Sequence>Sounds= (List of sound entries)` (Vanilla flag. It is
concatenated by `<Sequence>` and the suffix `Sounds`, so the full string
is not stored in `gamemd.exe`, see `0x523FC4`.).
Contributor
|
Don't know why I'm being requested to review again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change is this?
Skip Changelog).Skip Changelog,Skip Docs).Skip Docs).Skip Changelog,Skip Docs,Skip Credits).Description
ActiveAnim.MoneyAmount,ActiveAnimTwo.MoneyAmount,ActiveAnimThree.MoneyAmount,ActiveAnimFour.MoneyAmountto switch active animation of building.ActiveAnimFour.MoneyAmount,ActiveAnimFouris played; when funds are greater thanActiveAnimThree.MoneyAmountbut less thanActiveAnimFour.MoneyAmount, ActiveAnimThree is played, and so on. If the corresponding animation does not exist, no switch will occur.In
rulesmd.ini: