//public PointerUpdate GetUpdateMessage() //{ // // Generate a network update message for this pointer. (In effect: if it was killed.) // PointerUpdate message = new PointerUpdate(); // message.storyPointID = currentPoint.ID; // if (status == POINTERSTATUS.KILLED) // { // message.killed = true; // } // return message; //} #if !SOLO public PointerUpdateBundled GetUpdate() { // bundled approach. // Generate a network update message for this pointer. Only case is KILL. PointerUpdateBundled updateMessageSend = new PointerUpdateBundled(); updateMessageSend.StoryLineName = currentPoint.StoryLine; //updateMessageSend =; //updateMessageSend.storyPointID= currentPoint.ID; /* * updateMessageSend.storyPointID = currentPoint.ID; * * if (status == POINTERSTATUS.KILLED) * { * updateMessageSend.killed = true; * * } else{ * * updateMessageSend.killed = false; * * } */ return(updateMessageSend); }
void ApplyPointerUpdate(PointerUpdateBundled pointerUpdate) { // Right now the only update we send for pointers is when they are killed. StoryPointer pointer = GENERAL.GetPointerForStoryline(pointerUpdate.StoryLineName); Log("Server says kill pointer: " + pointerUpdate.StoryLineName); if (pointer != null) { // We remove it instantly. No need to mark it as deleted, nothing else to do with it. GENERAL.ALLPOINTERS.Remove(pointer); Log("Removing pointer: " + pointer.currentPoint.StoryLine); // Server passes tasks, so if it is faster, client may be processing more than one task for a storyline. (Even if the deus dash would show it) for (int i = GENERAL.ALLTASKS.Count - 1; i >= 0; i--) { StoryTask task = GENERAL.ALLTASKS[i]; if (task.Point != null && task.Point.StoryLine == pointerUpdate.StoryLineName) { Log("Removing task: " + task.Instruction); GENERAL.ALLTASKS.Remove(task); } } } }