Changeset 120 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder
- Timestamp:
- 09/13/2017 12:39:31 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/structures/ScriptIncident.java
r119 r120 188 188 public void addNewEvent(I_ScriptEvent ev, int start) 189 189 { 190 int leftoverSeconds = start % 60; 191 192 //round start time to the nearest minute 193 if(leftoverSeconds != 0) 194 { 195 if(leftoverSeconds > 30) 196 { 197 start += (60 - leftoverSeconds); 198 } 199 else 200 { 201 start -= leftoverSeconds; 202 } 203 } 204 190 205 //Check to see if there's already a timeslice here 191 206 TimeSlice t = slices.get(start);
Note: See TracChangeset
for help on using the changeset viewer.
