TTT: Remove old fretta rests #1223

Merged
merged 2 commits into from Aug 4, 2016

Projects

None yet

5 participants

@markusmarkusz
Contributor

In GM 13 fretta is no longer available.
And there is also no replacement.
So this PR would remove all rests of fretta because they are no longer needed.

If this get aproved:
https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/gamemode/cl_voice.lua#L63-L69
Is this also a part of fretta vote?

@bmwalters
Contributor
bmwalters commented Aug 3, 2016 edited

This may break the popular TTT Mapvote addon

@robotboy655 robotboy655 added the TTT label Aug 3, 2016
@robotboy655
Collaborator
robotboy655 commented Aug 3, 2016 edited

You should not be removing gamemode functionality by removing hooks. ( TTTDelayRoundStartForVote )

@markusmarkusz
Contributor

@robotboy655 @bmwalters
I'll re-add the hook.
Until this I close this PR.

@markusmarkusz markusmarkusz reopened this Aug 3, 2016
@markusmarkusz
Contributor
markusmarkusz commented Aug 3, 2016 edited

Now it shouldn't break something.

(And what about "ttt_always_use_mapcycle"? It's also not used anymore.)

@svdm
Collaborator
svdm commented Aug 4, 2016

This mapvote version which has a bunch of workshop subscribers actually has TTT-specific stuff, but it doesn't actually seem to use hooks (whelp).

@svdm svdm merged commit 6475996 into garrynewman:master Aug 4, 2016
@markusmarkusz
Contributor

I assume that no addon use this hook.
Normally addon creators use TTTEndRound or CheckForMapSwitch.
I think it's because TTTDelayRoundStartForVote is called in PrepareRound. So this is called after CheckForMapSwitch and TTTEndRound. And if there are no rounds left no new round would be started.
TTTDelayRoundStartForVote is maybe the dumbest function in TTT. It has no use.
And could it be that this should be:

timer.Simple(15, game.LoadNextMap())

game.LoadNextMap is not a function. game.LoadNextMap() is a function.
What about the things I also said? ("ttt_always_use_mapcycle"-ConVar and cl_voice.lua L63-L69)
They are also not used in anywhere.

@bigdogmat
bigdogmat commented Aug 4, 2016 edited

game.LoadNextMap is not a function. game.LoadNextMap() is a function.

game.LoadNextMap is a function, game.LoadNextMap() is a function call. Functions are first class values in Lua, and such they're passed just like normal variables.

Edit: To be a bit clearer on what would happen, game.LoadNextMap would get called, return no value, finally timer.Simple would be called with nothing as its second parameter.

@markusmarkusz
Contributor

Ah.

timer.Simple(15, game.LoadNextMap)

This is working. Maybe I misunderstood it.

@markusmarkusz markusmarkusz deleted the unknown repository branch Sep 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment