2010-08-08 10:06:34 +02:00
|
|
|
#include <platform.h>
|
|
|
|
#include "follow.h"
|
|
|
|
|
|
|
|
#include <kernel/config.h>
|
|
|
|
#include <kernel/unit.h>
|
|
|
|
|
2018-09-29 11:37:17 +02:00
|
|
|
#include <kernel/attrib.h>
|
2018-09-29 13:21:46 +02:00
|
|
|
#include <kernel/gamedata.h>
|
2010-08-08 10:06:34 +02:00
|
|
|
#include <util/variant.h>
|
|
|
|
|
2013-12-31 10:06:28 +01:00
|
|
|
#include <storage.h>
|
|
|
|
|
2018-02-09 21:20:43 +01:00
|
|
|
static int read_follow(variant * var, void *owner, gamedata *data)
|
2010-08-08 10:06:34 +02:00
|
|
|
{
|
2017-09-21 16:26:53 +02:00
|
|
|
READ_INT(data->store, NULL); /* skip it */
|
2015-01-30 20:37:14 +01:00
|
|
|
return AT_READ_FAIL;
|
2010-08-08 10:06:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
attrib_type at_follow = {
|
2015-01-30 20:37:14 +01:00
|
|
|
"follow", NULL, NULL, NULL, NULL, read_follow
|
2010-08-08 10:06:34 +02:00
|
|
|
};
|
|
|
|
|
2011-03-07 08:02:35 +01:00
|
|
|
attrib *make_follow(struct unit * u)
|
2010-08-08 10:06:34 +02:00
|
|
|
{
|
2015-01-30 20:37:14 +01:00
|
|
|
attrib *a = a_new(&at_follow);
|
|
|
|
a->data.v = u;
|
|
|
|
return a;
|
2010-08-08 10:06:34 +02:00
|
|
|
}
|