Skip to content

Commit

Permalink
fix erroneous position update and remove restriction (#396)
Browse files Browse the repository at this point in the history
- Don't set the client's position for no reason
- Don't stop positions other than wit from recording testimony
  • Loading branch information
in1tiate authored Feb 4, 2025
1 parent f332def commit b1b06cc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/packet/packet_ms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,7 @@ AOPacket *PacketMS::validateIcPacket(AOClient &client) const
client_name = client.character(); // fallback in case of empty ooc name
}
if (area->testimonyRecording() == AreaData::TestimonyRecording::RECORDING || area->testimonyRecording() == AreaData::TestimonyRecording::ADD) {
if (!l_args[5].startsWith("wit"))
return PacketFactory::createPacket("MS", l_args);

// -1 indicates title
if (area->statement() == -1) {
l_args[4] = "~~-- " + l_args[4] + " --";
l_args[14] = "3";
Expand Down Expand Up @@ -445,7 +443,6 @@ AOPacket *PacketMS::validateIcPacket(AOClient &client) const

QRegularExpressionMatch match = isTestimonyJumpCommand(client.decodeMessage(l_args[4])); // Get rid of that pesky encoding, then do the fun part
if (match.hasMatch()) {
client.m_pos = "wit";
int jump_idx = match.captured("int").toInt();
auto l_statement = area->jumpToStatement(jump_idx);
l_args = l_statement.first;
Expand Down

0 comments on commit b1b06cc

Please sign in to comment.