Skip to content

Commit

Permalink
make csync aware of host control
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen3H committed Mar 4, 2024
1 parent 31964f9 commit c66eb40
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
1 change: 0 additions & 1 deletion Core/CustomMovement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ void Update() {

internal void ApplyConfigSpeeds(bool host = false) {
var prefix = host ? "Host" : "Client";

Plugin.Logger.LogDebug($"{prefix} - move speed set to: {cfg?.MOVEMENT_SPEED?.Value}");

player.movementSpeed = ValNonNegative(cfg.MOVEMENT_SPEED);
Expand Down
4 changes: 3 additions & 1 deletion Data/MCEConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class MCEConfig : SyncedConfig<MCEConfig> {
[NonSerialized]
readonly ConfigFile configFile;

public MCEConfig(ConfigFile cfg) : base("MCE") {
public MCEConfig(ConfigFile cfg) : base("MovementCompanyEnhanced") {
ConfigManager.Register(this);

configFile = cfg;
Expand Down Expand Up @@ -194,6 +194,8 @@ public void InitBindings() {
"Essentially, this affects how much the player is slowed down when hitting the ground."
);
#endregion

EnableHostSyncControl(SYNC_TO_CLIENTS);
}

void ApplySpeedsAfterSync(object s, EventArgs e) =>
Expand Down
16 changes: 0 additions & 16 deletions Patches/NetworkManagerPatch.cs

This file was deleted.

0 comments on commit c66eb40

Please sign in to comment.