/** * @brief Ensures client-side prediction has the current collision model at its * disposal. */ void Cl_UpdatePrediction(void) { // ensure the world model is loaded if (!Com_WasInit(QUETOO_SERVER) || cl.demo_server || !Cm_NumModels()) { int64_t bs; const char *bsp_name = cl.config_strings[CS_MODELS]; const int64_t bsp_size = strtoll(cl.config_strings[CS_BSP_SIZE], NULL, 10); Cm_LoadBspModel(bsp_name, &bs); if (bs != bsp_size) { Com_Error(ERROR_DROP, "Local map version differs from server: " "%" PRId64 " != %" PRId64 "\n", bs, bsp_size); } } // load the BSP models for prediction as well for (uint16_t i = 1; i < MAX_MODELS; i++) { const char *s = cl.config_strings[CS_MODELS + i]; if (*s == '*') { cl.cm_models[i] = Cm_Model(cl.config_strings[CS_MODELS + i]); } else { cl.cm_models[i] = NULL; } } }
/* * @brief Only called at Quetoo startup, not for each game. */ void Sv_Init(void) { memset(&svs, 0, sizeof(svs)); Cm_LoadBspModel(NULL, NULL); Sv_InitConsole(); Sv_InitLocal(); Sv_InitAdmin(); Sv_InitMasters(); }