Updated to 0008:

- No double effect on piston.
- Fixed weapon replacement when more mutators are added after the LCWeapons one, now LCWeapons doesn't have to be the last mutator on the list.
- ZP shots not blocked by upper part of ducking pawns' hitboxes.
- Fixed some log warning ocasionally seen on map switch.

Made by Higor.
- caco_fff@hotmail.com


Copy LCweapons_xxxx.u (xxxx being current version) and LCweapons.int to (UT)\System folder
Run the mutator LCWeapons_xxxx.LCMutator and don't forget to add said package to ServerPackages.

If there's an arena mutator the LCWeapons knows of, also load it and LCWeapons will attempt to do it's job.


===========
Before doing any changes, you should request for my assistance first.
I may get said changes up on a global release.


===========
SiegeIV version 12 and onwards:
Suppliers will detect LCWeapons, no need to edit settings

Older Siege:
The advanced weapon replacement system makes it so that player spawns with all weapons without any INI changes
Buildable weapons, or Skaarj weapons (if spawned after frame 0) will work as well.

Suppliers only do exact type checks, so these changes will be necessary on the Siege INI:
[Supplier Class Here]
Weapons[0]=LCWeapons_xxxx.LCEnforcer
Weapons[2]=LCWeapons_xxxx.LCShockRifle
Weapons[5]=LCWeapons_xxxx.LCMinigun2
Weapons[8]=LCWeapons_xxxx.LCSniperRifle



LCWeapons mutator is a standalone version+extension of the XC_LagCompensation mutator used in latest Siege builds, it can be described as a glorified ZP with some elements of full-serverside processing for hitscan weapons with some additions.

Sub-engines.
There's mainly 2 sub-engines in use depending on the weapons:

=== LC sub-engine ===
Characteristics:
- No functions called, 100% serverside processing.
- Impossible to hack.
- Usage of interpolated timeframes of older positions of Players and Monsters.
Weapons that implement this:
- Minigun
- Enforcer
- AsmdPulseRifle (SiegeXTreme, SiegeUltimate, SiegeIV)
- Unreal 1 Minigun (experimental).
- Impact Hammer (primary)
Limitations:
- Slight lack of precision in timeframes due to fluctuating pings.

=== ZP sub-engine ===
Characteristics:
- Zero obfuscation, relies on a huge amount of client-server security and integrity checks per shot.
- All replicated objects can be eligible for a shot.
- Eligibility of client hittable objects is easily changeable, and affects all ZP weapons (projectiles and moving pawns are chosen right now).
- If a non-eligible actor is shot, server does a normal trace ignoring the actors that are eligible, preventing double hitscan bugs.
- None of the old ZP bugs.
- Anti-speed hack prevents firing the weapon serverside if the client runs too fast or too slow.
- Usage of old timeframes if victim is a Player* for extra reliability and headshot integrity.
Weapons that implement this:
- Shock-Rifle
- InstaGib Rifle
- Sniper Rifle
Limitations
- Given the amount of security checks, packet loss or ping ping spikes can severely hurt the ZP engine by making shots not register.

Players*: Anything with a PRI counts, Bot, Bots and Botz classes included.


Implementations
Another characteristic is the simplicity of the code applied on the weapons themselves, while leaving all the complicated stuff to the engine actors.
Mixing said simplicity with how the LC/ZP code is very similar among said weapons, it makes the implementation of the system in any other hitscan weapon easy and mechanic.

Sub-weapons currently implemented:
- NYACovertSniper <-> ZP
- ChamRifle <-> ZP
- h4xRiflev3 <-> ZP
- MonsterHunt2Beta Rifle <-> ZP
- SunlightShockRifle <-> ZP (loaded from AWM_Beta1)
- Liandri Minigun <-> LC
- SiegeInstagibRifle <-> ZP (SiegeUltimate, SiegeIV)
- Some small weapon variations from AWM_Beta1.u
(this is a showcase, more to come, you may ask for your own weapon set implemented)


Enhanced inventory replacement
Using a combination of Mutator/SpawnNotify methods, weapons are more reliably replaced, allowing other code to still interact with weapons they create (although replaced) without losing the actor reference.
With this method, a mutator won't break any automatic 'GiveTo' commands used when respawning players (or monsters with weapons), or any specific modifications a weapon may have in runtime the moment it is created.
Also, LC Weapon variants carry their old relatives' PickupAmmoCount and AmmoName variations to themselves and will respawn without losing these custom properties.

Other features
Clients can now use boosters (only Kickers) smoothly as if they were the local player.
Automatic bind scanner to make the new weapons work.
Weapon switching and firing has no delay, and pending weapon is highlighted just like in offline mode.
Compatible with ExtendedClientMove plugin for better movement compensation.

Generic arena mutator
The generic arena mutator detects a known generic arena and will replace it with it's own implementation, which is extremely flexible allowing it to replicate the behaviour of said old arena mutators while replacing the intended weapon with a version that has a LC/ZP engine applied on it, which also works with PURE binds.

Known arena mutators that can be processed:
- SniperArena
- ShockArena
- ImpactArena
- InstaGibDM
- NYACovertSniper_RIFLEMutator
- h4x_HeadshotMut
(more can be added)

When replacing a custom arena, DO NOT GET RID of the original package, nor remove it from ServerPackages list, simply load the LCMutator and then load the arena you want to run!
Textures, sounds and other resources are taken from said packages to remain versatile and size efficient.

Version note:
If setting up on a Siege server, read the installation notes for instructions on fixing the Suppliers (method is analogous, yet shorter than for ZeroPing).
Coop and MH servers are great candidates for testing given the fact both ZP and LC sub-engines track monsters.
