Constrained weapon behavior to client side only

This commit is contained in:
Jocke
2016-03-04 08:55:55 +01:00
parent d78a7e20e2
commit e2674d915e
2 changed files with 10 additions and 7 deletions
@@ -242,8 +242,10 @@ private:
// Spawn the weapon(s)
EntityWrapper firstPersonWeapon;
EntityWrapper thirdPersonWeapon;
if (firstPersonAttachment.Valid()) {
firstPersonWeapon = SpawnerSystem::Spawn(firstPersonAttachment, firstPersonAttachment);
if (IsClient) {
if (firstPersonAttachment.Valid()) {
firstPersonWeapon = SpawnerSystem::Spawn(firstPersonAttachment, firstPersonAttachment);
}
}
if (thirdPersonAttachment.Valid()) {
thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment);