Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TTT: Added check if player can carry loadout weps #1313

Merged
merged 2 commits into from Jan 2, 2017

Conversation

markusmarkusz
Copy link
Contributor

This check can prevent problems with addons that loadouts give to players.
It could cause problems with addons, such as Pointshop 2, Power Rounds, or similiar.
If, for example, you get a special crowbar through a Pointshop, TTT would try to give it the original one. If you were a detective, you would have endless DNA scanners as they are automatically supplemented.

@robotboy655 robotboy655 added the TTT The pull request is for TTT and will be handled by svdm. label Dec 31, 2016
@MyDimeIsUp
Copy link
Contributor

MyDimeIsUp commented Jan 1, 2017

[ERROR] gamemodes/terrortown/gamemode/player_ext_shd.lua:66: attempt to index local 'wep' (a number value)
  1. __index - [C]:-1
   2. CanCarryWeapon - gamemodes/terrortown/gamemode/player_ext_shd.lua:66
    3. GiveLoadoutWeapons - gamemodes/terrortown/gamemode/weaponry.lua:62
     4. Call - gamemodes/terrortown/gamemode/weaponry.lua:160
      5. unknown - gamemodes/terrortown/gamemode/player.lua:85
       6. Spawn - [C]:-1
        7. SpawnForRound - gamemodes/terrortown/gamemode/player_ext.lua:295
         8. SpawnWillingPlayers - gamemodes/terrortown/gamemode/init.lua:562
          9. unknown - gamemodes/terrortown/gamemode/init.lua:413

I'll look into and hopefully get PR out

@Bo98
Copy link
Contributor

Bo98 commented Jan 1, 2017

Yes, this should probably be ply:CanCarryType

@markusmarkusz
Copy link
Contributor Author

@Bo98
You're right. I'm wondering why I haven't noticed this before.

@svdm svdm merged commit e19e9a4 into Facepunch:master Jan 2, 2017
@markusmarkusz markusmarkusz deleted the patch-11 branch February 26, 2017 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TTT The pull request is for TTT and will be handled by svdm.
Projects
None yet
5 participants