shithub: sce

Download patch

ref: be4306b3a29b736001c2aad5326837be44e3f1cc
parent: bd88b3b3ca104c8c301ff080dcc2e30415947066
author: qwx <qwx@sciops.net>
date: Thu Dec 2 12:05:16 EST 2021

sim: ignore team 0 at initialization

--- a/drw.c
+++ b/drw.c
@@ -128,6 +128,8 @@
 	}
 	p.y += font->height;
 	t = teams + mo->team;
+	if(t == teams)
+		return;
 	s´ = seprint(s, s+sizeof s, "team %d: ", mo->team);
 	for(i=0; i<nelem(t->r); i++)
 		s´ = seprint(s´, s+sizeof s, "[%s] %d ", resources[i].name, t->r[i]);
--- a/sim.c
+++ b/sim.c
@@ -162,7 +162,7 @@
 
 	if(nteam < 2)
 		sysfatal("initgame: the only winning move is not to play");
-	for(t=teams; t<=teams+nteam; t++)
+	for(t=teams+1; t<=teams+nteam; t++)
 		for(i=0; i<nelem(t->r); i++)
 			t->r[i] = resources[i].init;
 }