Tutorial4: Fixed losing weapons forever (#667)

Maikel de Vries 2011-10-03 15:06:38 +02:00
parent 49bfc2aacb
commit ebb5751d47
2 changed files with 8 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1,11 +1,19 @@
// The player's clonk is not allowed to collect certain items.
// The AI's clonks are also not allowed to collect certain items.
#appendto Clonk
protected func RejectCollect(id def, object obj)
{
if (GetOwner() == 0)
{
if (def == Arrow || def == Bow || def == Javelin)
return true;
}
else
{
if (def == Sword || def == Shield)
return true;
}
return _inherited(def, obj, ...);
}