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

Function track_process

Source/track.cpp:9–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7static BOOL sgbIsWalking;
8
9void track_process()
10{
11 if (!sgbIsWalking)
12 return;
13
14 if (cursmx < 0 || cursmx >= MAXDUNX - 1 || cursmy < 0 || cursmy >= MAXDUNY - 1)
15 return;
16
17 if (plr[myplr]._pVar8 <= 6 && plr[myplr]._pmode != PM_STAND)
18 return;
19
20 if (cursmx != plr[myplr]._ptargx || cursmy != plr[myplr]._ptargy) {
21 DWORD tick = SDL_GetTicks();
22 if ((int)(tick - sgdwLastWalk) >= 300) {
23 sgdwLastWalk = tick;
24 NetSendCmdLoc(TRUE, CMD_WALKXY, cursmx, cursmy);
25 if (!sgbIsScrolling)
26 sgbIsScrolling = 1;
27 }
28 }
29}
30
31void track_repeat_walk(BOOL rep)
32{

Callers 1

ProcessInputFunction · 0.85

Calls 1

NetSendCmdLocFunction · 0.85

Tested by

no test coverage detected