Subject: Powered Turret Manual-Fire Desync and Ammunition Modifier Issue in V3.0 b259
Hello TFP,
I am reporting a powered turret issue observed on a V3.0 b259 dedicated multiplayer server.
Environment
Game version: V3.0 b259
Server: Linux dedicated server
Mode: Multiplayer PvP
Turret type: Powered block turret
Custom turret base: shotgunTurret
Ammunition tested: AP ammunition
Our custom “Grandpa Turret” extends the vanilla shotgunTurret. We originally used the shotgun turret as the base because earlier versions appeared to process shotgun turrets more reliably on the server than SMG turrets.
In previous versions, we experienced turret-related multiplayer problems including:
Shots appearing to originate away from the turret
Hits occurring after a player moved behind cover
Turrets visibly aiming away from the player they damaged
Turrets failing to hit valid moving targets
Differences between what the turret operator saw and what other players saw
Unreliable damage during remote camera control
We are trying to determine which of those issues remain in V3.0.
Current player report
A player reported that the Grandpa Turret can be loaded with AP ammunition but sometimes does approximately zero damage.
The most important distinction appears to be whether the turret is operating automatically or being fired manually through the turret camera interface.
Static code-audit findings
A static audit of the V3.0 b259 managed assemblies indicates that the vanilla powered block turrets now share the same general system:
autoTurret
shotgunTurret extends autoTurret
m60Turret extends autoTurret
BlockRanged
TileEntityPoweredRangedTrap
AutoTurretController
AutoTurretFireController
The shotgun turret does not appear to use a separate firing-authority implementation from the SMG and M60 powered turrets.
Autonomous firing
The autonomous firing path appears to be server-authoritative.
The server performs the ammunition decrement and receives the loaded ammunition type:
if (ConnectionManager.Instance.IsServer)
{
if (!TileEntity.IsUserAccessing())
{
if (!TileEntity.DecrementAmmo(out ammo))
return;
}
}
The server then performs the damaging raycast and hit processing.
This suggests that autonomous powered turret firing is now handled by the server for SMG, shotgun, M60 and derived powered turrets.
Manual camera firing
Manual firing appears to follow a different path.
The turret camera interface calls:
XUiC_CameraWindow.Update()
→ AutoTurretFireController.PlayerFire()
The controlling client appears to be allowed to continue through the firing path while the turret has an active user:
if (!ConnectionManager.Instance.IsServer)
{
if (atc == null || atc.UserAccessingId == -1)
return;
}
This indicates that shot initiation, direction and hit selection during manual camera control may originate on the controlling client.
That could explain multiplayer symptoms involving latency or disagreement between client and server positions:
Apparent out-of-body hits
Hits after a target reaches cover
Turret rotation not matching the damaging shot
Different aim presentation between clients
Moving-target misses during latency or low server FPS
Suspected ammunition bug during manual firing
The more serious issue is that the loaded ammunition appears to be resolved only in the server autonomous branch:
TileEntity.DecrementAmmo(out ammo);
During client-controlled manual firing, the local firing path may continue with:
ammo == null
If the actual loaded ammunition ItemValue is unavailable, the firing calculation may fall back to the block’s base properties instead of using the loaded ammunition’s passive effects.
Our custom turret currently has approximately:
<property name="EntityDamage" value="10"/>
<property name="RayCount" value="1"/>
The AP ammunition is expected to provide values similar to:
EntityDamage: 38
TargetArmor reduction: 50%
Entity penetration: 1
The suspected result is:
Automatic firing:
Server resolves the AP ammunition.
AP damage and modifiers are applied.
Manual camera firing:
Client does not receive or resolve the loaded AP ItemValue.
The shot falls back to the turret block’s base damage.
AP armor reduction and penetration may be absent.
Against an armored player, a base damage value of 10 without the AP armor modifier can appear to do almost no damage.
Suggested reproduction test
- Place a vanilla powered turret or a powered turret derived from shotgunTurret.
- Load it with AP ammunition.
- Use a player wearing known armor as the target.
- Record the damage from one autonomous turret hit.
- Repair or reset the target’s health.
- Fire the same turret and ammunition manually through the camera interface.
- Compare the health loss.
- Repeat with standard ammunition.
- Repeat with the vanilla SMG, shotgun and M60 powered turrets.
A significant difference between autonomous and manual AP damage would support the ammunition-resolution issue.
Expected behavior
Manual and automatic firing should use the same authoritative ammunition data:
Same loaded ammunition type
Same EntityDamage
Same armor modifier
Same penetration count
Same range
Same ray count
Same spread calculation
Same damage authority
The client camera should send an input or aim request, while the server should validate the ammunition, consume it, calculate the shot and apply the hit.
Actual suspected behavior
Automatic firing:
Server consumes ammunition and calculates damage correctly.
Manual camera firing:
Client initiates the damaging firing path.
Loaded ammunition data may be null or unavailable.
Block fallback damage may be used.
AP modifiers may not be applied.
Shot direction may be based on the controlling client’s world state.
Requested review
Please review the following areas:
AutoTurretFireController.Fire()
AutoTurretFireController.PlayerFire()
XUiC_CameraWindow.Update()
TileEntityPoweredRangedTrap.DecrementAmmo()
Powered turret target synchronization
Manual turret shot validation
Ammunition ItemValue synchronization
The preferred correction would be:
- Make manual powered-turret damage server-authoritative.
- Send the operator’s requested aim direction and fire input to the server.
- Resolve and consume the loaded ammunition on the server.
- Apply the actual ammunition ItemValue and all passive effects.
- Perform the damaging raycast on the server.
- Synchronize the resulting shot and visual effects to clients.
- Ensure automatic and manual firing use the same damage-calculation path.
This may affect all powered block turrets rather than only our custom turret, because the vanilla SMG, shotgun and M60 turrets appear to share the same controller classes.
The current evidence comes from static assembly inspection and player reports. A developer-side runtime test would be needed to confirm the complete network and damage flow.