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

Projects
None yet
5 participants
@markusmarkusz
Contributor

markusmarkusz commented Dec 31, 2016

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 label Dec 31, 2016

@MrUnknownGamer

This comment has been minimized.

Contributor

MrUnknownGamer 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

This comment has been minimized.

Contributor

Bo98 commented Jan 1, 2017

Yes, this should probably be ply:CanCarryType

@markusmarkusz

This comment has been minimized.

Contributor

markusmarkusz commented Jan 1, 2017

@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 markusmarkusz:patch-11 branch Feb 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment