MCPcopy Create free account
hub / github.com/diasurgical/devilution / PM_DoBlock

Function PM_DoBlock

Source/player.cpp:2825–2846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2823}
2824
2825BOOL PM_DoBlock(int pnum)
2826{
2827 if ((DWORD)pnum >= MAX_PLRS) {
2828 app_fatal("PM_DoBlock: illegal player %d", pnum);
2829 }
2830
2831 if (plr[pnum]._pIFlags & ISPL_FASTBLOCK && plr[pnum]._pAnimFrame != 1) {
2832 plr[pnum]._pAnimFrame = plr[pnum]._pBFrames;
2833 }
2834
2835 if (plr[pnum]._pAnimFrame >= plr[pnum]._pBFrames) {
2836 StartStand(pnum, plr[pnum]._pdir);
2837 ClearPlrPVars(pnum);
2838
2839 if (!random_(3, 10)) {
2840 ShieldDur(pnum);
2841 }
2842 return TRUE;
2843 }
2844
2845 return FALSE;
2846}
2847
2848BOOL PM_DoSpell(int pnum)
2849{

Callers 1

ProcessPlayersFunction · 0.85

Calls 5

app_fatalFunction · 0.85
StartStandFunction · 0.85
ClearPlrPVarsFunction · 0.85
random_Function · 0.85
ShieldDurFunction · 0.85

Tested by

no test coverage detected