@Graf: This is a problem

Moderator: GZDoom Developers
The first post of the Christmas present thread has the directions. A_TakeInventory is right there in code tags, and while the weapons offset thing is a little more complicated, Graf tells you how to do it in that post.Grubber wrote:@Anakin: I haven't included any fixes (where to get 'em?)
@Graf: This is a problem
Graf Zahl wrote: EDIT (1/13/2005):
I fixed the weapon offset bug that was mentioned in the thread several times. Everybody who wants to compile the source should note that the fix was in p_pspr.cpp so you have to apply the .diff to the original .96 source again!
EDIT (3/21/05): Ok, I'm just too lazy to upload everything again. There's a bug in A_TakeInventory which renders the function useless. Here's the fix:
Code: Select all
void A_TakeInventory(AActor * self) { int index=CheckIndex(2); if (index<0) return; const char * item =(const char*)StateParameters[index]; int amount=StateParameters[index+1]; const TypeInfo * mi=TypeInfo::FindType(item); if (mi) { AInventory * inv = self->FindInventory(mi); if (inv && !inv->IsKindOf(RUNTIME_CLASS(AHexenArmor))) { if (!amount || amount>=inv->Amount) { if (inv->IsKindOf(RUNTIME_CLASS(AAmmo))) inv->Amount=0; else inv->Destroy(); } else inv->Amount-=amount; } } }