Closed Eskew closed 5 years ago
@Eskew can you open the inspect and paste any console log errors?
On entering the cave, I can reproduce the same error as @Eskew :
Uncaught TypeError: Cannot read property 'getComponent' of null
at bundle.js:7094
at bundle.js:982
at Object._.each._.forEach (bundle.js:26703)
at Attackable.forEachAttacker (bundle.js:981)
at AttackSystem.cleanAttackers (bundle.js:7091)
at AttackSystem.onNotify (bundle.js:7128)
at bundle.js:3161
at WorldSystem.forEach (bundle.js:12489)
at BroadcastEvent (bundle.js:3160)
at MapSystem.onNotify (bundle.js:10697)
Afterwards, the screen freezes (pictured below):
Investigating farther into the source where this function is called, it is here:
, {
key: "cleanAttackers",
value: function cleanAttackers(origin) {
var attackable = origin.getComponent(_Components.Attackable);
attackable.forEachAttacker(function (attacker) {
var entity = _EntityManager2.default.getEntityWithID(attacker); // Serious Error - TypeError : Entity is null
if (!entity) {
entity.getComponent(_Components.Attack).removeTarget();
(0, _ecs.BroadcastEvent)(_GameEvents.GameEvents.Attack_RemoveTarget.params(entity, origin));
var _attackable = entity.getComponent(_Components.Attackable);
if (_attackable.isAttackedBy(origin.id)) _attackable.removeAttacker(origin.id);
}
});
Particularly, the line: entity.getComponent(_Components.Attack).removeTarget();
gives the null pointer @sunrisepopov @oleg-baturov .
Verified by e179a4246b391ba24ab686d4e0271309c9d73009
When 2 players are present in the same game, the BrowserQuest game crashes when attempting to access the tunnels.
Steps followed to produce bug:
Login 2 players to the stardust game Run to the desert area Try to access the tunnel between the three giants Game freezes for my player but shows my player as in-game still to player 2