mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 18:03:37 +02:00
Get rid of class position
This commit is contained in:
parent
f622f79283
commit
56726a6c05
5 changed files with 40 additions and 43 deletions
5
agent.cc
5
agent.cc
|
@ -6,10 +6,9 @@
|
|||
#include "map.h"
|
||||
|
||||
void
|
||||
agent::put_at(struct position *pos)
|
||||
agent::put_at(class tile &t)
|
||||
{
|
||||
class tile *t = &pos->map->tile_at(*pos);
|
||||
if (!t->on_agent_enter(this)) {
|
||||
if (!t.on_agent_enter(*this)) {
|
||||
std::cerr << "Collision.";
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue