Skip to content

Commit

Permalink
fix: sar_get_partner_id
Browse files Browse the repository at this point in the history
Added a print upon failing if check, and added extra condition to if check. This condition was needed in the case where you are in a co-op game, then leave, and try to the run to command. Before it would just print "0" in console after doing so.
  • Loading branch information
tricksurf authored and ThisAMJ committed Jan 3, 2024
1 parent 561806b commit cf5ed15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Features/ConfigPlus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,8 @@ static Condition *ParseCondition(std::queue<Token> toks) {
// }}}

CON_COMMAND_F(sar_get_partner_id, "sar_get_partner_id - Prints your coop partner's steam id\n", FCVAR_DONTRECORD) {
if (!engine->IsCoop() || engine->IsSplitscreen()) {
if (!engine->IsCoop() || engine->IsSplitscreen() || !strcmp("0", engine->GetPartnerSteamID32().c_str())) {
console->Print("This command only works in online co-op.\n");
return;
}
console->Print("%s\n", engine->GetPartnerSteamID32().c_str());
Expand Down

0 comments on commit cf5ed15

Please sign in to comment.