mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Clamp coolness to valid values when generating ARC ammo cache (#220)
Fixes #217
This commit is contained in:
@@ -4429,7 +4429,8 @@ void SetupInfo()
|
||||
&& (gGameOptions.ubGameStyle == STYLE_SCIFI || !Item[i].scifi))
|
||||
{
|
||||
// coolness runs from 1-10, so apply offset
|
||||
ItemIdCache::ammo[Item[i].ubCoolness-1].push_back(i);
|
||||
const UINT8 coolness = min(max(1, Item[i].ubCoolness), 10);
|
||||
ItemIdCache::ammo[coolness-1].push_back(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user