mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-13 07:57:58 +00:00
Fixed lookup of inventory and ammo types in FraggleScript
https://forum.zdoom.org/viewtopic.php?t=55950
This commit is contained in:
parent
b0a0c62af1
commit
287a0933bd
1 changed files with 2 additions and 2 deletions
|
@ -363,7 +363,7 @@ static PClassActor * T_GetAmmo(const svalue_t &t)
|
||||||
p=DefAmmo[ammonum];
|
p=DefAmmo[ammonum];
|
||||||
}
|
}
|
||||||
auto am = PClass::FindActor(p);
|
auto am = PClass::FindActor(p);
|
||||||
if (am == NULL || !am->IsKindOf(PClass::FindClass(NAME_Ammo)))
|
if (am == NULL || !am->IsDescendantOf(PClass::FindClass(NAME_Ammo)))
|
||||||
{
|
{
|
||||||
script_error("unknown ammo type : %s", p);
|
script_error("unknown ammo type : %s", p);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -2436,7 +2436,7 @@ static void FS_GiveInventory (AActor *actor, const char * type, int amount)
|
||||||
type = "BasicArmorPickup";
|
type = "BasicArmorPickup";
|
||||||
}
|
}
|
||||||
auto info = PClass::FindActor (type);
|
auto info = PClass::FindActor (type);
|
||||||
if (info == NULL || !info->IsKindOf(RUNTIME_CLASS(AInventory)))
|
if (info == NULL || !info->IsDescendantOf(RUNTIME_CLASS(AInventory)))
|
||||||
{
|
{
|
||||||
Printf ("Unknown inventory item: %s\n", type);
|
Printf ("Unknown inventory item: %s\n", type);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue