Skip to content
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

[Bug] SurvivorAPI locks survivors #9

Closed
tristanmcpherson opened this issue Apr 16, 2019 · 2 comments
Closed

[Bug] SurvivorAPI locks survivors #9

tristanmcpherson opened this issue Apr 16, 2019 · 2 comments
Labels
bug Something isn't working
Projects

Comments

@tristanmcpherson
Copy link
Member

There is currently a bug in the SurvivorAPI where adding additional survivors effectively does nothing beyond adding two more, and additionally breaks all other survivors not allowing them to be used. For some reason having dnSpy's patched verison of mono-2.0-bdwgc.fll makes the API work as expected.

@tristanmcpherson tristanmcpherson added the bug Something isn't working label Apr 16, 2019
@AsterAether AsterAether added this to Backlog in Tasklist Apr 21, 2019
@varstyx
Copy link
Member

varstyx commented May 2, 2019

The cause of this is that the method SurvivorCatalog.GetSurvivorDef will be inlined, and the hook will never trigger. Adding a MethodImplAttribute to the function in dnSpy makes the API work as expected again.

[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
public static SurvivorDef GetSurvivorDef(SurvivorIndex survivorIndex)

@varstyx
Copy link
Member

varstyx commented May 3, 2019

Fixed in #26 by now using a MonoMod component.

@varstyx varstyx closed this as completed May 3, 2019
@tristanmcpherson tristanmcpherson moved this from Backlog to Done in Tasklist May 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Tasklist
  
Done
Development

No branches or pull requests

2 participants