Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some achievements #47

Merged
merged 2 commits into from
May 7, 2023
Merged

Fix some achievements #47

merged 2 commits into from
May 7, 2023

Conversation

DmitryShaburov
Copy link
Contributor

@DmitryShaburov DmitryShaburov commented Apr 22, 2023

This PR fixes following achievements:

  • Rigorous Research
    Kill all the aliens with all the experiments

Issue: typo in if condition, was checking twice for m_exp1HeadcrabsKilled, ignoring m_exp2HeadcrabsKilled
Tested locally, achivements is working, amount of killed headcraps tracked correctly (5 in first and 7 in second)

  • Smells Like BBQ
    Fry the Gargantua

Issue: Frying Gargantua with electricity had no effect on achievement.
Added logging on pKiller->classname and pKiller->targetname and found that values in code doesn't match to what's happenning in game.
Updated classname to env_laser and targetname to gargbeams and got achievement

  • Fascinating Specimen
    Pick up an alien gib

Issue: achievement was working only with HD models (models/agibs.mdl).
Added OR condition for SD models (models/SD/agibs.mdl) and got achievement locally

  • Möbius trip
    Repeat the conveyor loop

Issue: interacting with push trigger had no effect on achievement, because it doesn't have SF_TRIG_PUSH_ONCE flag set.
For solution, I've moved entire achievement-related block with all if conditions inside else block of testing on SF_TRIG_PUSH_ONCE flag.
Again, tested locally and got achievement.

Update, fixed more achievements:

  • Explorer
    Get teleported to all of Nihilanth's spaces

On your advice on Discord, moved achivement logic from Nihilanth to ActivateMultiTrigger.
Achievement unlocks when player is teleported to last space with Gargantua

  • Limitless Potential
    Join the G-Man
  • Unwinnable Battle
    Don't join the G-Man

These achievements didn't had any code related to them.
Decompiled map and added logic to TeleportTouch:
If player in last map and gets teleported to end credits / last battle these achivements unlock.
Tested locally.

Update part two:

  • Pacifist
    Don't kill anything in the entire game (except Nihilanth and the Blast Pit tentacles ofc)

In Questionable Ethics upon entering the level with lobby, runaway saw machine was "killing" monster_scientist_dead. Added it as exception.

Comment on lines 2072 to 2090
if (pPlayer)
{
// residue processing map with all those conveyor belts
if (FStrEq(STRING(INDEXENT(0)->v.model), "maps/c2a4c.bsp"))
{
// trigger_push that player has to pass when taking the wrong turn and coming back to start
if (FStrEq(STRING(pev->model), "*78"))
{
ALERT(at_console, "RP_MOEBIUS TRIGGERED!!!\n");
UTIL_VRGiveAchievement(pPlayer, VRAchievement::RP_MOEBIUS);
}
}
}
}
Copy link
Contributor Author

@DmitryShaburov DmitryShaburov Apr 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it'd be better to merge all 3 conditions into one with &&
PS: accidentally commited print debug, will remove, sorry :D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment on lines +181 to +183
if (m_vrDragger
&& m_vrDragger->IsNetClient()
&& (FStrEq(STRING(pev->model), "models/agibs.mdl") || FStrEq(STRING(pev->model), "models/SD/agibs.mdl")))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also reformatted to multiline condition, otherwise line was quite long

@maxvollmer maxvollmer merged commit f9c5c8a into maxvollmer:dev May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants