summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2019-04-12 00:05:23 +0200
committerMarkus Mittendrein <git@maxmitti.tk>2019-04-12 00:05:23 +0200
commitd5e447f523bed0508cdf44047c23c85f6c61b53e (patch)
treeabbe6344f1c9e1bd344de4b5bc6cb4de9eb00ad4 /TemplePushing.c4s
parente20d50e7cdcf7222534a3ff9ea154034c9160f28 (diff)
downloadtempelschubsen-d5e447f523bed0508cdf44047c23c85f6c61b53e.tar.gz
tempelschubsen-d5e447f523bed0508cdf44047c23c85f6c61b53e.zip
Give clonks an object when spawning
Diffstat (limited to 'TemplePushing.c4s')
-rw-r--r--TemplePushing.c4s/Script.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/TemplePushing.c4s/Script.c b/TemplePushing.c4s/Script.c
index 27095d8..6b47dcf 100644
--- a/TemplePushing.c4s/Script.c
+++ b/TemplePushing.c4s/Script.c
@@ -24,6 +24,7 @@ static loadingSection;
static eliminatedPlayers;
static gameStartMessage, countdown, gameStarted, gameOver;
static ambienceSounds;
+static spawnPointSpawner;
func Initialize()
{
@@ -208,7 +209,7 @@ func Script0()
// Create spawnpoints
if (!mode->~NoSpawnpoints())
{
- var spawnPointSpawner = CreateObject(SPSR, 0, 0, NO_OWNER);
+ spawnPointSpawner = CreateObject(SPSR, 0, 0, NO_OWNER);
spawnPointSpawner->SetLocations(section->SpawnpointLocations());
spawnPointSpawner->SetDefinitions(mode->SpawnpointDefinitions());
@@ -586,6 +587,8 @@ func LaunchClonk(int player, object clonk, bool relaunch)
SetPlrView(player, clonk);
ResetHealth(clonk);
+
+ CreateContents(spawnPointSpawner->GetRandomDefinition(), clonk);
}
func ResetHealth(object clonk)