It symbolizes player and valids and applies action requests. More...
#include <SPlayer.hh>
Inheritance diagram for SPlayer:

Public Member Functions | |
| SPlayer (SRules *r, const MsgPlayerCreate *m, STeam *t, SPlayerMsg *pm) | |
| bool | acceptPlayerCreation () |
| Checks some things, if this player could be valid. | |
| bool | checkAndDeclareTouchdooown () |
| Checks if the player scores a touchdooown, and eventually declares the touchdooown. | |
| void | setPosition (const Position &pos, bool advertise_client=true) |
| Sets player position. | |
| void | setStatus (enum eStatus new_status) |
| Sets player status and sends a MSG_STATUS to clients. | |
| void | setProne () |
| Sets status to prone if he has to. | |
| void | prepareKickoff () |
| Goes in the reserve if he can. | |
| void | setUsableSkill (enum eSkill skill) |
| Sets the given skill as the only usable skill. | |
| void | checkArmour (int av_mod, int inj_mod) |
| Checks for armour value and eventually injury. | |
| void | bePushedInTheCrowd () |
| Rolls for injury and sets player status. | |
| void | considerBlockDices (bool reroll) |
| Rerolls the block dices if needed, otherwise gives the choice (if any) to a coach for which block dice to apply. | |
| void | resolveBlockDice (int chosen_dice) |
| Applies block dice roll result. | |
| void | resolveBlockBothDownDefender (bool block) |
| Applies BBOTH_DOWN block dice roll result. | |
| void | resolveBlockBothDownAttacker (bool block) |
| Applies BBOTH_DOWN block dice roll result. | |
| void | resolveBlockDefenderStumble (bool dodge) |
| Applies BDEFENDER_STUMBLE block dice roll result. | |
| void | setPusher (SPlayer *p) |
| Sets pusher of this player. | |
| void | tryBlockPush (SPlayer *target) |
| Tries to push the targetted player to a square. | |
| void | resolveBlockPush (int chosen_square) |
| Selects chosen square to push the targetted player. | |
| void | considerBlockFollow () |
| Eventually gives the coach his choice to follow or not after a block push. | |
| void | finishBlockFollow (bool follow) |
| Registers follow decision and moves to pushes application. | |
| void | finishBlockPush () |
| Applies pushes decisions, beginning by the last pushed player. | |
| void | finishBlockAction () |
| Applies follow decision, eventually knocks down the defender. | |
| void | tryCatchBall (bool accurate_pass) |
| Tries to catch the ball. | |
| void | finishCatchBall (bool reroll, bool success) |
| void | tryDodge () |
| Tries to dodge. | |
| void | finishDodge (bool reroll, bool success) |
| void | tryMove (Position &aim) |
| Tries to move to an adjacent square. | |
| void | tryPickUp () |
| Tries to pick up the ball. | |
| void | finishPickUp (bool reroll, bool success) |
| void | tryStandUp () |
| Tries to stand up. | |
| void | finishStandUp (bool reroll, bool success) |
| void | tryThrow () |
| Tries to throw the ball. | |
| void | finishThrow (bool reroll, int success) |
| void | msgPlayerPos (const MsgPlayerPos *m) |
| void | msgDeclare (const MsgDeclare *m) |
| void | msgMove (const MsgMove *m) |
| void | msgStandUp (const MsgStandUp *m) |
| void | msgBlock (const MsgBlock *m) |
| void | msgPass (const MsgPass *m) |
| void | msgSkill (const MsgSkill *m) |
It symbolizes player and valids and applies action requests.
You will have up to 32 instances of this class at runtime, handled by the STeam and SPlayerMsg class.
| void SPlayer::setPosition | ( | const Position & | pos, | |
| bool | advertise_client = true | |||
| ) |
Sets player position.
| pos | Where to move. | |
| advertise_client | Whether or not send a MSG_PLAYERPOS to clients. |
| void SPlayer::setProne | ( | ) |
Sets status to prone if he has to.
| void SPlayer::setStatus | ( | enum eStatus | new_status | ) |
Sets player status and sends a MSG_STATUS to clients.
| new_status | New status, it has to be different from the current one. |
| void SPlayer::tryBlockPush | ( | SPlayer * | target | ) |
Tries to push the targetted player to a square.
Eventually gives a coach his choice of which square to push the player to.
1.4.7