Counter-Strike: Fix armoury_entity from selecting the wrong model for some
items.
This commit is contained in:
parent
7c19a62aaf
commit
b688738320
2 changed files with 6 additions and 5 deletions
|
@ -145,7 +145,7 @@ armoury_entity::armoury_entity(void)
|
||||||
remove(this);
|
remove(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_iCount = 1;
|
m_iCount = 1;
|
||||||
|
|
||||||
for (int i = 1; i < (tokenize(__fullspawndata) - 1); i += 2) {
|
for (int i = 1; i < (tokenize(__fullspawndata) - 1); i += 2) {
|
||||||
|
@ -154,14 +154,16 @@ armoury_entity::armoury_entity(void)
|
||||||
m_iCount = stoi(argv(i+1));
|
m_iCount = stoi(argv(i+1));
|
||||||
break;
|
break;
|
||||||
case "item":
|
case "item":
|
||||||
m_iItem = g_cstrike_armouryitems[stoi(argv(i+1))];
|
int id = stoi(argv(i+1));
|
||||||
|
|
||||||
if (m_iItem < 0 || m_iItem >= 19) {
|
if (id < 0 || id >= 19) {
|
||||||
print(sprintf("^1armoury_entity with invalid item %i. ignoring\n", m_iItem));
|
print(sprintf("^1armoury_entity with invalid item %i. ignoring\n", m_iItem));
|
||||||
remove(this);
|
remove(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
model = sArmouryModels[m_iItem];
|
|
||||||
|
m_iItem = g_cstrike_armouryitems[id];
|
||||||
|
model = sArmouryModels[id];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Game_InitRules(void)
|
Game_InitRules(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue