Skip to content

Commit

Permalink
Fixed SendToChat not sending colored text and made sure the mapList i…
Browse files Browse the repository at this point in the history
…s generated when p2mm_startsession is run.
  • Loading branch information
OrsellGaming committed Nov 6, 2024
1 parent 9007767 commit 45ae499
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion p2mm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ static int p2mm_startsession_CompletionFunc(const char* partial, char commands[C

CON_COMMAND_F_COMPLETION(p2mm_startsession, "Starts up a P2:MM session with a requested map.", 0, p2mm_startsession_CompletionFunc)
{
// If the map list is empty, generate it.
if (mapList.empty()) {
updateMapsList();
}

// Make sure the CON_COMMAND was executed correctly.
if (args.ArgC() < 2 || FStrEq(args.Arg(1), ""))
{
Expand Down Expand Up @@ -357,7 +362,7 @@ const char* __fastcall CPortal_Player__GetPlayerModelName_hook(CPortal_Player* t
if (CBaseEntity__GetTeamNumber((CBasePlayer*)thisptr) == TEAM_BLUE)
return "models/portal_stories/player/mel.mdl";
else
return "models/player/chell/player.mdl";
return "models/player/chell/player.mdl";
}
return CPortal_Player__GetPlayerModelName_orig(thisptr);
}
Expand Down
2 changes: 1 addition & 1 deletion vscript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static void SendToChat(const char* msg, int playerIndex)
recipient_filter.AddPlayer(playerIndex);
}

netmsg = engineServer->UserMessageBegin(&recipient_filter, 4, "SayText2");
netmsg = engineServer->UserMessageBegin(&recipient_filter, 3, "SayText");
netmsg->WriteByte(0);
netmsg->WriteString(msg);
netmsg->WriteByte(1);
Expand Down

0 comments on commit 45ae499

Please sign in to comment.