Update 1 changes

This commit is contained in:
Mike Rubits
2023-10-03 14:43:06 -04:00
parent 60f29560f3
commit 8dc1fc9794
67 changed files with 1806 additions and 1479 deletions

View File

@@ -279,6 +279,8 @@ void BeginIntermission(edict_t *targ)
game.autosaved = false;
level.intermissiontime = level.time;
// respawn any dead clients
for (uint32_t i = 0; i < game.maxclients; i++)
{
@@ -286,10 +288,17 @@ void BeginIntermission(edict_t *targ)
if (!client->inuse)
continue;
if (client->health <= 0)
{
// give us our max health back since it will reset
// to pers.health; in instanced items we'd lose the items
// we touched so we always want to respawn with our max.
if (P_UseCoopInstancedItems())
client->client->pers.health = client->client->pers.max_health = client->max_health;
respawn(client);
}
}
level.intermissiontime = level.time;
level.intermission_server_frame = gi.ServerFrame();
level.changemap = targ->map;
level.intermission_clear = targ->spawnflags.has(SPAWNFLAG_CHANGELEVEL_CLEAR_INVENTORY);
@@ -754,6 +763,7 @@ void G_SetStats(edict_t *ent)
ent->client->ps.stats[STAT_ACTIVE_WHEEL_WEAPON] = (ent->client->newweapon ? ent->client->newweapon->weapon_wheel_index :
ent->client->pers.weapon ? ent->client->pers.weapon->weapon_wheel_index :
-1);
ent->client->ps.stats[STAT_ACTIVE_WEAPON] = ent->client->pers.weapon ? ent->client->pers.weapon->weapon_wheel_index : -1;
//
// ammo