mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	Never spawn MT_NULL
(cherry picked from commit a8c658b545e3c7709212a43489163f33ffbe91f0)
This commit is contained in:
		
							parent
							
								
									72342338b1
								
							
						
					
					
						commit
						707f487f92
					
				
					 1 changed files with 11 additions and 1 deletions
				
			
		
							
								
								
									
										12
									
								
								src/p_mobj.c
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/p_mobj.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -9876,7 +9876,17 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
 | 
			
		|||
	const mobjinfo_t *info = &mobjinfo[type];
 | 
			
		||||
	SINT8 sc = -1;
 | 
			
		||||
	state_t *st;
 | 
			
		||||
	mobj_t *mobj = Z_Calloc(sizeof (*mobj), PU_LEVEL, NULL);
 | 
			
		||||
	mobj_t *mobj;
 | 
			
		||||
 | 
			
		||||
	if (type == MT_NULL)
 | 
			
		||||
	{
 | 
			
		||||
#ifdef PARANOIA
 | 
			
		||||
		I_Error("Tried to spawn MT_NULL\n");
 | 
			
		||||
#endif
 | 
			
		||||
		return NULL;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	mobj = Z_Calloc(sizeof (*mobj), PU_LEVEL, NULL);
 | 
			
		||||
 | 
			
		||||
	// this is officially a mobj, declared as soon as possible.
 | 
			
		||||
	mobj->thinker.function.acp1 = (actionf_p1)P_MobjThinker;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue