Page MenuHomeWildfire Games

UnitMotion - remove m_PathState
ClosedPublic

Authored by wraitii on May 15 2019, 11:09 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP22456: UnitMotion - remove m_PathState, which is redundant with other variables.
Summary

Yet more redundant state.

With all the other changes merged in, the only point of m_PathState was to know if our last request was a long or short path. So just store that instead, and remove another instance of useless state.

UnitMotion is now pretty clean. There's still a need for a little bit of cleanup around M_CurSpeed and m_FacePointAfterMove, but that'll come later.

Test Plan

Compile.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

wraitii created this revision.May 15 2019, 11:09 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/differential/1421/display/redirect

Stan added a subscriber: Stan.May 16 2019, 12:02 PM
Stan added inline comments.
source/simulation2/components/CCmpUnitMotion.cpp
149 ↗(On Diff #8042)

Why not Request and m_RequestId ? or PathComputeRequest but that's a bit long.

wraitii updated this revision to Diff 8082.May 19 2019, 5:00 PM

Updated

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/differential/1458/display/redirect

wraitii updated this revision to Diff 8827.Wed, Jul 10, 8:58 PM

Rebased for committing later.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/26/display/redirect

Whilst testing this I got:

*** stack smashing detected ***: <unknown> terminated

Thread 1 "pyrogenesis" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff3029801 in __GI_abort () at abort.c:79
Backtrace stopped: Cannot access memory at address 0x7fffffffb928

a couple of times when starting an attack after move, but I cannot reliably reproduce it. Not sure whether it is related, but I haven't seen this earlier.

That sounds vaguely like it could be an infinite loop. By "cannot be reliably reproduced" you mean the when replaying it doesn't happen?

This comment was removed by phabadmin.
phabadmin removed a subscriber: phabadmin.

Whilst testing this I got:

*** stack smashing detected ***: <unknown> terminated
Thread 1 "pyrogenesis" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff3029801 in __GI_abort () at abort.c:79
Backtrace stopped: Cannot access memory at address 0x7fffffffb928

a couple of times when starting an attack after move, but I cannot reliably reproduce it. Not sure whether it is related, but I haven't seen this earlier.

Unrelated, just got it again with another patch.

That sounds vaguely like it could be an infinite loop. By "cannot be reliably reproduced" you mean the when replaying it doesn't happen?

Nay, I meant that I got it the first two games I started in a row, but could not make it happen thereafter.
I'll post on trac.

wraitii updated this revision to Diff 8841.Fri, Jul 12, 4:14 PM

The above crash was reported at #5496 and is unrelated to this particular diff.

Rebased for jenkins run one last time.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/38/display/redirect

wraitii updated this revision to Diff 8842.Fri, Jul 12, 4:23 PM

Forgot that I meant to do a quick change.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/39/display/redirect

This revision was not accepted when it landed; it landed in state Needs Review.Fri, Jul 12, 4:49 PM
This revision was automatically updated to reflect the committed changes.