Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. // Crysis Co-op
  2. else if (strcmp(gameRulesName, "Coop") == 0/* && !gEnv->bServer*/)
  3. {
  4. if (mate)
  5. friendly = EFriend;
  6. else
  7. friendly = EEnemy;
  8.  
  9. CCoopGrunt* pGrunt = static_cast<CCoopGrunt*>(tempActor);
  10.  
  11. int iAlertnessState = 0;
  12.  
  13. if (pGrunt)
  14. iAlertnessState = pGrunt->GetAlertnessState();
  15.  
  16. if (unknownEnemyObject) //check whether the object is near enough and alerted
  17. {
  18. if (iAlertnessState < 1)
  19. continue;
  20. if (distSq > 225.0f)
  21. continue;
  22. else if (distSq > 25.0f)
  23. fAlpha -= 0.5f - ((225.0f - distSq) * 0.0025f); //fade out with distance
  24.  
  25. if (tempActor && g_pGameCVars->g_difficultyLevel < 4) //new rule : once aggroing the player, enemies get added permanently
  26. AddToRadar(id);
  27. }
  28.  
  29. if (1 == iAlertnessState)
  30. {
  31. fAlpha = 0.65f + fCos * 0.35f;
  32. friendly = EAggressor;
  33. }
  34. else if (2 == iAlertnessState)
  35. {
  36. fAlpha = 0.65f + fCos * 0.35f;
  37. friendly = ESelf;
  38. }
  39. else
  40. continue;
  41.  
  42. } // ~Crysis Co-op
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement