Game weapon manager: Difference between revisions
Jump to navigation
Jump to search
Note:This code is designed NOT to remove weapons that are hand-placed by level designers. It should only clean up weapons dropped by dead NPCs, which is useful in situations where enemies are spawned in for a sustained period of time.
(bot-assisted) |
m (→Entity Description: from basecombatweapon_shared.cpp) |
||
Line 2: | Line 2: | ||
==Entity Description== | ==Entity Description== | ||
An entity used to limit the number of a particular weapon type in the world. Useful in places where NPCs are spawning rapidly, dying, and dropping weapons. | An entity used to limit the number of a particular weapon type in the world. Useful in places where NPCs are spawning rapidly, dying, and dropping weapons. | ||
This entity conducts a count of all the weapons in the world of my type and see if we have a surplus. If there is a surplus, try to find suitable candidates for removal. Right now we just remove the first weapons we find that are behind the player, or are out of the player's PVS. | |||
{{note|This code is designed NOT to remove weapons that are hand-placed by level designers. It should only clean up weapons dropped by dead NPCs, which is useful in situations where enemies are spawned in for a sustained period of time.}} | |||
==Availability== | ==Availability== |
Revision as of 15:05, 14 April 2006
Entity Description
An entity used to limit the number of a particular weapon type in the world. Useful in places where NPCs are spawning rapidly, dying, and dropping weapons.
This entity conducts a count of all the weapons in the world of my type and see if we have a surplus. If there is a surplus, try to find suitable candidates for removal. Right now we just remove the first weapons we find that are behind the player, or are out of the player's PVS.

Availability
Template:In game Template:Game-base Template:In code
Keyvalues
- Template:Kv targetname
- weaponname
- <string> Classname of the weapon type to limit.
- maxpieces
- <integer> The maximum amount of the specified weapon type allowed in the world.