- Timestamp:
- Sep 2, 2014, 9:32:25 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/PersistentData/Player.cs
r146 r154 17 17 lastOnline; 18 18 private Inventory inventory; 19 [OptionalField] 20 private int 21 lastPositionX, lastPositionY, lastPositionZ; 19 22 [NonSerialized] 20 23 private ClientInfo … … 82 85 } 83 86 87 public Vector3i LastPosition { 88 get { 89 if (IsOnline) 90 return new Vector3i (Entity.GetPosition ()); 91 else 92 return new Vector3i (lastPositionX, lastPositionY, lastPositionZ); 93 } 94 } 95 84 96 public void SetOffline () 85 97 { 86 98 Log.Out ("Player set to offline: " + steamId); 99 Vector3i lastPos = new Vector3i (Entity.GetPosition ()); 100 lastPositionX = lastPos.x; 101 lastPositionY = lastPos.y; 102 lastPositionZ = lastPos.z; 87 103 totalPlayTime += (long)(Time.timeSinceLevelLoad - Entity.CreationTimeSinceLevelLoad); 88 104 lastOnline = DateTime.Now;
Note:
See TracChangeset
for help on using the changeset viewer.