-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Conversation
src/dlls/triggers.cpp
Outdated
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); | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
if (m_vrDragger | ||
&& m_vrDragger->IsNetClient() | ||
&& (FStrEq(STRING(pev->model), "models/agibs.mdl") || FStrEq(STRING(pev->model), "models/SD/agibs.mdl"))) |
There was a problem hiding this comment.
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
This PR fixes following achievements:
Kill all the aliens with all the experiments
Issue: typo in
if
condition, was checking twice form_exp1HeadcrabsKilled
, ignoringm_exp2HeadcrabsKilled
Tested locally, achivements is working, amount of killed headcraps tracked correctly (5 in first and 7 in second)
Fry the Gargantua
Issue: Frying Gargantua with electricity had no effect on achievement.
Added logging on
pKiller->classname
andpKiller->targetname
and found that values in code doesn't match to what's happenning in game.Updated
classname
toenv_laser
andtargetname
togargbeams
and got achievementPick 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 locallyRepeat 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 insideelse
block of testing onSF_TRIG_PUSH_ONCE
flag.Again, tested locally and got achievement.
Update, fixed more achievements:
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
Join the G-Man
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:
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.