时间计算错误

This commit is contained in:
meixiongfeng 2022-11-09 10:53:26 +08:00
parent 95735d3381
commit 0e84e18afc

View File

@ -88,17 +88,13 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.TrollGetListReq)
leftTime = (int32(t) % circletime)
index += circleCount * trainNum // 计算火车的位置信息
for pos, v := range sz {
if pos < int(trolltrain.TarinPos-1) { // 起始位置
continue
}
for _, v := range sz {
if leftTime <= v {
trolltrain.RefreshTime = time.Now().Unix()
trolltrain.TarinPos += index
//if trolltrain.RangeId != 0 {
trolltrain.RangeId += index
trolltrain.RangeId = (trolltrain.RangeId % maxCoefficient) + 1
//}
trolltrain.TarinPos = (trolltrain.TarinPos % trainNum) + 1
break