From d5e447f523bed0508cdf44047c23c85f6c61b53e Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Fri, 12 Apr 2019 00:05:23 +0200 Subject: Give clonks an object when spawning --- TemplePushing.c4s/Script.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'TemplePushing.c4s/Script.c') 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) -- cgit v1.2.3-54-g00ecf