Search in sources :

Example 1 with GameSession

use of org.apollo.game.session.GameSession in project apollo by apollo-rsps.

the class GameService method pulse.

/**
 * Called every pulse.
 */
public synchronized void pulse() {
    finalizeRegistrations();
    finalizeUnregistrations();
    MobRepository<Player> players = world.getPlayerRepository();
    for (Player player : players) {
        GameSession session = player.getSession();
        if (session != null) {
            session.handlePendingMessages(handlers);
        }
    }
    world.pulse();
    synchronizer.synchronize(players, world.getNpcRepository());
}
Also used : GameSession(org.apollo.game.session.GameSession) Player(org.apollo.game.model.entity.Player)

Aggregations

Player (org.apollo.game.model.entity.Player)1 GameSession (org.apollo.game.session.GameSession)1