View Single Post
Re: hacking monster_plugin
Old
  (#7)
BAStumm
Member
 
BAStumm's Avatar
 
Status: Offline
Posts: 138
Join Date: Jan 2004
Location: Spokane, WA USA
Default Re: hacking monster_plugin - 09-11-2004

weird... this code is NOT crashing...

Code:
	  if ( UTIL_IsPlayer(pEnt) )
 	  {
 		 // it's a player...
 
 
 			  // lets see if this monster shares same team as player if team based mod...
 			  if((pev->team != pEnt->v.team) || (pEnt->v.team == 0))
 			  {
 				 // testing
 				 printf("*** MONSTER TEAM IS  %i\n",pev->team);
 				 printf("*** MONSTER'S ENEMY TEAM IS  %i\n",pEnt->v.team);
 			  }
 
 					    iDist = ( pEnt->v.origin - pev->origin ).Length();
 
 					    if ( iDist <= iNearest )
 					    {
 							    iNearest = iDist;
 							    iBestRelationship = R_NM; // player is always nemsis
 							    pReturn = pEnt;
 					    }
 	  }






  
Reply With Quote