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) // // 失表