ObsidianQ
Member
- Joined
- Jan 26, 2017
- Messages
- 100
- Solutions
- 1
- Reaction score
- 10
TFS 1.3 (master)
Hello!
I have a small issue, i can't pick up those crystal coins or move them somewhere else from the position I am. (To make it clear, the item is not the issue, they just represent my max range to move or pick up items)
I can throw anything from my inventory or below/near me inside the burst arrow zone (That's fine, just making a point: I can throw anything i want anywhere on my screen as i wish)
The only issue is when i want to move that crystal coin, i have to walk 1 step closer so i can pick it up or move it somewhere else on the screen.
That means, i only can pick up or move items in a 7x7 radio.
From the 8x8 and beyond, i can't.
@Static_ says it may be something to do with Map::getPathMatching
Because it is used inside of Game:layerMoveItem (player->getPathTo)
game.cpp
That's what we have so far, does someone mind to help please?
TFS 1.3 (master)
Hello!
I have a small issue, i can't pick up those crystal coins or move them somewhere else from the position I am. (To make it clear, the item is not the issue, they just represent my max range to move or pick up items)
I can throw anything from my inventory or below/near me inside the burst arrow zone (That's fine, just making a point: I can throw anything i want anywhere on my screen as i wish)
The only issue is when i want to move that crystal coin, i have to walk 1 step closer so i can pick it up or move it somewhere else on the screen.
That means, i only can pick up or move items in a 7x7 radio.
From the 8x8 and beyond, i can't.
@Static_ says it may be something to do with Map::getPathMatching
Because it is used inside of Game:layerMoveItem (player->getPathTo)
game.cpp
Code:
if (!Position::areInRange<1, 1>(playerPos, mapFromPos)) {
//need to walk to the item first before using it
std::forward_list<Direction> listDir;
if (player->getPathTo(item->getPosition(), listDir, 0, 1, true, true)) {
g_dispatcher.addTask(createTask(std::bind(&Game::playerAutoWalk,
this, player->getID(), listDir)));
SchedulerTask* task = createSchedulerTask(400, std::bind(&Game::playerMoveItemByPlayerID, this,
player->getID(), fromPos, spriteId, fromStackPos, toPos, count));
player->setNextWalkActionTask(task);
} else {
player->sendCancelMessage(RETURNVALUE_THEREISNOWAY);
}
return;
}
That's what we have so far, does someone mind to help please?
TFS 1.3 (master)
Last edited: