forked from github/server
parent
9f62e74a37
commit
57085ea47b
|
@ -1309,6 +1309,7 @@ void writefaction(struct gamedata *data, const faction * f)
|
|||
ally *sf;
|
||||
ursprung *ur;
|
||||
|
||||
assert(f->_alive);
|
||||
write_faction_reference(f, data->store);
|
||||
WRITE_INT(data->store, f->subscription);
|
||||
#if RELEASE_VERSION >= SPELL_LEVEL_VERSION
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "group.h"
|
||||
#include "ally.h"
|
||||
#include "faction.h"
|
||||
#include "plane.h"
|
||||
#include "region.h"
|
||||
#include "version.h"
|
||||
#include <triggers/changefaction.h>
|
||||
|
@ -113,12 +114,10 @@ static void test_readwrite_dead_faction_regionowner(CuTest *tc) {
|
|||
faction *f;
|
||||
region *r;
|
||||
unit * u;
|
||||
int fno;
|
||||
|
||||
test_cleanup();
|
||||
config_set("rules.region_owners", "1");
|
||||
f = test_create_faction(0);
|
||||
fno = f->no;
|
||||
u = test_create_unit(f, r = test_create_region(0, 0, 0));
|
||||
region_set_owner(r, f, turn);
|
||||
destroyfaction(&factions);
|
||||
|
@ -204,6 +203,6 @@ CuSuite *get_save_suite(void)
|
|||
SUITE_ADD_TEST(suite, test_readwrite_dead_faction_createunit);
|
||||
SUITE_ADD_TEST(suite, test_readwrite_dead_faction_changefaction);
|
||||
SUITE_ADD_TEST(suite, test_readwrite_dead_faction_regionowner);
|
||||
// SUITE_ADD_TEST(suite, test_readwrite_dead_faction_group);
|
||||
DISABLE_TEST(suite, test_readwrite_dead_faction_group);
|
||||
return suite;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "prefix.h"
|
||||
|
||||
#include <kernel/config.h>
|
||||
#include <kernel/plane.h>
|
||||
#include <kernel/region.h>
|
||||
#include <kernel/terrain.h>
|
||||
#include <kernel/item.h>
|
||||
|
@ -47,7 +48,7 @@ struct region *test_create_region(int x, int y, const terrain_type *terrain)
|
|||
{
|
||||
region *r = findregion(x, y);
|
||||
if (!r) {
|
||||
r = new_region(x, y, NULL, 0);
|
||||
r = new_region(x, y, findplane(x, y), 0);
|
||||
}
|
||||
if (!terrain) {
|
||||
terrain_type *t = get_or_create_terrain("plain");
|
||||
|
|
Loading…
Reference in New Issue