Proper naming for GameTimeTaskManager in comments.

This commit is contained in:
MobiusDevelopment
2021-06-21 22:35:10 +00:00
parent 92c522c3d5
commit 03857d87ee
95 changed files with 390 additions and 390 deletions

View File

@@ -473,7 +473,7 @@ abstract class AbstractAI implements Ctrl
return;
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_accessor.moveTo(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
// May result to make monsters stop moving.
@@ -527,7 +527,7 @@ abstract class AbstractAI implements Ctrl
_clientMoving = true;
_clientMovingToPawnOffset = 0;
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeTaskManager
_accessor.moveTo(x, y, z);
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers

View File

@@ -5261,19 +5261,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
}
/**
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeTaskManager (only called by AI Accessor).<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature. The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager that will call the updatePosition method of those Creature each 0.1s.<br>
* <br>
* <b><u>Actions</u>:</b><br>
* <li>Get current position of the Creature</li>
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
* <li>Create and Init a MoveData object</li>
* <li>Set the Creature _move object to MoveData object</li>
* <li>Add the Creature to movingObjects of the GameTimeController</li>
* <li>Add the Creature to movingObjects of the GameTimeTaskManager</li>
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li><br>
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation </b></font><br>
* <br>
@@ -5581,8 +5581,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
// Set the Creature _move object to MoveData object
_move = m;
// Add the Creature to movingObjects of the GameTimeController
// The GameTimeController manage objects movement
// Add the Creature to movingObjects of the GameTimeTaskManager
// The GameTimeTaskManager manage objects movement
GameTimeTaskManager.getInstance().registerMovingObject(this);
// Create a task to notify the AI that Creature arrives at a check point of the movement
@@ -5591,7 +5591,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
ThreadPool.schedule(new NotifyAITask(CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
}
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
}
/**
@@ -5661,8 +5661,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
// Set the Creature _move object to MoveData object
_move = m;
// Add the Creature to movingObjects of the GameTimeController
// The GameTimeController manage objects movement
// Add the Creature to movingObjects of the GameTimeTaskManager
// The GameTimeTaskManager manage objects movement
GameTimeTaskManager.getInstance().registerMovingObject(this);
// Create a task to notify the AI that Creature arrives at a check point of the movement
@@ -5671,7 +5671,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
ThreadPool.schedule(new NotifyAITask(CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
}
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeTaskManager
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
broadcastMoveToLocation();

View File

@@ -97,8 +97,8 @@ public class BoatInstance extends Creature
// Set the Creature _move object to MoveData object
_move = m;
// Add the Creature to movingObjects of the GameTimeController
// The GameTimeController manage objects movement
// Add the Creature to movingObjects of the GameTimeTaskManager
// The GameTimeTaskManager manage objects movement
GameTimeTaskManager.getInstance().registerMovingObject(this);
}

View File

@@ -78,12 +78,12 @@ public class GameTimeTaskManager
}
/**
* Add a Creature to movingObjects of GameTimeController.<br>
* Add a Creature to movingObjects of GameTimeTaskManager.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.
* @param creature The Creature to add to movingObjects of GameTimeController
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.
* @param creature The Creature to add to movingObjects of GameTimeTaskManager
*/
public void registerMovingObject(Creature creature)
{
@@ -96,11 +96,11 @@ public class GameTimeTaskManager
}
/**
* Move all Creatures contained in movingObjects of GameTimeController.<br>
* Move all Creatures contained in movingObjects of GameTimeTaskManager.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeTaskManager.<br>
* <br>
* <b><u>Actions</u>:</b><br>
* <li>Update the position of each Creature</li>
@@ -150,7 +150,7 @@ public class GameTimeTaskManager
public TimerThread()
{
super("GameTimeController");
super("GameTimeTaskManager");
setDaemon(true);
setPriority(MAX_PRIORITY);
}