Skip to content

Implement player Pain, DeathSound and JoiningThink hooks#209

Merged
wopox1337 merged 2 commits intorehlds:masterfrom
fl0werD:feature/player-hooks-api
Sep 2, 2021
Merged

Implement player Pain, DeathSound and JoiningThink hooks#209
wopox1337 merged 2 commits intorehlds:masterfrom
fl0werD:feature/player-hooks-api

Conversation

@fl0werD
Copy link
Contributor

@fl0werD fl0werD commented Aug 29, 2021

Copy link

@metita metita left a comment

Choose a reason for hiding this comment

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

We can change your documentation to this one, seems more accurate, maybe some little changes can be made.

RG_CBasePlayer_DropIdlePlayer,

/*
* Description: Called when a player take a pain.
Copy link

Choose a reason for hiding this comment

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

Called when a player is reproducing pain sounds.

Copy link

Choose a reason for hiding this comment

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

"Called when a player reproduces pain sounds" is also valid and maybe more accurate to match _DeathSound one.

RG_CBasePlayer_Pain,

/*
* Description: Called when a player death.
Copy link

Choose a reason for hiding this comment

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

Called when a player reproduces his death sound.

RG_CBasePlayer_DeathSound,

/*
* Description: Called when a player joining after connect on server.
Copy link

Choose a reason for hiding this comment

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

Called when a player joins the server after connecting to it.

@wopox1337 wopox1337 self-requested a review September 2, 2021 09:31
@wopox1337 wopox1337 added the Type: 🚀 enhancement Improvement or addition of a new feature. label Sep 2, 2021
@fl0werD
Copy link
Contributor Author

fl0werD commented Sep 2, 2021

@StevenKal how to write description in english pretty?

@StevenKal
Copy link

StevenKal commented Sep 2, 2021

Hehehe! Below is that I have set up as description for my ready upcoming module ReAPI v1.8.0 (in "reapi_const.inc"):

For pain:
Called when a client emits a "pain sound" on damage reception.

For DeathSound:
Called when a client emits a "death sound" on death.

For JoiningThink:
Called when a client "thinks for the join status" (permanently called on each call of "CBasePlayer::PreThink", and only when he is not assigned as specatator or not playing).

Feel free to copy & use them, no problem!

@StevenKal
Copy link

StevenKal commented Sep 2, 2021

PS: I love the attempts previously made in order to find the right descriptions, like "Called when a player is reproducing pain sounds.", haha, this is like the client already heard pain sounds in his life, but he tries to reproduce/imitate them in-game! Hihi so funny!
And this one "Called when a player joins the server after connecting to it." is wrong, knowing this function is not only called on the beginning, but more than that, as a permanent "join rethink". But yes, it also does some job as with the intro camera.

So yeah, you should use mines if you do not want some vicious English people mocke at this like dumbs!

@wopox1337 wopox1337 changed the title Implement player Pain, DeathSound and JoiningThink hooks Implement player Pain, DeathSound and JoiningThink hooks Sep 2, 2021
@wopox1337 wopox1337 merged commit 6063144 into rehlds:master Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: 🚀 enhancement Improvement or addition of a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants