/* ============= ExitLevel ============= */ void ExitLevel(void){ int i; edict_t *ent; char command [256]; level.exitintermission = 0; level.intermissiontime = 0; if(CTFNextMap()) return; Com_sprintf(command, sizeof(command), "gamemap \"%s\"\n", level.changemap); gi.AddCommandString(command); ClientEndServerFrames(); level.changemap = NULL; // clear some things before going to next level for(i = 0; i < maxclients->value; i++){ ent = g_edicts + 1 + i; if(!ent->inuse) continue; if(ent->health > ent->client->pers.max_health) ent->health = ent->client->pers.max_health; } }
/* ============= ExitLevel ============= */ void ExitLevel(void) { char command[256]; Com_sprintf(command, sizeof(command), "gamemap \"%s\"\n", level.changemap); gi.AddCommandString(command); level.changemap = NULL; level.exitintermission = 0; level.intermissiontime = 0; ClientEndServerFrames(); // clear some things before going to next level for (int i = 0; i < maxclients->value; i++) { edict_t *ent = g_edicts + 1 + i; if (ent->inuse) ent->health = min(ent->client->pers.max_health, ent->health); } //mxd. https://github.com/yquake2/xatrix/commit/291d9852ee54284127b046807f6dac9418e19dc6 gibsthisframe = 0; lastgibframe = 0; }