From 88e9482326bb44eb5420d959fd9bd5de3d00009c Mon Sep 17 00:00:00 2001 From: walker Date: Thu, 18 Jan 2024 14:54:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=87=E9=9B=86=E4=BF=A1?= =?UTF-8?q?=E6=81=AFpanic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- message_server/sfp_ms.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/message_server/sfp_ms.go b/message_server/sfp_ms.go index 0999711..62a6368 100644 --- a/message_server/sfp_ms.go +++ b/message_server/sfp_ms.go @@ -240,7 +240,9 @@ func handlerSignalState(w ecs.World, uid string) (*state_proto.SignalState, erro signalState.Aspect = state_proto.Signal_A } } - signalState.Param = appcomponent.SignalParamType.Get(entry) + if entry.HasComponent(appcomponent.SignalParamType) { + signalState.Param = appcomponent.SignalParamType.Get(entry) + } if entry.HasComponent(component.Signal2XH1ElectronicType) { // 2XH1信号机 signal2XH1 := component.Signal2XH1ElectronicType.Get(entry) signalState.RelayStateMap = make(map[string]bool, 3) @@ -387,7 +389,9 @@ func collectTurnoutStates(sim *memory.VerifySimulation, mapId int32) ([]*state_p Dw: pos.Dw, Fw: pos.Fw, } - s.Param = appcomponent.PointsParamType.Get(entry) + if entry.HasComponent(appcomponent.PointsParamType) { + s.Param = appcomponent.PointsParamType.Get(entry) + } // // 强制(联锁驱动无效) // s.Force = entry.HasComponent(component.TurnoutFaultCiqdType) // // 失表