Random items mutator and item system revamp
This mutator randomly replaces items on the map and adds random loot from killing players. Detailed description is here.
Unfortunately, the code didn't have proper support for spawning items so TimePath and I had to refactor a lot.
m_canonical_spawnfunc- weird name. Specifies the classname which will be forced for that item. So all items now obey it.
m_spawnfunc_hookreplace- Function that is used to replace item definitions.
SPAWNFUNC_ITEM- new way to define spawnfunc for items. Calls
StartItemwith specified item definition.
SPAWNFUNC_WEAPON- new way to define spawnfunc for weapons. Calls
weapon_defaultspawnfuncwith specified item definition.
ITEM_FLAG_NORMAL- indicates that item is usable during normal gameplay. Some items, such as new toys, have this flag too.
ITEM_FLAG_INSTAGIB- indicates that item is usable during instagib.
ITEM_FLAG_OVERKILL- indicates that item is usable during overkill.
ITEM_FLAG_MUTATORBLOCKED- if set, items with this flag will not be spawned.
Item_Create- spawns a new map item.
Item_Initialize- initializes already spawned entity as item.
Item_CreateLoot- creates loot.
Item_InitializeLoot- initializes already spawned entity as loot.
Item_IsLoot- checks if item is loot. Replaces old
Item_SetLoot- sets the item loot status.
Item_IsExpiring- checks if item is expiring, i.e. it's superweapon, strength and shield time ticking while it is on the ground.
Item_SetExpiring- sets item expiring status.
ItemTouchedhook - called after item has been touched.
m_isreplaced- holds whether weapon has been replaced. Replaces old
- Devastator now has
- HLAC now has
- Mine Layer now has
- Mortar now has
- Rifle now has
- TAG Seeker now has
- Vortex now has
- Shield now has
droppedweaponclassname was completely removed.
replacedweaponclassname was completely removed.
g_instagib_invisibility_time- time in seconds of the invisibility powerup.
g_instagib_speed_time- time in seconds of the speed powerup.
- Vaporizer cells now have
- Extra life now has
- Invisibility now has
- Speed now has
- Invisibility and Speed now glow and have correct sounds as their vanilla counterparts.
- Overkill now uses
ITEM_FLAG_MUTATORBLOCKEDto disable items.
- Loot from dead players uses new loot API.