Skip to content

Conversation

@BDJslime-UnaverageJoe
Copy link

@BDJslime-UnaverageJoe BDJslime-UnaverageJoe commented Apr 13, 2024

Can also be used as a base to add TTT2's events
Currently needs a method to not load the events if appropriate custom TTT gamemode are not active

When log events are being parsed at client, a check is performed to update the local role table if the event was a role change and to continue parsing with the update.

For player deathlogs that do not receive the full round log, they instead receive a recent role table relative to the oldest event of the deathlog.

Deathscenes are not affected as they already gather player's current roles during the moment instead of referring to the table, it is unknown how feasible it is to implement role change within a deathscene.

@BDJslime-UnaverageJoe
Copy link
Author

Added checks on player death to prevent the report window from showing if the role has abilities involving respawning

@BDJslime-UnaverageJoe BDJslime-UnaverageJoe marked this pull request as ready for review April 18, 2024 03:38
@BadgerCode
Copy link
Owner

Heyo!

Just letting you, unfortunately I won't be able to look at this until sometime next week possibly.

Copy link
Owner

@BadgerCode BadgerCode left a comment

Choose a reason for hiding this comment

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

Heyo!
Sorry for the delay on this.

So this is changing a few things for TT2/CR TTT

  • Handle role changes during the round for CR TTT
  • Log role changes during the round for CR TTT
  • If a player in TTT2/CR TTT is respawning, don't get them to respond to reports

I've left some comments.

--Instant Respawn Cases
timer.Simple(1, function()
if ply:Alive() then return end
end)
Copy link
Owner

Choose a reason for hiding this comment

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

This doesn't do anything?


net.Start("DL_Death")
net.Send(ply)
end)
Copy link
Owner

Choose a reason for hiding this comment

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

We could simplify this function to always wait 5 seconds before requesting that the dead player replies to their reports.

--if CR_VERSION then
Damagelog:EventHook("TTTPlayerRoleChanged")
Damagelog:EventHook("TTTPlayerRoleChangedByItem")
Damagelog:EventHook("TTTPlayerSpawnForRound")
Copy link
Owner

Choose a reason for hiding this comment

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

Will these cause problems for the regular TTT or TTT2 gamemodes?

net.Start("DL_Delayed")
net.Send(ply)

timer.Create("RDM_RespawnDelay_" .. ply:SteamID64(), 5, 1, function()
Copy link
Owner

Choose a reason for hiding this comment

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

Would 5 seconds be long enough for the respawn mechanics?

Copy link

Choose a reason for hiding this comment

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

Unfortunately role respawns vary and are often controlled by cvars so a flat 5 second timer may not work.
I'm not completely clear on what this is doing so I can't offer advice, really.

Copy link
Owner

Choose a reason for hiding this comment

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

Maybe instead, we should look at closing the report window if a player is respawned (and the round is active).
This way, no matter how long it takes for them to be respawned, the report window won't get in the way.

If they've already started typing out a response, we should probably keep track of it.

Copy link
Author

@BDJslime-UnaverageJoe BDJslime-UnaverageJoe Jun 13, 2024

Choose a reason for hiding this comment

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

From what I'm commonly seeing, there are 3 kinds of role respawns,
Instant: Has an effect on death and usually doesn't state the respawning state during that small timeframe(Swapper)
Delayed: Respawns on a timer which usually doesn't last more than 5 +1 seconds (Zombie)
Conditional: Only respawns when a condition is fulfilled, which can range from happening instantly or never (Parasite)

The checks cover the first 2, while conditional has only 5-second grace before having to respond to reports.

@BDJslime-UnaverageJoe
Copy link
Author

BDJslime-UnaverageJoe commented Jan 23, 2025

Removed respawn checks are there are too many variations and instead implemented an option to only prompt reported players to respond instead of auto after death.
image

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.

3 participants