mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
scripts: consistent initialization of memory
member
Some classes did set it to nullptr and others did not. For the sake of consistency, initialize it explicitly everywhere.
This commit is contained in:
parent
46fcae00a2
commit
7fa31b3aa3
@ -363,7 +363,7 @@ struct pest_data {
|
||||
|
||||
class Pest final : public BaseObjScript {
|
||||
private:
|
||||
pest_data *memory;
|
||||
pest_data *memory = nullptr;
|
||||
void DoInit(int me_handle);
|
||||
|
||||
public:
|
||||
@ -575,7 +575,7 @@ class Lance final : public BaseObjScript {
|
||||
private:
|
||||
void DoInit(int me_handle);
|
||||
void DoFrame(int me_handle);
|
||||
lance_data *memory;
|
||||
lance_data *memory = nullptr;
|
||||
|
||||
public:
|
||||
Lance() {}
|
||||
@ -593,7 +593,7 @@ struct flak_data {
|
||||
|
||||
class Flak final : public BaseObjScript {
|
||||
private:
|
||||
flak_data *memory;
|
||||
flak_data *memory = nullptr;
|
||||
void DoInit(int me_handle);
|
||||
|
||||
public:
|
||||
@ -625,7 +625,7 @@ struct supertrooper_data {
|
||||
|
||||
class SuperTrooper final : public BaseObjScript {
|
||||
private:
|
||||
supertrooper_data *memory;
|
||||
supertrooper_data *memory = nullptr;
|
||||
void DoInit(int me_handle);
|
||||
|
||||
public:
|
||||
@ -668,7 +668,7 @@ struct sparky_data {
|
||||
|
||||
class Sparky final : public BaseObjScript {
|
||||
private:
|
||||
sparky_data *memory;
|
||||
sparky_data *memory = nullptr;
|
||||
void DoInit(int me);
|
||||
void DoFrame(int me);
|
||||
bool DoNotify(int me_handle, tOSIRISEventInfo *data);
|
||||
@ -728,7 +728,7 @@ struct hellion_data {
|
||||
|
||||
class Hellion final : public BaseObjScript {
|
||||
private:
|
||||
hellion_data *memory;
|
||||
hellion_data *memory = nullptr;
|
||||
void DoInit(int me);
|
||||
void RemapAlert(int me, float start, float end, float time);
|
||||
void RemapWB(int me, float start, float fire, int fire_sound, float end, float time, float latency, int index,
|
||||
@ -797,7 +797,7 @@ struct mantaray_data {
|
||||
|
||||
class MantaRay final : public BaseObjScript {
|
||||
private:
|
||||
mantaray_data *memory;
|
||||
mantaray_data *memory = nullptr;
|
||||
void DoInit(int me);
|
||||
|
||||
void DoSquadieFrame(int me);
|
||||
@ -844,7 +844,7 @@ struct skiff_data {
|
||||
|
||||
class Skiff final : public BaseObjScript {
|
||||
private:
|
||||
skiff_data *memory;
|
||||
skiff_data *memory = nullptr;
|
||||
void DoInit(int me);
|
||||
|
||||
void DoSquadieFrame(int me);
|
||||
@ -894,7 +894,7 @@ struct spyhunter_data {
|
||||
|
||||
class SpyHunter final : public BaseObjScript {
|
||||
private:
|
||||
spyhunter_data *memory;
|
||||
spyhunter_data *memory = nullptr;
|
||||
void DoInit(int me);
|
||||
void DoFrame(int me);
|
||||
void DoSummon(int me);
|
||||
@ -923,7 +923,7 @@ struct sniper_data {
|
||||
};
|
||||
|
||||
class Sniper final : public BaseObjScript {
|
||||
sniper_data *memory;
|
||||
sniper_data *memory = nullptr;
|
||||
void DoInit(int me);
|
||||
void DoFrame(int me);
|
||||
bool DoNotify(int me_handle, tOSIRISEventInfo *data);
|
||||
@ -951,7 +951,7 @@ struct snipernorun_data {
|
||||
};
|
||||
|
||||
class SniperNoRun final : public BaseObjScript {
|
||||
snipernorun_data *memory;
|
||||
snipernorun_data *memory = nullptr;
|
||||
void DoInit(int me);
|
||||
void DoFrame(int me);
|
||||
bool DoNotify(int me_handle, tOSIRISEventInfo *data);
|
||||
@ -976,7 +976,7 @@ struct evadermoda_data {
|
||||
};
|
||||
|
||||
class EvaderModA final : public BaseObjScript {
|
||||
evadermoda_data *memory;
|
||||
evadermoda_data *memory = nullptr;
|
||||
void DoInit(int me);
|
||||
void DoFrame(int me);
|
||||
bool DoNotify(int me_handle, tOSIRISEventInfo *data);
|
||||
@ -1004,7 +1004,7 @@ struct flameras_data {
|
||||
};
|
||||
|
||||
class FlameRAS final : public BaseObjScript {
|
||||
flameras_data *memory;
|
||||
flameras_data *memory = nullptr;
|
||||
void DoInit(int me);
|
||||
void DoFrame(int me);
|
||||
bool DoNotify(int me_handle, tOSIRISEventInfo *data);
|
||||
@ -1043,7 +1043,7 @@ struct jugg_data {
|
||||
|
||||
class Jugg final : public BaseObjScript {
|
||||
private:
|
||||
jugg_data *memory;
|
||||
jugg_data *memory = nullptr;
|
||||
void DoInit(int me_handle);
|
||||
void DoFrame(int me_handle);
|
||||
void SetMode(int me, char mode);
|
||||
@ -1069,7 +1069,7 @@ struct dtower_data {
|
||||
|
||||
class DTower final : public BaseObjScript {
|
||||
private:
|
||||
dtower_data *memory;
|
||||
dtower_data *memory = nullptr;
|
||||
void DoInit(int me_handle);
|
||||
void DoFrame(int me_handle);
|
||||
|
||||
@ -1092,7 +1092,7 @@ struct dcollector_data {
|
||||
|
||||
class DCollector final : public BaseObjScript {
|
||||
private:
|
||||
dcollector_data *memory;
|
||||
dcollector_data *memory = nullptr;
|
||||
void DoInit(int me_handle);
|
||||
void DoFrame(int me_handle);
|
||||
|
||||
@ -1112,7 +1112,7 @@ struct cball_data {
|
||||
|
||||
class CBall final : public BaseObjScript {
|
||||
private:
|
||||
cball_data *memory;
|
||||
cball_data *memory = nullptr;
|
||||
void DoInit(int me_handle);
|
||||
void DoFrame(int me_handle);
|
||||
|
||||
@ -1133,7 +1133,7 @@ struct sixgun_data {
|
||||
|
||||
class SixGun final : public BaseObjScript {
|
||||
private:
|
||||
sixgun_data *memory;
|
||||
sixgun_data *memory = nullptr;
|
||||
void DoInit(int me_handle);
|
||||
bool DoNotify(int me_handle, tOSIRISEVTAINOTIFY *notify);
|
||||
|
||||
@ -1152,7 +1152,7 @@ struct explodetimeout_data {
|
||||
|
||||
class ExplodeTimeOut final : public BaseObjScript {
|
||||
private:
|
||||
explodetimeout_data *memory;
|
||||
explodetimeout_data *memory = nullptr;
|
||||
void DoInit(int me_handle);
|
||||
|
||||
public:
|
||||
@ -1189,7 +1189,7 @@ struct sickle_data {
|
||||
|
||||
class Sickle final : public BaseObjScript {
|
||||
private:
|
||||
sickle_data *memory;
|
||||
sickle_data *memory = nullptr;
|
||||
void SetMode(int me, char mode);
|
||||
void DoInit(int me_handle);
|
||||
void DoFrame(int me_handle);
|
||||
@ -1310,7 +1310,7 @@ struct gbpowerup_data {
|
||||
|
||||
class GBPowerup final : public BaseObjScript {
|
||||
private:
|
||||
gbpowerup_data *memory;
|
||||
gbpowerup_data *memory = nullptr;
|
||||
void DoInit(int me);
|
||||
void DoFrame(int me);
|
||||
|
||||
@ -1332,7 +1332,7 @@ struct joshbell_data {
|
||||
|
||||
class JoshBell final : public BaseObjScript {
|
||||
private:
|
||||
joshbell_data *memory;
|
||||
joshbell_data *memory = nullptr;
|
||||
void DoInit(int me);
|
||||
void DoCollide(int me);
|
||||
|
||||
@ -1707,7 +1707,7 @@ struct thief_data {
|
||||
|
||||
class Thief final : public BaseObjScript {
|
||||
private:
|
||||
thief_data *memory;
|
||||
thief_data *memory = nullptr;
|
||||
void DoMessage(const char *str);
|
||||
|
||||
void SetMode(int me, int mode);
|
||||
@ -2301,7 +2301,7 @@ struct fireatdist_data {
|
||||
|
||||
class FireAtDist final : public BaseObjScript {
|
||||
private:
|
||||
fireatdist_data *memory;
|
||||
fireatdist_data *memory = nullptr;
|
||||
void DoInit(int me_handle);
|
||||
void DoFrame(int me_handle);
|
||||
|
||||
@ -2321,7 +2321,7 @@ struct hateptmc_data {
|
||||
|
||||
class HatePTMC final : public BaseObjScript {
|
||||
private:
|
||||
hateptmc_data *memory;
|
||||
hateptmc_data *memory = nullptr;
|
||||
void DoInit(int me_handle);
|
||||
void DoFrame(int me_handle);
|
||||
|
||||
@ -2344,7 +2344,7 @@ struct tubbs_data {
|
||||
|
||||
class Tubbs final : public BaseObjScript {
|
||||
private:
|
||||
tubbs_data *memory;
|
||||
tubbs_data *memory = nullptr;
|
||||
void DoInit(int me);
|
||||
void DoFrame(int me);
|
||||
bool DoNotify(int me, tOSIRISEVTAINOTIFY *notify);
|
||||
@ -2368,7 +2368,7 @@ struct oldscratch_data {
|
||||
|
||||
class OldScratch final : public BaseObjScript {
|
||||
private:
|
||||
oldscratch_data *memory;
|
||||
oldscratch_data *memory = nullptr;
|
||||
bool DoSteal(int me, int it);
|
||||
void DoInit(int me);
|
||||
void DoFrame(int me);
|
||||
@ -2429,7 +2429,7 @@ struct barnswallow_data {
|
||||
|
||||
class BarnSwallow final : public BaseObjScript {
|
||||
private:
|
||||
barnswallow_data *memory;
|
||||
barnswallow_data *memory = nullptr;
|
||||
void DoInit(int me);
|
||||
bool SendCommand(int me, int it, char command, int value = 0);
|
||||
bool ReceiveCommand(int me, int it, gb_com *command);
|
||||
|
@ -805,7 +805,7 @@ struct alienorganism_data {
|
||||
// Alien Organism class definition
|
||||
class AlienOrganism final : public BaseObjScript {
|
||||
private:
|
||||
alienorganism_data *memory;
|
||||
alienorganism_data *memory = nullptr;
|
||||
|
||||
void SetMode(int me, char mode);
|
||||
void DoTakeoff(int me, float takeoff_speed, float speed_variance);
|
||||
@ -985,7 +985,7 @@ struct heavytrooper_data {
|
||||
// Heavy Trooper class definition
|
||||
class HeavyTrooper final : public BaseObjScript {
|
||||
private:
|
||||
heavytrooper_data *memory;
|
||||
heavytrooper_data *memory = nullptr;
|
||||
|
||||
void SetMode(int me, char mode);
|
||||
|
||||
@ -1080,7 +1080,7 @@ struct lifter_data {
|
||||
// Lifter class definition
|
||||
class Lifter final : public BaseObjScript {
|
||||
private:
|
||||
lifter_data *memory;
|
||||
lifter_data *memory = nullptr;
|
||||
|
||||
void SetMode(int me, char mode);
|
||||
|
||||
@ -1294,7 +1294,7 @@ struct alienboss_data {
|
||||
// Alien Boss class definition
|
||||
class AlienBoss final : public BaseObjScript {
|
||||
private:
|
||||
alienboss_data *memory;
|
||||
alienboss_data *memory = nullptr;
|
||||
|
||||
void SetMode(int me, char mode);
|
||||
void DoTakeoff(int me, float takeoff_speed, float speed_variance);
|
||||
@ -1385,7 +1385,7 @@ struct securitycamera_data {
|
||||
// Security Camera class definition
|
||||
class SecurityCamera final : public BaseObjScript {
|
||||
private:
|
||||
securitycamera_data *memory;
|
||||
securitycamera_data *memory = nullptr;
|
||||
|
||||
void SetMode(int me, char mode);
|
||||
|
||||
@ -1429,7 +1429,7 @@ struct crowdcontrol_data {
|
||||
// Security Camera class definition
|
||||
class CrowdControl final : public BaseObjScript {
|
||||
private:
|
||||
crowdcontrol_data *memory;
|
||||
crowdcontrol_data *memory = nullptr;
|
||||
|
||||
void DoInit(int me_handle);
|
||||
void DoFrame(int me_handle);
|
||||
|
@ -218,7 +218,7 @@ class aiLukeTurret final : public aiObjScript {
|
||||
float timer;
|
||||
};
|
||||
|
||||
t_lturret_memory *memory;
|
||||
t_lturret_memory *memory = nullptr;
|
||||
|
||||
public:
|
||||
aiLukeTurret(){};
|
||||
@ -236,7 +236,7 @@ class aiSTBlackBarrel final : public aiObjScript {
|
||||
matrix orient;
|
||||
};
|
||||
|
||||
t_stblackbarrel_memory *memory;
|
||||
t_stblackbarrel_memory *memory = nullptr;
|
||||
|
||||
public:
|
||||
aiSTBlackBarrel(){};
|
||||
|
@ -144,7 +144,7 @@ struct combwallhit_data {
|
||||
|
||||
class CombWallHit final : public BaseObjScript {
|
||||
private:
|
||||
combwallhit_data *memory;
|
||||
combwallhit_data *memory = nullptr;
|
||||
|
||||
public:
|
||||
CombWallHit() {}
|
||||
@ -162,7 +162,7 @@ struct droptarget_data {
|
||||
|
||||
class DropTarget final : public BaseObjScript {
|
||||
private:
|
||||
droptarget_data *memory;
|
||||
droptarget_data *memory = nullptr;
|
||||
|
||||
public:
|
||||
DropTarget() {}
|
||||
@ -179,7 +179,7 @@ struct gun_data {
|
||||
};
|
||||
|
||||
class Gun final : public BaseObjScript {
|
||||
gun_data *memory;
|
||||
gun_data *memory = nullptr;
|
||||
|
||||
public:
|
||||
Gun() {}
|
||||
@ -196,7 +196,7 @@ struct casing_data {
|
||||
|
||||
class Casing final : public BaseObjScript {
|
||||
private:
|
||||
casing_data *memory;
|
||||
casing_data *memory = nullptr;
|
||||
|
||||
public:
|
||||
Casing() {}
|
||||
@ -250,7 +250,7 @@ struct mercendboss_data {
|
||||
|
||||
class MercEndBoss final : public BaseObjScript {
|
||||
private:
|
||||
mercendboss_data *memory;
|
||||
mercendboss_data *memory = nullptr;
|
||||
void DoInit(int me);
|
||||
void DoFrame(int me);
|
||||
bool DoNotify(int me_handle, tOSIRISEventInfo *data);
|
||||
|
Loading…
Reference in New Issue
Block a user