Skip to content

Commit

Permalink
kill darks only if system is in night
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.code.sf.net/p/rts-2/code/trunk/rts-2@10837 65ab8f4e-f147-0410-b3a9-f14133ecfe55
  • Loading branch information
pkubanek committed Sep 10, 2012
1 parent c4db76a commit eaf8d10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plan/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,8 @@ int Executor::queueTarget (int tarId, double t_start, double t_end)
{
return setNow (nt);
}
if (next_night->getValueBool () && currentTarget && currentTarget->getTargetType () == TYPE_DARK && nt->getTargetType () != TYPE_DARK)
// kill darks during nights..
if (next_night->getValueBool () && getMasterState () == SERVERD_NIGHT && currentTarget && currentTarget->getTargetType () == TYPE_DARK && nt->getTargetType () != TYPE_DARK)
{
next_night->setValueBool (false);
sendValueAll (next_night);
Expand Down

0 comments on commit eaf8d10

Please sign in to comment.