TTT: Remove some unused vars and fix some smaller things #1220

Merged
merged 2 commits into from Jul 31, 2016

Projects

None yet

5 participants

@markusmarkusz
Contributor
markusmarkusz commented Jul 29, 2016 edited

Changes made:

  • garrysmod/gamemodes/terrortown/entities/entities/ttt_flame.lua:
    • Removed unused commented ENT.Model. (Does this entity need a model?)
  • garrysmod/gamemodes/terrortown/entities/weapons/weapon_ttt_m16.lua:
    • Moved SWEP.ViewModelFlip and SWEP.ViewModelFOV to the client part
  • garrysmod/gamemodes/terrortown/entities/weapons/weapon_ttt_push.lua:
    • Removed SWEP.AutoSpawnable because it isn't needed to set this to false as long this is a equipment item.
    • Removed double SWEP.Primary.Ammo.
  • garrysmod/gamemodes/terrortown/entities/weapons/weapon_ttt_sipistol.lua:
    • Changed SWEP.Primary.ClipMax to 60 because MaxAmmo from item_ammo_pistol_ttt is 60. This would cause that for example a pistol could have more ammo. See:
      image
    • Same thing can happen with custom sweps. At the moment I don't know any "good" way to make a general fix for this ^^
  • garrysmod/gamemodes/terrortown/entities/weapons/weapon_ttt_stungun.lua:
    • Removed SWEP.AutoSpawnable because it isn't needed to set this to false as long this is a equipment item.
  • garrysmod/gamemodes/terrortown/entities/weapons/weapon_ttt_teleport.lua:
    • Removed unused function argument from SWEP:TeleportRecall()
  • garrysmod/gamemodes/terrortown/gamemode/gamemsg.lua:
    • Changed p:Alive() to p:IsTerror() because it can cause bugs in some cases because for example spectators have ROLE_INNOCENT as role.

These changes aren't very important and not essential.
If I made something wrong then please tell it to me so I can change this. :)

(btw. there are some (maybe) bugs that I don't know how to fix. Whom should/can I send them?)

@robotboy655 robotboy655 added the TTT label Jul 29, 2016
@MinIsMin
Contributor
MinIsMin commented Jul 29, 2016 edited

Is working for me and my server (and clients).

@markusmarkusz markusmarkusz changed the title from TTT: Remov some unused vars and fix some smaller things to TTT: Remove some unused vars and fix some smaller things Jul 30, 2016
@markusmarkusz
Contributor

Changes made:

  • garrysmod/gamemodes/terrortown/entities/weapons/weapon_ttt_sipistol.lua:
    • Changed "weapons/usp/usp1.wav" to "Weapon_USP.SilencedShot"
@svdm svdm self-assigned this Jul 30, 2016
@svdm svdm merged commit 9b74bd9 into garrynewman:master Jul 31, 2016
@markusmarkusz
Contributor
markusmarkusz commented Jul 31, 2016 edited

@svdm
Will there be a general fix for that problem that you can have more ammo than MaxAmmo is?
At the moment I don't really know a good general fix. And this bug is stupid and I think it's better if there is a fix from gmod self. q:

@Kefta
Contributor
Kefta commented Jul 31, 2016

@markusmarkusz There really needs to be an engine fix for this

@svdm svdm removed their assignment Aug 1, 2016
@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