forked from Mirrors/openclonk
Hot Ice: Make use of LoadScenarioSection improvements
parent
abf32cf00b
commit
250bbf9aa2
|
@ -7,17 +7,10 @@
|
||||||
|
|
||||||
static g_player_spawn_positions;
|
static g_player_spawn_positions;
|
||||||
static g_map_width;
|
static g_map_width;
|
||||||
static g_no_map, g_seed;
|
|
||||||
|
|
||||||
// Called be the engine: draw the complete map here.
|
// Called be the engine: draw the complete map here.
|
||||||
public func InitializeMap(proplist map)
|
public func InitializeMap(proplist map)
|
||||||
{
|
{
|
||||||
// Don't draw a map when switching to the empty scenario section.
|
|
||||||
if (g_no_map) return true;
|
|
||||||
// Reloading the scenario section also resets the RNG. Call Random() a few times to get a new map each round.
|
|
||||||
var i = g_seed++;
|
|
||||||
while (i--) Random(2);
|
|
||||||
|
|
||||||
// Map type 0: One big island; more small islands above
|
// Map type 0: One big island; more small islands above
|
||||||
// Map type 1: Only many small islands
|
// Map type 1: Only many small islands
|
||||||
var t = SCENPAR_MapType;
|
var t = SCENPAR_MapType;
|
||||||
|
|
|
@ -42,9 +42,6 @@ func ResetRound()
|
||||||
clonk->SetObjectStatus(C4OS_INACTIVE);
|
clonk->SetObjectStatus(C4OS_INACTIVE);
|
||||||
}
|
}
|
||||||
// Clear and redraw the map.
|
// Clear and redraw the map.
|
||||||
g_no_map = true;
|
|
||||||
LoadScenarioSection("Empty");
|
|
||||||
g_no_map = false;
|
|
||||||
LoadScenarioSection("main");
|
LoadScenarioSection("main");
|
||||||
InitializeRound();
|
InitializeRound();
|
||||||
// Re-enable the players.
|
// Re-enable the players.
|
||||||
|
|
Loading…
Reference in New Issue