Counter-Strike: Doing bound checks with armoury_entity so that maps like
cs_huehnerklau work.
This commit is contained in:
parent
bb7522f971
commit
877e5e1699
1 changed files with 6 additions and 0 deletions
|
@ -155,6 +155,12 @@ armoury_entity::armoury_entity(void)
|
|||
break;
|
||||
case "item":
|
||||
m_iItem = g_cstrike_armouryitems[stoi(argv(i+1))];
|
||||
|
||||
if (m_iItem < 0 || m_iItem >= 19) {
|
||||
print(sprintf("^1armoury_entity with invalid item %i. ignoring\n", m_iItem));
|
||||
remove(this);
|
||||
return;
|
||||
}
|
||||
model = sArmouryModels[m_iItem];
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue