MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / OnWalk

Function OnWalk

Source/msg.cpp:907–919  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

905}
906
907size_t OnWalk(const TCmd *pCmd, Player &player)
908{
909 const auto &message = *reinterpret_cast<const TCmdLoc *>(pCmd);
910 const Point position { message.x, message.y };
911
912 if (gbBufferMsgs != 1 && player.isOnActiveLevel() && InDungeonBounds(position)) {
913 ClrPlrPath(player);
914 MakePlrPath(player, position, true);
915 player.destAction = ACTION_NONE;
916 }
917
918 return sizeof(message);
919}
920
921size_t OnAddStrength(const TCmd *pCmd, size_t pnum)
922{

Callers 1

ParseCmdFunction · 0.85

Calls 4

InDungeonBoundsFunction · 0.85
ClrPlrPathFunction · 0.85
MakePlrPathFunction · 0.85
isOnActiveLevelMethod · 0.80

Tested by

no test coverage detected