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

[added] Suicide chat command #2033

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mugg91
Copy link
Contributor

@mugg91 mugg91 commented Apr 22, 2024

Status

  • READY: this PR is (to the best of your knowledge) ready to be incorporated into the game.

Description

[added] suicide chat command

Fixes #2032

This PR adds a suicide chat command.
The command works when typing in chat /suicide or /die and it kills you just like if you press the suicide button in menu.
I set it to not require admin only or sv_test only, so it can be used in any gamemode.

The command is convenient because typing in /die may be faster than being bothered by opening the menu and clicking on a button.

Tested in offline and online, no problems encountered.

Steps to Test or Reproduce

Type in /suicide or /die, notice your character dies just like if you press the "Suicide" button in the menu.

Copy link
Contributor

@Gingerbeard5773 Gingerbeard5773 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works as intended

@Vam-Jam Vam-Jam added no functional change PRs with no gameplay change or visible bug solved; generally tagged for refactor PRs ready A pull request that functions correctly and is ready for testing labels Sep 3, 2024
return;
}

blob.server_Hit(blob, blob.getPosition(), blob.getVelocity(), 10.0f, Hitters::suicide);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, would it not be better to use blob.server_SetTimeToDie, at least then death will always happen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no functional change PRs with no gameplay change or visible bug solved; generally tagged for refactor PRs ready A pull request that functions correctly and is ready for testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add /suicide chat command
3 participants