1
This commit is contained in:
parent
6efaccf258
commit
992141d3d8
@ -292,6 +292,7 @@ void Room::CreateThings()
|
|||||||
if (thing_tpl.i->weight() >= rand() % 10000) {
|
if (thing_tpl.i->weight() >= rand() % 10000) {
|
||||||
int thing_id = thing_tpl.RandThing();
|
int thing_id = thing_tpl.RandThing();
|
||||||
MetaData::MapThing* thing_meta = MetaMgr::Instance()->GetMapThing(thing_id);
|
MetaData::MapThing* thing_meta = MetaMgr::Instance()->GetMapThing(thing_id);
|
||||||
|
assert(thing_meta);
|
||||||
if (thing_meta) {
|
if (thing_meta) {
|
||||||
if (thing_meta->i->is_house()) {
|
if (thing_meta->i->is_house()) {
|
||||||
CreateBuilding(thing_id, thing_tpl.i->x(), thing_tpl.i->y());
|
CreateBuilding(thing_id, thing_tpl.i->x(), thing_tpl.i->y());
|
||||||
@ -424,6 +425,7 @@ Obstacle* Room::CreateObstacle(int id, float x, float y)
|
|||||||
[] (Obstacle*)
|
[] (Obstacle*)
|
||||||
{
|
{
|
||||||
});
|
});
|
||||||
|
assert(entity);
|
||||||
if (entity) {
|
if (entity) {
|
||||||
entity->BroadcastFullState();
|
entity->BroadcastFullState();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user