Return 1 for sensing dead in null objects

This commit is contained in:
Anuken
2021-03-08 09:52:36 -05:00
parent b2d16f69da
commit e1b0e07f3c
2 changed files with 9 additions and 7 deletions

View File

@@ -636,6 +636,11 @@ public class LExecutor{
Object target = exec.obj(from);
Object sense = exec.obj(type);
if(target == null && sense == LAccess.dead){
exec.setnum(to, 1);
return;
}
//note that remote units/buildings can be sensed as well
if(target instanceof Senseable se){
if(sense instanceof Content co){