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

CanResurrect virtual #620

Merged
merged 4 commits into from Nov 13, 2018

Conversation

Projects
None yet
2 participants
@MajorCooke
Copy link
Contributor

commented Nov 6, 2018

Added CanResurrect(Actor other, bool passive)

  • Works similarly to CanCollideWith.
    • This means the function is only called after all the other checks; a raise state and -1 duration or CanRaise are still required.
  • Passive means the caller is trying to be resurrected by 'other'.
  • Non-passive means the caller is trying to resurrect 'other'.

Also added A_RaiseActor(Actor other, int flags), a pointer friendly edition for ZScript's sake.

Fixed an inconsistency where P_Thing_Raise returned true if no raise state was found, while P_Thing_CanRaise returned false. P_Thing_Raise now returns false.

MajorCooke added some commits Nov 6, 2018

Added CanResurrect(Actor other, bool passive)
- Works similarly to CanCollideWith.
- Passive means the caller is trying to be resurrected by 'other'.
- Non-passive means the caller is trying to resurrect 'other'.
Fixed inconsistency.
- P_Thing_Raise returned true while P_Thing_CanRaise returned false for the condition of having no raise state. P_Thing_Raise now returns false.
@coelckers
Copy link
Owner

left a comment

The A_ prefix should be reserved for DECORATE callable functions. A_RaiseActor cannot be called from DECORATE because one parameter is an actor pointer so it shouldn't have that prefix and block later implementation of a truly compatible variant.

@MajorCooke

This comment has been minimized.

Copy link
Contributor Author

commented Nov 7, 2018

Done.

@coelckers coelckers merged commit 55f17fa into coelckers:master Nov 13, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@MajorCooke MajorCooke deleted the MajorCooke:CanResurrect branch Nov 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.