forked from jaildesigner-jailgames/jaildoctors_dilemma
canvi de pc
This commit is contained in:
@@ -46,12 +46,12 @@ void ItemTracker::addItem(const std::string &name, SDL_Point pos)
|
||||
// Primero busca si ya hay una entrada con ese nombre
|
||||
if (const int index = findByName(name); index != -1)
|
||||
{
|
||||
list.at(index).pos.push_back(pos);
|
||||
item_list_.at(index).pos.push_back(pos);
|
||||
}
|
||||
// En caso contrario crea la entrada
|
||||
else
|
||||
{
|
||||
list.emplace_back(name, pos);
|
||||
item_list_.emplace_back(name, pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@ int ItemTracker::findByName(std::string name)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
for (const auto &l : list)
|
||||
for (const auto &l : item_list_)
|
||||
{
|
||||
if (l.name == name)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ int ItemTracker::findByPos(int index, SDL_Point pos)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
for (const auto &l : list[index].pos)
|
||||
for (const auto &l : item_list_[index].pos)
|
||||
{
|
||||
if ((l.x == pos.x) && (l.y == pos.y))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user