shithub: sce

Download patch

ref: 0c7e24a984dce5b27035fb0162b86937e13f781f
parent: 4c2c9c8892686ad0a04ec93222a1f51fdafdf4f3
author: qwx <qwx@sciops.net>
date: Sun Aug 15 20:16:25 EDT 2021

M ./drw.c
drw: print unit state on "hud"

--- a/drw.c
+++ b/drw.c
@@ -112,6 +112,10 @@
 	else
 		snprint(s, sizeof s, "%s %d/%d", mo->o->name, mo->hp, mo->o->hp);
 	string(screen, p0, display->white, ZP, font, s);
+	if((mo->o->f & Fresource) == 0){
+		snprint(s, sizeof s, "%s", mo->actp!=nil ? mo->actp->name : "idle");
+		string(screen, addpt(p0, Pt(0,font->height)), display->white, ZP, font, s);
+	}
 }
 
 static int