X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=world.h;h=216e67c9c4e7e9a90d587319dec910b7035ed3a4;hb=b380fc3aeb3d0e5d5c2b6cfd69d82c85c21999c7;hp=f591cbac36026bb876785c40a62fd7f098039409;hpb=5fbf1b000aeab4cc583f562a35cf0dddef63aa52;p=xonotic%2Fdarkplaces.git diff --git a/world.h b/world.h index f591cbac..216e67c9 100644 --- a/world.h +++ b/world.h @@ -41,6 +41,11 @@ typedef struct link_s typedef struct world_s { + // convenient fields + char filename[MAX_QPATH]; + vec3_t mins; + vec3_t maxs; + int areagrid_stats_calls; int areagrid_stats_nodechecks; int areagrid_stats_entitychecks; @@ -66,7 +71,9 @@ void World_InsertLinkBefore(link_t *l, link_t *before, int entitynumber); void World_Init(void); // called after the world model has been loaded, before linking any entities -void World_Clear(world_t *world); +void World_SetSize(world_t *world, const char *filename, const vec3_t mins, const vec3_t maxs); +// unlinks all entities (used before reallocation of edicts) +void World_UnlinkAll(world_t *world); void World_PrintAreaStats(world_t *world, const char *worldname); @@ -78,7 +85,7 @@ void World_UnlinkEdict(struct prvm_edict_s *ent); void World_LinkEdict(world_t *world, struct prvm_edict_s *ent, const vec3_t mins, const vec3_t maxs); // returns list of entities touching a box -int World_EntitiesInBox(world_t *world, vec3_t mins, vec3_t maxs, int maxlist, struct prvm_edict_s **list); +int World_EntitiesInBox(world_t *world, const vec3_t mins, const vec3_t maxs, int maxlist, struct prvm_edict_s **list); #endif