DispatchManager is now an official manager singleton.

This commit is contained in:
2024-05-12 13:14:42 -04:00
parent ff17cacda7
commit 96ba17f67a
160 changed files with 642 additions and 718 deletions
@@ -12,7 +12,6 @@ import engine.math.Vector3fImmutable;
import engine.mbEnums;
import engine.mbEnums.*;
import engine.net.Dispatch;
import engine.net.DispatchMessage;
import engine.net.client.ClientConnection;
import engine.net.client.msg.CityZoneMsg;
import engine.net.client.msg.ClientNetMsg;
@@ -62,7 +61,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
PlaceAssetMsg pam = new PlaceAssetMsg();
pam.setActionType(4);
Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), pam);
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
}
// Default method: Validates and places all buildings that do not
@@ -786,7 +785,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
//load the new city on the clients
CityZoneMsg czm = new CityZoneMsg(1, treeObject.getLoc().x, treeObject.getLoc().y, treeObject.getLoc().z, cityObject.getCityName(), zoneObject, mbEnums.CityBoundsType.ZONE.halfExtents, mbEnums.CityBoundsType.ZONE.halfExtents);
DispatchMessage.dispatchMsgToAll(czm);
DispatchManager.dispatchMsgToAll(czm);
// Set maintenance date