Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Crysis Co-op
- else if (strcmp(gameRulesName, "Coop") == 0/* && !gEnv->bServer*/)
- {
- if (mate)
- friendly = EFriend;
- else
- friendly = EEnemy;
- CCoopGrunt* pGrunt = static_cast<CCoopGrunt*>(tempActor);
- int iAlertnessState = 0;
- if (pGrunt)
- iAlertnessState = pGrunt->GetAlertnessState();
- if (unknownEnemyObject) //check whether the object is near enough and alerted
- {
- if (iAlertnessState < 1)
- continue;
- if (distSq > 225.0f)
- continue;
- else if (distSq > 25.0f)
- fAlpha -= 0.5f - ((225.0f - distSq) * 0.0025f); //fade out with distance
- if (tempActor && g_pGameCVars->g_difficultyLevel < 4) //new rule : once aggroing the player, enemies get added permanently
- AddToRadar(id);
- }
- if (1 == iAlertnessState)
- {
- fAlpha = 0.65f + fCos * 0.35f;
- friendly = EAggressor;
- }
- else if (2 == iAlertnessState)
- {
- fAlpha = 0.65f + fCos * 0.35f;
- friendly = ESelf;
- }
- else
- continue;
- } // ~Crysis Co-op
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement