shithub: sce

Download patch

ref: 2cef4a8a6f20f884d368fc98a3a020fba74088af
parent: a23fca93dd914bf618a72579ff644f16cf6f81fd
author: qwx <[email protected]>
date: Mon Nov 29 17:39:34 EST 2021

sim.return: not all spawners are drop off points

--- a/dat.h
+++ b/dat.h
@@ -96,6 +96,7 @@
 	Fair = 1<<2,
 	Fbuild = 1<<3,
 	Fgather = 1<<4,
+	Fdropoff = 1<<13,
 	Fresource = 1<<14,
 	Fimmutable = 1<<15,
 };
--- a/sce/sce.db
+++ b/sce/sce.db
@@ -10,8 +10,8 @@
 obj,scv,0x13,4,4,60,0,224,1,50,0,20,fusion cutter,,4.92,67,12227,40
 obj,drone,0x11,4,4,40,0,224,1,50,0,20,spines,,4.92,67,12227,40
 obj,mutalisk,0x5,4,4,120,0,224,2,100,100,600,glave wurm,glave wurm,6.67,67,21745,40
-obj,control,0x8,16,12,1500,1,1,10,400,0,1800,,,0,0,0,0
-obj,hatchery,0x8,16,12,1250,1,1,10,300,0,1800,,,0,0,0,0
+obj,control,0x2008,16,12,1500,1,1,10,400,0,1800,,,0,0,0,0
+obj,hatchery,0x2008,16,12,1250,1,1,10,300,0,1800,,,0,0,0,0
 obj,mineral0,0x4000,8,4,,,,,,,,,,,,,
 obj,mineral1,0x4000,8,4,,,,,,,,,,,,,
 obj,mineral2,0x4000,8,4,,,,,,,,,,,,,
--- a/sim.c
+++ b/sim.c
@@ -62,8 +62,7 @@
 		if(t->mo[i] == nil)
 			break;
 	t->firstempty = i;
-	if(mo->o->nspawn > 0){
-		assert(mo->o->spawn != nil);
+	if(mo->o->f & Fdropoff){
 		if(t->ndrop == t->dropsz){
 			t->drop = erealloc(t->drop, (t->dropsz + 32) * sizeof *t->drop, t->dropsz * sizeof *t->drop);
 			t->dropsz += 32;