mirror of
https://github.com/id-Software/quake2-rerelease-dll.git
synced 2025-03-14 12:20:45 +00:00
CleanLevel changes
This commit is contained in:
parent
74549c4982
commit
ca9feaf675
1 changed files with 34 additions and 22 deletions
|
@ -1099,27 +1099,38 @@ void CleanLevel ()
|
|||
edict_t *ent;
|
||||
base = 1 + game.maxclients + BODY_QUEUE_SIZE;
|
||||
ent = g_edicts + base;
|
||||
action_weapon_num_t weapNum;
|
||||
action_item_num_t itemNum;
|
||||
action_ammo_num_t ammoNum;
|
||||
|
||||
for (i = base; i < globals.num_edicts; i++, ent++)
|
||||
{
|
||||
if (!ent->classname)
|
||||
continue;
|
||||
switch (ent->typeNum) {
|
||||
case IT_WEAPON_MK23:
|
||||
case IT_WEAPON_MP5:
|
||||
case IT_WEAPON_M4:
|
||||
case IT_WEAPON_M3:
|
||||
case IT_WEAPON_HANDCANNON:
|
||||
case IT_WEAPON_SNIPER:
|
||||
case IT_WEAPON_DUALMK23:
|
||||
case IT_WEAPON_KNIFE:
|
||||
switch (weapNum) {
|
||||
case MK23_NUM:
|
||||
case MP5_NUM:
|
||||
case M4_NUM:
|
||||
case M3_NUM:
|
||||
case HC_NUM:
|
||||
case SNIPER_NUM:
|
||||
case DUAL_NUM:
|
||||
case KNIFE_NUM:
|
||||
case GRENADE_NUM:
|
||||
case IT_ITEM_SLIPPERS:
|
||||
case IT_ITEM_SLIPPERS:
|
||||
case IT_ITEM_BANDOLIER:
|
||||
case IT_ITEM_VEST:
|
||||
case IT_ITEM_LASERSIGHT:
|
||||
case IT_ITEM_HELM:
|
||||
G_FreeEdict( ent );
|
||||
break;
|
||||
}
|
||||
switch (itemNum) {
|
||||
case SIL_NUM:
|
||||
case SLIP_NUM:
|
||||
case BAND_NUM:
|
||||
case KEV_NUM:
|
||||
case LASER_NUM:
|
||||
case HELM_NUM:
|
||||
G_FreeEdict( ent );
|
||||
break;
|
||||
}
|
||||
switch (ammoNum) {
|
||||
case MK23_ANUM:
|
||||
case MP5_ANUM:
|
||||
case M4_ANUM:
|
||||
|
@ -1127,14 +1138,15 @@ void CleanLevel ()
|
|||
case SNIPER_ANUM:
|
||||
G_FreeEdict( ent );
|
||||
break;
|
||||
default:
|
||||
if((ent->die == gib_die)
|
||||
|| (strcmp( ent->classname, "medkit" ) == 0)
|
||||
|| (strcmp( ent->classname, "decal" ) == 0)
|
||||
|| (strcmp( ent->classname, "splat" ) == 0)
|
||||
|| (strcmp( ent->classname, "shell" ) == 0))
|
||||
G_FreeEdict( ent );
|
||||
}
|
||||
|
||||
if((ent->die == gib_die)
|
||||
|| (strcmp( ent->classname, "medkit" ) == 0)
|
||||
|| (strcmp( ent->classname, "decal" ) == 0)
|
||||
|| (strcmp( ent->classname, "splat" ) == 0)
|
||||
|| (strcmp( ent->classname, "shell" ) == 0))
|
||||
G_FreeEdict( ent );
|
||||
|
||||
}
|
||||
|
||||
CleanBodies();
|
||||
|
|
Loading…
Reference in a new issue