forked from Mirrors/openclonk
Tutorial4: Fixed losing weapons forever (#667)
parent
49bfc2aacb
commit
ebb5751d47
Binary file not shown.
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
@ -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, ...);
|
||||
}
|
Loading…
Reference in New Issue