@@ -135,7 +135,7 @@ public Guid[] Equipment
135135 //Chat
136136 private readonly List < ChatBubble > mChatBubbles = [ ] ;
137137
138- private Direction mDir ;
138+ private Direction _directionFacing ;
139139
140140 protected bool mDisposed ;
141141
@@ -145,7 +145,7 @@ public Guid[] Equipment
145145
146146 public Color Color { get ; set ; } = new Color ( 255 , 255 , 255 , 255 ) ;
147147
148- public virtual Direction MoveDir { get ; set ; } = Direction . None ;
148+ public virtual Direction DirectionMoving { get ; set ; } = Direction . None ;
149149
150150 public long MoveTimer { get ; set ; }
151151
@@ -328,13 +328,13 @@ public Entity(Guid id, EntityPacket? packet, EntityType entityType)
328328
329329 public Vector2 Center => Origin - CenterOffset ;
330330
331- public Direction Dir
331+ public Direction DirectionFacing
332332 {
333- get => mDir ;
334- set => mDir = ( Direction ) ( ( int ) ( value + Options . Instance . Map . MovementDirections ) % Options . Instance . Map . MovementDirections ) ;
333+ get => _directionFacing ;
334+ set => _directionFacing = ( Direction ) ( ( int ) ( value + Options . Instance . Map . MovementDirections ) % Options . Instance . Map . MovementDirections ) ;
335335 }
336336
337- private Direction mLastDirection = Direction . Down ;
337+ private Direction _lastDirection = Direction . Down ;
338338
339339 public virtual string TransformedSprite
340340 {
@@ -404,7 +404,7 @@ public virtual void Load(EntityPacket? packet)
404404 Face = packet . Face ;
405405 Level = packet . Level ;
406406 Position = packet . Position ;
407- Dir = ( Direction ) packet . Dir ;
407+ DirectionFacing = ( Direction ) packet . Dir ;
408408 Passable = packet . Passable ;
409409 HideName = packet . HideName ;
410410 IsHidden = packet . HideEntity ;
@@ -604,7 +604,7 @@ public virtual void Dispose()
604604 public virtual float GetMovementTime ( )
605605 {
606606 var time = 1000f / ( float ) ( 1 + Math . Log ( Stat [ ( int ) Enums . Stat . Speed ] ) ) ;
607- if ( Dir > Direction . Right )
607+ if ( DirectionFacing > Direction . Right )
608608 {
609609 time *= MathHelper . UnitDiagonalLength ;
610610 }
@@ -704,9 +704,9 @@ public virtual bool Update()
704704 {
705705 var displacementTime = ecTime * TileHeight / GetMovementTime ( ) ;
706706
707- PickLastDirection ( Dir ) ;
707+ PickLastDirection ( DirectionFacing ) ;
708708
709- switch ( Dir )
709+ switch ( DirectionFacing )
710710 {
711711 case Direction . Up :
712712 OffsetY -= displacementTime ;
@@ -904,7 +904,7 @@ public virtual bool Update()
904904 animation . Show ( ) ;
905905 }
906906
907- var animationDirection = animation . AutoRotate ? Dir : default ;
907+ var animationDirection = animation . AutoRotate ? DirectionFacing : default ;
908908 animation . SetPosition (
909909 ( int ) Math . Ceiling ( Center . X ) ,
910910 ( int ) Math . Ceiling ( Center . Y ) ,
@@ -1235,7 +1235,7 @@ public virtual void Draw()
12351235 return ;
12361236 }
12371237
1238- var spriteRow = PickSpriteRow ( Dir ) ;
1238+ var spriteRow = PickSpriteRow ( DirectionFacing ) ;
12391239
12401240 var frameWidth = texture . Width / SpriteFrames ;
12411241 var frameHeight = texture . Height / Options . Instance . Sprites . Directions ;
@@ -1261,9 +1261,9 @@ public virtual void Draw()
12611261 WorldPos = destRectangle ;
12621262
12631263 //Order the layers of paperdolls and sprites
1264- for ( var z = 0 ; z < Options . Instance . Equipment . Paperdoll . Directions [ ( int ) mLastDirection ] . Count ; z ++ )
1264+ for ( var z = 0 ; z < Options . Instance . Equipment . Paperdoll . Directions [ ( int ) _lastDirection ] . Count ; z ++ )
12651265 {
1266- var paperdoll = Options . Instance . Equipment . Paperdoll . Directions [ ( int ) mLastDirection ] [ z ] ;
1266+ var paperdoll = Options . Instance . Equipment . Paperdoll . Directions [ ( int ) _lastDirection ] [ z ] ;
12671267 var equipSlot = Options . Instance . Equipment . Slots . IndexOf ( paperdoll ) ;
12681268
12691269 //Check for player
@@ -1343,23 +1343,23 @@ private int PickSpriteRow(Direction direction)
13431343 switch ( direction )
13441344 {
13451345 case Direction . Left :
1346- case Direction . DownLeft when mLastDirection == Direction . Left :
1347- case Direction . UpLeft when mLastDirection == Direction . Left :
1346+ case Direction . DownLeft when _lastDirection == Direction . Left :
1347+ case Direction . UpLeft when _lastDirection == Direction . Left :
13481348 return 1 ;
13491349
13501350 case Direction . Right :
1351- case Direction . DownRight when mLastDirection == Direction . Right :
1352- case Direction . UpRight when mLastDirection == Direction . Right :
1351+ case Direction . DownRight when _lastDirection == Direction . Right :
1352+ case Direction . UpRight when _lastDirection == Direction . Right :
13531353 return 2 ;
13541354
13551355 case Direction . Up :
1356- case Direction . UpLeft when mLastDirection != Direction . Left :
1357- case Direction . UpRight when mLastDirection != Direction . Right :
1356+ case Direction . UpLeft when _lastDirection != Direction . Left :
1357+ case Direction . UpRight when _lastDirection != Direction . Right :
13581358 return 3 ;
13591359
13601360 case Direction . Down :
1361- case Direction . DownLeft when mLastDirection != Direction . Left :
1362- case Direction . DownRight when mLastDirection != Direction . Right :
1361+ case Direction . DownLeft when _lastDirection != Direction . Left :
1362+ case Direction . DownRight when _lastDirection != Direction . Right :
13631363 default :
13641364 return 0 ;
13651365 }
@@ -1370,28 +1370,28 @@ public void PickLastDirection(Direction direction)
13701370 switch ( direction )
13711371 {
13721372 case Direction . Left :
1373- case Direction . DownLeft when mLastDirection == Direction . Left :
1374- case Direction . UpLeft when mLastDirection == Direction . Left :
1375- mLastDirection = Direction . Left ;
1373+ case Direction . DownLeft when _lastDirection == Direction . Left :
1374+ case Direction . UpLeft when _lastDirection == Direction . Left :
1375+ _lastDirection = Direction . Left ;
13761376 break ;
13771377
13781378 case Direction . Right :
1379- case Direction . DownRight when mLastDirection == Direction . Right :
1380- case Direction . UpRight when mLastDirection == Direction . Right :
1381- mLastDirection = Direction . Right ;
1379+ case Direction . DownRight when _lastDirection == Direction . Right :
1380+ case Direction . UpRight when _lastDirection == Direction . Right :
1381+ _lastDirection = Direction . Right ;
13821382 break ;
13831383
13841384 case Direction . Up :
1385- case Direction . UpLeft when mLastDirection != Direction . Left :
1386- case Direction . UpRight when mLastDirection != Direction . Right :
1387- mLastDirection = Direction . Up ;
1385+ case Direction . UpLeft when _lastDirection != Direction . Left :
1386+ case Direction . UpRight when _lastDirection != Direction . Right :
1387+ _lastDirection = Direction . Up ;
13881388 break ;
13891389
13901390 case Direction . Down :
1391- case Direction . DownLeft when mLastDirection != Direction . Left :
1392- case Direction . DownRight when mLastDirection != Direction . Right :
1391+ case Direction . DownLeft when _lastDirection != Direction . Left :
1392+ case Direction . DownRight when _lastDirection != Direction . Right :
13931393 default :
1394- mLastDirection = Direction . Down ;
1394+ _lastDirection = Direction . Down ;
13951395 break ;
13961396 }
13971397 }
@@ -1483,7 +1483,7 @@ public virtual void DrawEquipment(string filename, Color renderColor)
14831483 }
14841484
14851485 // Calculate: direction, frame width and frame height.
1486- var spriteRow = PickSpriteRow ( Dir ) ;
1486+ var spriteRow = PickSpriteRow ( DirectionFacing ) ;
14871487 var frameWidth = paperdollTex . Width / spriteFrames ;
14881488 var frameHeight = paperdollTex . Height / Options . Instance . Sprites . Directions ;
14891489
@@ -2317,15 +2317,15 @@ public Direction DirectionToTarget(Entity en)
23172317 {
23182318 if ( en == null )
23192319 {
2320- return Dir ;
2320+ return DirectionFacing ;
23212321 }
23222322
23232323 var originMapController = MapInstance ;
23242324 var targetMapController = en . MapInstance ;
23252325
23262326 if ( originMapController == null || targetMapController == null )
23272327 {
2328- return Dir ;
2328+ return DirectionFacing ;
23292329 }
23302330
23312331 var originY = Y + originMapController . GridY * MapHeight ;
0 commit comments