ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.72k stars 625 forks source link

[TFC] item_battery bug #1299

Open SpannerSpammer opened 11 years ago

SpannerSpammer commented 11 years ago

To quote the TFC FGD file entry for this entity:

CAUTION! Misprogrammed in TFC! Will only charge to 100 armor and will over-charge classes with max armor <100!

This bug has existed since the beginning of TFC and it has never been fixed.

tehORiON commented 11 years ago

@SpannerSpammer item_battery is not really used on any stock tfc maps to give armor, "item_armor1-3" are used instead, which is the reason why it's not implemented properly for TFC. I can see however it's useful to have this working properly for maps that has been ported from half-life.

@alfred-valve This is easily fixed by adding a class stat check like so:

pPlayer->TeamFortress_CheckClassStats();

In the gamerules function:

PlayerGotItem( CBasePlayer *pPlayer, CItem *pItem )

This call will make sure that the armor value will not exceed the classes individual limits.