FPtje/DarkRP — pull request #985 by Bo98 (2013-08-30 20:30:52+00:00)
Title: Misc fixes (part 1) - fixed 55 bugs

*The changelog will be updated if I fix anything between now and you merging this in case you are reading this by email*

In short, I went through everything and fixed bugs. Not finished yet though, but here's part 1. This includes important fixes to the hungermod which was pretty much broken as well as that F4 menu bug that fucked everything up.

So here's the changelog:

* **Fixed an issue where most interaction with DarkRP (Derma, chat commands) would cease to work after clicking "create vote/become job" without clicking on a team on the left of the F4 menu first.**
* Fixed hungermod Lua error on load.
* Fixed Lua error on eating food.
* Fixed AFK demote not demoting.
* Fixed an issue where you would be immediately demoted back into AFK mode after exiting AFK-demoted mode (forcing you to have to rejoin the server).
* Fixed an exploit where you can switch jobs while in AFK mode and earn that job's salary.
* Fixed being able to bypass the 'admin' field with jobs that require a vote.
* Fixed errors (model and Lua) when dropping a weapon with an empty world model.
* Fixed Lua error with the /showzombie command.
* Fixed multiple FAdmin logger Lua errors such as the error that occurs when you knock over a turret.
* Fixed Lua error when using the arrest stick, unarrest stick or stunstick and dying right after.
* Fixed Lua error if the player's RP information could not be retrieved from the MySQL server.
* Fixed a Lua error when using /buyvehicle with an invalid vehicle argument but valid in that it is in the AddCustomVehicle list.
* Fixed an occasional Lua error when using the arrest stick.
* Fixed the FAdmin change team player action button not setting the team correctly in DarkRP.
* Fixed the MOTD page not displaying on first use.
* Fixed the /buymicrowave command.
* Fixed an issue where SWEP:Deploy would not get called clientside after switching from a weapon_cs_base2 weapon.
* Fixed the player's speed being slow when dropping a weapon while aiming down the ironsights.
* Fixed MOTD screen being the wrong size for the model behind on some resolutions.
* Fixed gun lab discount rates not scaling with the production price.
* Fixed issues in the F4 menu that arise when there is no available job to switch to.
* Fixed an issue where you would be demoted to the wrong team if you tried to avoid demotion.
* Fixed the right panel in F4 job tab still detailing the job you switched to after reopening the F4 menu.
* Fixed F4 entity tabs not refreshing when opening the F4 menu.
* Fixed the FAdmin kick and ban Derma windows having very hard-to-read text.
* Fixed the teamChanged hook being called on the potentially wrong team in InitPostEntity.
* Fixed an issue where the door ram view model would not raise/lower correctly in a multiplayer environment.
* Fixed arrest stick, unarrest stick, stunstick and door ram view models being invisible if auto-switched to it after dropping a weapon.
* Fixed an issue where the arrest stick, unarrest stick and stunstick view model animations occasionally failed to work. This often happened after switching from third person into first person.
* Fixed another view model animation bug with the arrest stick, unarrest stick and stunstick that caused the animation to sometimes not play in a multiplayer environment. To help fix this, a subtle "idle" view model animation was added.
* Fixed an issue where your hands would be invisible on every c_model weapon when switching weapons from the pocket.
* Fixed (workaround) shit view model positions after reload.
* Fixed an issue where the lawboard would not wrap text correctly.
* Fixed /hitprice having an incorrect condition for the F1 menu.
* Fixed job and entity commands showing as green in the F1 menu regardless of its fields.
* Fixed /wanted, /unwanted and /warrant showing green in the F1 menu regardless of the job.
* Fixed /givelicense and /agenda showing green in the F1 menu regardless of the job (different bug than previous).
* Fixed /requestlicense always showing green in the F1 menu regardless if there are any mayors/chiefs/CPs or not.
* Fixed /requesthit showing green even if there are no hitmen on the server.
* Fixed /buy, /buyammo, /buyhealth, /jailpos and /addjailpos showing green regardless if is disabled in their corresponding configs or not.
* Fixed 'could not find player' error message being cryptic in the door administration console commands.
* Fixed some AFK notifications not using the language system.
* Fixed the "you won the vote because you are the only one on the server" notification falsely being displayed if the job cooldown hadn't expired, the team you are trying to change to is the same team as the one you are currently on or the team limit had been reached.
* Fixed the "unable to /lockdown or /unlockdown" notifications being undescriptive.
* Fixed the FAdmin jail quick action not unjailing when the player is jailed.
* Removed some unnecessary networking from the arrest baton, unarrest baton, stunstick and keys. This fixes a few side effects.
* Fixed the alignment of the FAdmin "you are getting kicked/banned" black screen messages.
* Fixed lockpick HUD overlapping door owner info.
* Fixed hunger HUD retracting too far to the left.
* Fixed lockpicking and weapon checking progress bars extending too far.
* Fixed some graphical glitches with the lockpick and weapon checker HUDs.
* Fixed padding of title in the menu dropdowns used in the FAdmin player action buttons.
* Fixed "sign this letter" button text being hard to read.
* Fixed the text on the FAdmin voice mute button being inconsistent to its different states.
* (not a bug) Removed some dead code.