Skip to content

Commit

Permalink
possible mahabre lag fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mattieFM committed Aug 29, 2024
1 parent 6106b77 commit dc35e8d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
1 change: 1 addition & 0 deletions www/mods/_multiplayer/netControllerV2/baseNetController.js
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,7 @@ class BaseNetController extends EventEmitter {
const _character = $gameMap.event(params[0] > 0 ? params[0] : cmd.eventId);
console.log('character');
console.log(_character);
if(cmd === MATTIE.static.rpg.commands.setMovementRoute)
if (_character) {
const moveRoute = params[1];
const tempCanPass = _character.canPass;
Expand Down
22 changes: 11 additions & 11 deletions www/mods/_multiplayer/netControllerV2/commandInterpreter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ MATTIE.multiplayer = MATTIE.multiplayer || {};
MATTIE.multiplayer.enabledNetCommands = [
205, // set movement route
// 117, //common events. We will likely need to do more than just forward this. probs some filtering and stuff
601, // battle win //send
602, // battle escape //send?
603, // battle loss //interpret
313, // change state //interpret
331, // change enemy hp //send?
// set event location
333, // change enemy state //send?
334, // enemy recover all //send?
335, // enemy appear //send?
336, // enemy transform //send?
353, // game over //interpret
// 601, // battle win //send
// 602, // battle escape //send?
// 603, // battle loss //interpret
// 313, // change state //interpret
// 331, // change enemy hp //send?
// // set event location
// 333, // change enemy state //send?
// 334, // enemy recover all //send?
// 335, // enemy appear //send?
// 336, // enemy transform //send?
// 353, // game over //interpret
// 355, //scripts //interpret?
// 356, //plugin commands //interpret?

Expand Down
5 changes: 5 additions & 0 deletions www/mods/commonLibs/_common/static.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ MATTIE.static.skills.enGarde = null;
// RPGMaker Constants
MATTIE.static.rpg.battleProcessingId = 301;

/** @description a dict of command ids*/
MATTIE.static.rpg.commands = {
setMovementRoute:205
}

// Variableids
/** @description a list of sync variables for multiplayer */
MATTIE.static.variable.syncedVars = [];
Expand Down
4 changes: 2 additions & 2 deletions www/mods/devTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ function toggleGodMode() {
}

/**
* @description toggle on/off party health loss
* @description toggle on/off party hunger loss
*/
function toggleHunger() {
toggleMemberProp('changeExp', 'hungerDisabled', (member) => member.expForLevel());
toggleMemberProp('changeExp', 'hungerDisabled', (member) => 99);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions www/mods/mattieFMModLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -1190,11 +1190,11 @@ class ModManager {
*/
MATTIE_ModManager.overrideErrorLoggers = function () {
SceneManager.onError = function (e) {
MATTIE.onError.call(this, e);
//MATTIE.onError.call(this, e);
};

SceneManager.catchException = function (e) {
MATTIE.onError.call(this, e);
//MATTIE.onError.call(this, e);
};
};

Expand Down Expand Up @@ -1350,7 +1350,7 @@ Graphics.displayFile = function (file) {
Graphics.hideFile = function () {
MATTIE_ModManager.updateConfigDisplay();
MATTIE_ModManager._configDisplay.hidden = true;
SceneManager.resume();
if(SceneManager._stopped) SceneManager.resume();
};

/** @description load and render an html file into the config display */
Expand Down

0 comments on commit dc35e8d

Please sign in to comment.