diff --git a/project/src/controllers/GameController.ts b/project/src/controllers/GameController.ts index c7780939..c99e1e65 100644 --- a/project/src/controllers/GameController.ts +++ b/project/src/controllers/GameController.ts @@ -64,6 +64,8 @@ export class GameController // Store start time in app context this.applicationContext.addValue(ContextVariableType.CLIENT_START_TIMESTAMP, startTimeStampMS); + this.fixShotgunDispersions(); + this.openZoneService.applyZoneChangesToAllMaps(); this.customLocationWaveService.applyWaveChangesToAllMaps(); @@ -141,6 +143,26 @@ export class GameController } } + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void + { + const itemDb = this.databaseServer.getTables().templates.items; + + // Saiga 12ga + // Toz 106 + // Remington 870 + const shotguns = ["576165642459773c7a400233", "5a38e6bac4a2826c6e06d79b", "5a7828548dc32e5a9c28b516"]; + for (const shotgunId of shotguns) + { + if (itemDb[shotgunId]._props.ShotgunDispersion) + { + itemDb[shotgunId]._props.shotgunDispersion = itemDb[shotgunId]._props.ShotgunDispersion; + } + } + } + /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile