mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Give starting ammo at the next frame
This commit is contained in:
parent
c69ea0e4d8
commit
393dfae33e
1 changed files with 2 additions and 2 deletions
|
@ -1222,13 +1222,13 @@ Item *Sentient::giveItem(str itemname, int amount)
|
|||
|
||||
AddItem(item);
|
||||
|
||||
if (item->isSubclassOf(Weapon)) {
|
||||
if (item->IsSubclassOfWeapon()) {
|
||||
// Post an event to give the ammo to the sentient
|
||||
Event *ev1;
|
||||
|
||||
ev1 = new Event(EV_Weapon_GiveStartingAmmo);
|
||||
ev1->AddEntity(this);
|
||||
item->PostEvent(ev1, 0);
|
||||
item->PostEvent(ev1, level.frametime);
|
||||
}
|
||||
|
||||
return item;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue