|
if (OperateTime <= Envir.Time || time < OperateTime) |
|
OperateTime = time; |
got confused here. since it's updating Object's OperateTime, why the 2 if statements necessary?
plz correct me if I'm wrong:
OperateTime <= Envir.Time means if current OperateTime is expired. yes, obviously we need a new one.
time < OperateTime means if new OperateTime time is ahead of the old one. that's to say, something must be taken care of ahead of time. yes, it's fine to update the operate time.
but what if current OperateTime is valid (OperateTime > Envir.Time), and we want to increase the delay (time > OpeateTime)?
imo, should be something like this:
if (time > Envir.Time || time != OperateTime)
OperateTime = time;
Crystal/Server/MirObjects/MonsterObject.cs
Lines 1308 to 1309 in c94eda0
got confused here. since it's updating Object's OperateTime, why the 2
ifstatements necessary?plz correct me if I'm wrong:
OperateTime <= Envir.Timemeans if current OperateTime is expired. yes, obviously we need a new one.time < OperateTimemeans if new OperateTimetimeis ahead of the old one. that's to say, something must be taken care of ahead of time. yes, it's fine to update the operate time.but what if current OperateTime is valid (
OperateTime > Envir.Time), and we want to increase the delay (time > OpeateTime)?imo, should be something like this: