diff options
| author | Markus Mittendrein <maxmitti@maxmitti.tk> | 2022-02-13 21:20:56 +0100 |
|---|---|---|
| committer | Markus Mittendrein <maxmitti@maxmitti.tk> | 2022-02-13 22:32:44 +0100 |
| commit | 3246b689417a170fa0dc5af638cf708a032aad96 (patch) | |
| tree | a48b09a7b2e990afa017c4d4c095cc71555be8de /CrewSelection.c4d | |
| parent | b1d77280646265b4b3a361fb25c184d652d088b5 (diff) | |
| download | ObjectsAppend-3246b689417a170fa0dc5af638cf708a032aad96.tar.gz ObjectsAppend-3246b689417a170fa0dc5af638cf708a032aad96.zip | |
Crew Selection: Use InitializeDef instead of Clonk appendto for creation
Diffstat (limited to 'CrewSelection.c4d')
| -rw-r--r-- | CrewSelection.c4d/Script.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/CrewSelection.c4d/Script.c b/CrewSelection.c4d/Script.c index 920a604..d4362f5 100644 --- a/CrewSelection.c4d/Script.c +++ b/CrewSelection.c4d/Script.c @@ -1,5 +1,26 @@ #strict 3 +static CS7I_Instance; + +func InitializeDef() +{ + if (!CS7I_Instance) + { + CreateObject(GetID()); + } +} + +func Initialize() +{ + if (CS7I_Instance && CS7I_Instance != this) + { + RemoveObject(); + return; + } + + CS7I_Instance = this; +} + func Activate(int player) { var cursor = GetCursor(player); |
