Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/particle/ParticleEffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class EffectHost;

//Due to parsing shenanigans in weapons, this needs a forward-declare here
int parse_weapon(int, bool, const char*);
int parse_weapon(int, bool, const char*, bool);
namespace scripting::api {
particle::ParticleEffectHandle getLegacyScriptingParticleEffect(int bitmap, bool reversed);
}
Expand Down Expand Up @@ -132,7 +132,7 @@ class ParticleEffect {
friend struct effects::EffectAttachment;
friend struct ParticleParse;
friend class ParticleManager;
friend int ::parse_weapon(int, bool, const char*);
friend int ::parse_weapon(int, bool, const char*, bool);
friend ParticleEffectHandle scripting::api::getLegacyScriptingParticleEffect(int bitmap, bool reversed);
friend bool move_particle(float frametime, particle* part);
friend bool render_particle(particle* part);
Expand Down
2 changes: 1 addition & 1 deletion code/particle/volumes/ConeVolume.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace particle {
class ConeVolume : public ParticleVolume {
friend int ::parse_weapon(int, bool, const char*);
friend int ::parse_weapon(int, bool, const char*, bool);

::util::ParsedRandomFloatRange m_deviation;
::util::ParsedRandomFloatRange m_length;
Expand Down
2 changes: 0 additions & 2 deletions code/ship/ship.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1083,8 +1083,6 @@ const float DEFAULT_ASK_HELP_HULL_PERCENT = 0.3f; // percent hull at which shi
const float AWACS_HELP_HULL_HI = 0.75f; // percent hull at which ship will ask for help
const float AWACS_HELP_HULL_LOW = 0.25f; // percent hull at which ship will ask for help

#define CLONE_UNIQUE_PTR(attribute) attribute = util::unique_copy(other.attribute.get(), true)

void ship_info::clone(const ship_info& other)
{
strcpy_s(name, other.name);
Expand Down
2 changes: 2 additions & 0 deletions code/utils/string_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ std::unique_ptr<char[]> unique_copy(const char *str, bool null_if_empty);
SCP_vm_unique_ptr<char> vm_unique_copy(const char *str, bool null_if_empty);

} // namespace util

#define CLONE_UNIQUE_PTR(attribute) attribute = util::unique_copy(other.attribute.get(), true)
1 change: 1 addition & 0 deletions code/weapon/weapon.h
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,7 @@ struct weapon_info
bool has_display_name() const;

void reset();
void clone(const weapon_info& other);
};

extern special_flag_def_list_new<Weapon::Info_Flags, weapon_info*, flagset<Weapon::Info_Flags>&> Weapon_Info_Flags[];
Expand Down
Loading
Loading