Armor type information functions
Moderator: GZDoom Developers
Armor type information functions
There is currently no way to know which armor is being worn by a player. So I made a patch that adds an FName to the BasicArmor class to keep track of that, and a couple of information functions, one for ACS and one for DECORATE. Included along the patches (one for ZDoom, one for zspecials.acs) is a basic test map which illustrate how those features are used.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49231
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Armor type information functions
Added, including 2 things you missed:
1. ABasicArmor::CreateCopy needs to copy the newly added field.
2. If an armor bonus transfers its data to depleted BasicArmor it also needs to set the ArmorType field.
1. ABasicArmor::CreateCopy needs to copy the newly added field.
2. If an armor bonus transfers its data to depleted BasicArmor it also needs to set the ArmorType field.
Re: Armor type information functions
That was quick. While writing the wiki page for [wiki]GetArmorType[/wiki], it came to mind that returning armor->Amount instead of 1 would make it more generally useful.