p_mobj.c
/*
=================
=
= P_MapThingSpawnsMobj
=
= Returns false for things that don't spawn a mobj
==================
*/
P_MapThingSpawnsMobj
Returns false for things that don't spawn a mobj
P_MapThingSpawnsMobj Returns false for things that don ' t spawn a mobj
boolean P_MapThingSpawnsMobj (mapthing_t* mthing)
{
	int			i, bit;
	if (mthing->type == 11)
		return false;
#if 0
	if (mthing->type > 4)
		return false;	
#endif
	if (mthing->type <= 4)
		return false;
	if ((netgame != gt_deathmatch) && (mthing->options & 16))
		return false;
	if (gameskill == sk_baby)
		bit = 1;
	else if (gameskill == sk_nightmare)
		bit = 4;
	else
		bit = 1 << (gameskill - 1);
	if (!(mthing->options & bit))
		return false;
	if (sprites[SPR_PLAY].numframes == 1)
	{
		if (mthing->type == 10 || mthing->type == 12)	
			mthing->type = 18;		
	}
	if (netgame != gt_deathmatch)
		return true;
	for (i = 0; i < NUMMOBJTYPES; i++)
	{
		if (mthing->type == mobjinfo[i].doomednum)
			if (mobjinfo[i].flags & (MF_NOTDMATCH | MF_COUNTKILL))
				return false;
	}
	return true;
}
boolean P_MapThingSpawnsMobj ( mapthing_t * mthing ) { int i , bit ; if ( mthing -> type == 11 ) return false ; #if 0 if ( mthing -> type > 4 ) return false ; #endif if ( mthing -> type <= 4 ) return false ; if ( ( netgame != gt_deathmatch ) && ( mthing -> options & 16 ) ) return false ; if ( gameskill == sk_baby ) bit = 1 ; else if ( gameskill == sk_nightmare ) bit = 4 ; else bit = 1 << ( gameskill - 1 ) ; if ( ! ( mthing -> options & bit ) ) return false ; if ( sprites [ SPR_PLAY ] . numframes == 1 ) { if ( mthing -> type == 10 || mthing -> type == 12 ) mthing -> type = 18 ; } if ( netgame != gt_deathmatch ) return true ; for ( i = 0 ; i < NUMMOBJTYPES ; i ++ ) { if ( mthing -> type == mobjinfo [ i ] . doomednum ) if ( mobjinfo [ i ] . flags & ( MF_NOTDMATCH | MF_COUNTKILL ) ) return false ; } return true ; }
P_MapThingSpawnsMobj
Returns false for things that don't spawn a mobj
P_MapThingSpawnsMobj Returns false for things that don ' t spawn a mobj
/* count deathmatch start positions */ /* check for players specially */ /*DEBUG */ /* check for apropriate skill level */ /* hack player corpses into something else, because player graphics */ /* aren't included */ /* player corpse */ /* possessed human corpse */ /* find which type to spawn */ /* don't spawn keycards and players in deathmatch */