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

Function PlayerAtPosition

Source/player.cpp:2076–2086  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2074}
2075
2076Player *PlayerAtPosition(Point position)
2077{
2078 if (!InDungeonBounds(position))
2079 return nullptr;
2080
2081 auto playerIndex = dPlayer[position.x][position.y];
2082 if (playerIndex == 0)
2083 return nullptr;
2084
2085 return &Players[abs(playerIndex) - 1];
2086}
2087
2088void LoadPlrGFX(Player &player, player_graphic graphic)
2089{

Callers 3

UpdateCircleFunction · 0.85
DoAttackFunction · 0.85
FixPlrWalkTagsFunction · 0.85

Calls 2

InDungeonBoundsFunction · 0.85
absFunction · 0.50

Tested by

no test coverage detected