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

[Ready] Vehicle health #448

Merged
merged 2 commits into from May 15, 2018

Conversation

Projects
None yet
2 participants
@husho
Copy link
Contributor

husho commented May 10, 2018

Minor changes, but this should make more missions playable, because now it's possible to "destroy" vehicles.

husho

@husho husho changed the title Vehicle health [Ready] Vehicle health May 14, 2018

RW_UNUSED(args);
return true;
return vehicle->getHealth() <= arg2;

This comment has been minimized.

@danhedron

danhedron May 14, 2018

Member

This comparison should be > based on the description of the opcode.

This comment has been minimized.

@husho

This comment has been minimized.

@husho

husho May 14, 2018

Contributor

So I decided to recheck this opcode in scm and logically it seems that it should be >
Lesson learned - don't trust hex-rays decompiler. Sadly I can't really make sense out of FPU instructions, here's disassembly if someone wants to verify https://pastebin.com/raw/EQGyCKTB

P.S. original name matches logically IS_CAR_HEALTH_GREATER

husho

@danhedron danhedron merged commit c6f5b54 into rwengine:master May 15, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@husho husho deleted the husho:vehiclehealth branch May 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment