mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-06-04 19:10:59 +00:00
- changed AInventory::HandlePickup to work iteratively instead of recursively.
Two reasons for this: 1. if this has to be routed through the VM each recursion will cost 1000 bytes of stack space which simply is not good. 2. having the virtual function only care about the item itself but not the entire inventory chain is a lot less error prone for scripting. Since the scripting interface needs a separate caller function anyway this seemed like a good time to change it. The same will be done for the other chained inventory handlers as well.
This commit is contained in:
parent
6eff1cb8be
commit
096c51d546
18 changed files with 55 additions and 72 deletions
|
@ -57,6 +57,7 @@
|
|||
#include "m_argv.h"
|
||||
#include "p_local.h"
|
||||
#include "doomerrors.h"
|
||||
#include "a_artifacts.h"
|
||||
#include "a_weaponpiece.h"
|
||||
#include "p_conversation.h"
|
||||
#include "v_text.h"
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
|
||||
#include "gi.h"
|
||||
#include "actor.h"
|
||||
#include "d_player.h"
|
||||
#include "info.h"
|
||||
#include "tarray.h"
|
||||
#include "w_wad.h"
|
||||
|
@ -57,8 +57,7 @@
|
|||
#include "p_effect.h"
|
||||
#include "v_palette.h"
|
||||
#include "doomerrors.h"
|
||||
#include "a_hexenglobal.h"
|
||||
#include "a_weaponpiece.h"
|
||||
#include "a_artifacts.h"
|
||||
#include "p_conversation.h"
|
||||
#include "v_text.h"
|
||||
#include "thingdef.h"
|
||||
|
@ -69,6 +68,7 @@
|
|||
#include "teaminfo.h"
|
||||
#include "v_video.h"
|
||||
#include "r_data/colormaps.h"
|
||||
#include "a_weaponpiece.h"
|
||||
#include "vmbuilder.h"
|
||||
|
||||
extern TArray<PClassActor **> OptionalClassPtrs;
|
||||
|
@ -2800,7 +2800,7 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, morphweapon, S, PlayerPawn)
|
|||
DEFINE_CLASS_PROPERTY_PREFIX(player, flechettetype, S, PlayerPawn)
|
||||
{
|
||||
PROP_STRING_PARM(str, 0);
|
||||
defaults->FlechetteType = FindClassTentative(str, RUNTIME_CLASS(AArtiPoisonBag));
|
||||
defaults->FlechetteType = FindClassTentative(str, PClass::FindActor("ArtiPoisonBag"));
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue