// --------------------------------------------------------------------------
//
//	Version History
//
// --------------------------------------------------------------------------
//
//	v1.4	2017-07-17
//		Chainsaw has received an update, see below.
//		2 new weapons: Knife(slot 1) & Pistol(slot2)
//		New option menu, see below.
//		New keybind: Throw C4.
//		New keybind: Weapon special.
//		Railgun nightvision toggle now uses weapon special key instead of unload key.
//		Revolver cylinder spin now uses weapon special key instead of unload key.
//		Sniper rifle zoom change now uses weapon special key instead of unload key.
//		You can now roll handgrenades by pressing the new weapon special key, in addition to the reload key.
//		C-4(Weapon) now has a 20% chanse to spawn instead of a shotgun, once the player has a shotgun.
//		The hellish missile launchers primary fire will now allways fire homing projectiles, even if you don't have a target in sight.
//		Slightly increased the speed of the rocketlaunchers rockets.
//		Rifle and dual rifle moved to weapon slot 4
//		Revolver moved to weapon slot 2
//		Added new green blood sprites.
//		Added some new cacodemon gore stuff.
//		The green and blue blood has recieved some updates and should now look and behave much better.
//		Some slight changes to increase performance.
//		Fixed a bug where baron of hell and hellknights became totally confused upon meeting an invisible player.
//
//	v1.3	2017-03-29
//		The automatic shotguns reload can be cancelled with a kick.
//		The C-4 will bounce much less.
//		Pressing "unload" while zoomed with the railgun toggles nightvision on/off.
//		Slightly increased revolver reload.
//		Slightly increased sniper rifles fire speed and reload.
//		Increased drop rate of sniper magazines from 10% to 15%.
//		Reduced vertical recoil of the MP40.
//		Increased MP40 reload speed.
//		The rocketlauncher grenades will now bounce less.
//		The Hellish Missile Launcher has received an update, see below.
//		Updated some explosion, smoke, fire and plasma effects.
//		Some changes for better preformance.
//		The Super Shotgun will now spawn in Doom1 and FreeDoom1 maps.
//		Weapon casings will now spawn closer to the weapons extractor and behaves more realisticly.
//		The crosshair will dissapear when zoomed with the sniper and railgun.
//		Smoothed the middle-finger-sprites.
//		The Doom2 boss cubes that spawns demons has new sprites.
//
//	v1.2b	2017-02-13
//		Fixed a bug casuing the C4 to never spawn.
//
//	v1.2	2017-02-13
//		New weapon added: C4 explosives.
//		MP40 has received an update, see below.
//		Rocket launcher has received an update, see below.
//		Slightly increased AutoShotgun fire speed.
//		Reduced the charge time of the railgun.
//		Moved the new weapons to the back of weapon selection.
//		Added three new death animations to the cacodemon.
//		Made remaining cacodemon bodies destroyable.
//		Remade how casings behave when under water.
//		Fixed a bug where hellknights sometimes bled red blood.
//		Fixed a bug with green blodspots not showing properly.
//		Fixed a bug causing the blue blood pools to not show up.
//		Fixed a bug where cacodemon bodies and pieces sometimes had red blood.
//
//	v1.1	2017-01-22
//		Fixed all errors upon loading the mod.
//		Fixed a bug causing the new ammunition spawning when playing in classic mode.
//		Added support for zandronum (separate file) and the latest version of gzdoom.
//		The updated mugshot is now a seperate file with a complete HUD replacement.
//		Fixed sound errors of barons and knights.
//		Increased sniper rifle damage with 25%.
//		Increased droprate of green shells (4x) from 10% to 20%.
//		Increased droprate of green shellbox (20x) from 10% to 15%.
//		Increased green shells gained form backpacks from 4 to 12.
//		Slightly increased AutoShotgun reload speed.
//		AutoShotgun can now be fired mid reload, like the normal shotgun.
//		Railgun now has it's own unique ammo type which has a 15% chance to spawn instead of cells.
//		Increased railgun damage with 25%.
//		Increased railgun ammo capacity from 5 shots to 8 shots.
//		Updated graphics for railgun pickup.
//
//
//	V1.0	2017-01-14
//		Mod released on the internet.
//
//
// --------------------------------------------------------------------------
//
//	Overall changes and new features. More details below.
//
// --------------------------------------------------------------------------
//	
//	This PK3 is made for Brutal Doom v20b but should be compatible with any version.
//	These are the things included:
//
//	7 new weapons:
//		Combat knife, Pistol, Revolver, Automatic shotgun, Sniper rifle, Railgun, C4 and Detonator
//
//	7 new items:
//		9mm magazines, Revolver bullets, Sniper magazine, Railgun Core, C4 Explosives, 4x and 20x Shells for the Automatic shotgun
//
//	Updated weapons:
//		Chainsaw
//		Hand grenades
//		Rocketlauncher
//		MP40
//		Hellish Missile Launcher
//
//	Updated enemies:
//		Baron of hell
//		Hellknight
//		Cacodemon
//
//	Updated casings behaviour.
//
//	A new "taunt" sound: "Eat shit hellspawn!"
//
//	New modern hud with updated sprites for Doomguys portrait.
//
//	Updated some explosion, smoke, fire and plasma effects.
//
//	The Super Shotgun will now spawn in Doom1 and FreeDoom1 maps. (Where? Well, thats a secret.)
//
//	Some updated and smoothed sprites.
//
//	New options menu and keybindings.
//
//
// --------------------------------------------------------------------------
//
//	New weapons
//
// --------------------------------------------------------------------------
//
//	I have put a lot of time in each of the new weapons.
//	Attention to detail and making the weapon fun to use has been the primary goal.
//	The new weapons can spawn in three places:
//	* They replace the chainsaw once you have picked one up.
//	* They have a 25% chance to spawn instead of a Computer Area Map.
//	* They have a 20% chance to spawn instead of another weapon. See their descriptions.
//
//	Knife (slot 1)
//		The weapon is currently in beta.
//		You can only get this weapon by select to start with it, or summon it with the console.
//		The knife is a completely silent weapon with thje ability to "stunlock" enemies because of it's high pain-state.
//		More stuff regarding the knife will come in a future update.
//
//	Pistol (slot2)
//		The beretta uses 9mm ammunition (together with the MP40) and can either be found besides
//		the bodies of your fellow marines, or be selected as a starting weapon.
//		Two attachements (upgrades) to the pistol can be found:
//		Flashlight - turn on the flashlight by pressing the weapon special key.
//		Silencer - turns the weapon silent.
//
//	Revolver (slot 2)
//		Each shot deals heavy damage and has a 10% chance to do a critical hit.
//		The weapon is wonderful against Barons, Knights and Cacodemons in close-range.
//		Altfire fires faster but is less accurate.
//		Pressing "weapon special" will spin the cylinder.
//		Spinning the cylinder is working 100% and is not just cosmetic, meaning that
//		you can play russian roulette against your enemies. Kinda useless, but fun.
//		Revolver bullets has a 10% chance to spawn instead of a ClipBox.
//		Has a 20% chance to spawn instead of a minigun.
//
//	Automatic Shotgun (slot 3)
//		Each shot fires 6 pellets, but each pellet deals about double damage compared to
//		those from the normal shotgun and ssg, making the automatic shotgun more
//		powerful even without the increased firing speed.
//		To balance the weapon I had to introduce a second type of shotgun ammunition.
//		The green shells has a 20% chance to replace normal shells and 15% chance to replace shellboxes.
//		Has a 20% chance to spawn instead of a super shotgun.
//
//	Sniper Rifle (slot 5)
//		The best long-range weapon. Best used against smaller enemies.
//		Sniping down comandos feels so satisfying.
//		Altfire toggles the scope. Which can toggle between 4x, 8x and 16x zoom
//		by Pressing "weapon special" while using the scope.
//		Sniper magazines has a 15% chance to spawn instead of a Clip.
//		Has a 20% chance to spawn instead of a rocket launcher.
//		
//	Railgun (slot 6)
//		The railgun is able to fire through smaller enemies, making it great against smaller
//		units standing in a line. The visible railtrail is just cosmetic, so don't worry
//		if it looks like the rail is missing the targets. The weapon is 100% accurate.
//		Altfire toggles the scope, which has a 2x zoom.
//		Pressing "weapon special" will toggle nightvision when using the scope.
//		Railgun cores has a 15% chance to spawn instead of a Cell.
//		Has a 20% chance to spawn instead of a plasmarifle.
//		
//	C-4 Explosives (slot 0)
//		Throw away C4s with primary fire. Detonate them with secondary fire.
//		The C-4 deals more damage than the grenades, but has a smaller radius.
//		A thrown C-4 can be disarmed and picked up again by walking up to it and pressing "use".
//		A single C-4 has a 5% chance to spawn instead of a rocket.
//		Has a 20% chance to spawn instead of a shotgun.
//
//
// --------------------------------------------------------------------------
//
//	Updated weapons
//
// --------------------------------------------------------------------------	
//
//	Chainsaw:
//		Smoothed animations.
//		Increased damage.
//		Weapon won't disappear when kicking or taunting.
//		Weapon will keep bloodstains when kicking or taunting.
//		Weapon won't turn silent when kicking or taunting.
//		Going on a killing spree with the chainsaw will give cruelty bonus (armor) and sometimes drop ammo.
//
//	Hand grenades:
//		The hand grenades have received some new animation sprites. For example
//		the "weapon" won't disappear when kicking or taunting. The animations
//		should feel more smooth over all.
//		Throwing a grenade at an enemy will now provoke it. Hehe.
//		Grenades can now be rolled by pressing "reload" or "weapon special".
//		If a grenade falls into water it will lose momentum and start to sink.
//
//	MP40:
//		New updated sprites and animations.
//		The weapon no longer disappears when kicking or taunting.
//		It now fires with a open bolt system, as it does in real life.
//		Slight increase in damage.
//		Slight increase in accuracy.
//		Slight increased altfire zoom.
//		The weapon no longer shares ammunition with the rifle and minigun,
//		but has it's own ammo added - 9mm magazines.
//		9mm magazines will spawn instead of regular clips if the player has found an MP40.
//		
//	Rocket Launcher:
//		Smoothed animations during reload.
//		The weapon no longer disappears when kicking or taunting.
//		Added altfire - fire rockets as timed grenades.
//		Bugfix: Weapon will no longer alert enemies when firing an empty weapon.
//
//	Hellish Missile Launcher:
//		Buffed projectile speed and damage.
//		Weapon won't disappear when kicking, taunting or throwing grenades.
//		Increased ammo upon pickup from 4 to 8.
//		Increased maximum ammunition from 50/100 to 100/200.
//		New altfire: Fire non-homing rockets.
//		Bugfix: Weapon won't alert enemies when displaying "NO TARGET".
//
//
// --------------------------------------------------------------------------
//
//	Updated enemies
//
// --------------------------------------------------------------------------	
//
//	Baron of Hell
//		Can use both hands in melee.
//		Can use both hands to throw missiles.
//		Will attack more frequently when taunted.
//		Will bleed green blood.
//		New death animations.
//		All corpses are now destroyable.
//		Increased speed so it's faster than the Hell Knight.
//		Increased health with 40%.
//		Bugfix: Walls will now always lower in Phobos Anomaly upon death.
//
//	Hell Knight
//		Can use both hands in melee.
//		Can use both hands to throw missiles.
//		Will attack more frequently when taunted.
//		Will bleed green blood.
//		New death animations.
//		All corpses are now destroyable.
//		Lowered speed so it's slower than the Baron of Hell.
//		Increased health with 40%.
//
//	Cacodemon
//		New projectile graphic.
//		Decreased speed when avoiding projectiles.
//		Will now attack more frequently.
//		All corpses are now destroyable.
//		Three new death animations added.
//		Will occasionally blink it's eye.
//		Increased health with 10%
//
//
// --------------------------------------------------------------------------
//
//	Other stuff
//
// --------------------------------------------------------------------------	
//
//	Casings
//		Will now fade out and disappear after ten minutes.
//		Will now spawn closer to the weapons extractor and behaves more realisticly.
//		Smoke has been added.
//		Speed, angle and rotation are now fully randomzied.
//
//	A new "taunt" sound: "Eat shit hellspawn!"
//
//	New modern hud with updated sprites for Doomguys portrait.
//
//
//	New option menu.
//		Each new weapon of this mod can be individually disabled.
//		The players starting weapon can be selected between fists/knife/pistol/rifle
//		The pistols flashlight is kinda heavy on performance, so it has three graphics options to select between. (GZDOOM only)
//
//	New keybinds
//		throw C4
//		weapon special
//
// --------------------------------------------------------------------------
//
//	Credits and contact information
//
// --------------------------------------------------------------------------
//
//	Hi!
//	My main goal with this mod has been a much more smooth Brutal Doom experience.
//	This PK3 is a light version of a bigger mod I've been working on for some years
//	which I made just for fun. I had at the beginning no intention to release
//	anything of it, therefore there might be some people missing in the credits.
//	I have really lost track of every sprite, sound and mod that I have used in
//	some way throughout the years. If you find some credits missing, please contact me.
//	daniel.kjellin.88@gmail.com
//
//
//	Baron & Knight
//		original sprites	SmoothDoom
//		original decorate	SergeantMarkIV
//		decorate & sprite edits done by me
//
//	Cacodemon
//		CDD1 sprites		SmoothDoom
//		CDD2 sprites		BeautifulDoom
//		CDD4 sprites		BeautifulDoom
//		original decorate	SergeantMarkIV
//		decorate & sprite edits done by me
//
//	Knife
//		original sprites	ScubaSteve
//		decorate & sprite edits done by me
//
//	Pistol
//		original decorate	JTC3 - "Brutal Pack"-mod
//		original sprites	DoomNukem
//		decorate & sprite edits done by me
//
//	Revolver
//		original sprites	DoomNukem
//		rotating cylinder	PillowBlaster
//		ammo pickup			copcap resident evil 2
//		decorate & sprite edits done by me
//
//	Automatic Shotgun
//		original sprites and decorate	Flammable4444
//		shellbox sprite original		Captain J
//		decorate & sprite edits done by me
//
//	Sniper Rifle
//		Original by TODM of realm667.com
//		decorate & sprite edits done by me
//
//	Railgun
//		original sprites	osjclatchford
//		railgun ammo made by me
//		decorate & sprite edits done by me
//
//	Grenades
//		original decorate	SergeantMarkIV
//		decorate & sprite edits done by me
//
//	Hell Launcher
//		sprites				Mike12
//		original decorate	SergeantMarkIV
//		decorate & sprite edits done by me
//
//	C-4
//		original sprites	DoomNukem
//		original decorate	saegiru
//		decorate & sprite edits done by me
//		scripts done by me
//
//	Doomguy head
//		original sprites	SmoothDoom
//		sprite edits done by me
//	
//	Casings
//		CASA, CASB, CASC done by me
//
//	Updated "cubes" of the Doom2 Boss
//		original sprites	Eriance/Amuscaria
//		sprite edits done by me
//
//	Flashlight
//		original model made by MarioDev @ sketchfab.com
//		https://sketchfab.com/models/56dd67db15444a6bb5b5cbf09a7f1294
//		conversion to sprites and edits done by me
//		original decorate from "Playstation doom for brutal doom"
//		decorate edits done by me