-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Что вы можете посоветовать?Данный silent блочится , если магнитуда более 3
Код:
private bool SilentAim(Character localCharacter, Character targetCharacter) {
InventoryItem currentEquippedItem = DC4Local.GetCurrentEquippedItem(localCharacter.GetComponent < HumanController > ());
if (currentEquippedItem == null) {
return false;
}
uLink.BitStream stream = new uLink.BitStream(false);
if (currentEquippedItem is BulletWeaponItem < BulletWeaponDataBlock > ) {
BulletWeaponItem < BulletWeaponDataBlock > item2 = currentEquippedItem as BulletWeaponItem < BulletWeaponDataBlock > ;
stream.WriteByte(9);
stream.Write < NetEntityID > (NetEntityID.Get((UnityEngine.MonoBehaviour) targetCharacter), new object[0]);
stream.WriteVector3(targetCharacter.transform.position);
item2.itemRepresentation.ActionStream(1, uLink.RPCMode.Server, stream);
} else if (currentEquippedItem is BowWeaponItem < BowWeaponDataBlock > ) {
BowWeaponItem < BowWeaponDataBlock > item3 = currentEquippedItem as BowWeaponItem < BowWeaponDataBlock > ;
stream.Write < NetEntityID > (NetEntityID.Get((UnityEngine.MonoBehaviour) targetCharacter), new object[0]);
stream.Write < Vector3 > (targetCharacter.transform.position, new object[0]);
item3.itemRepresentation.ActionStream(2, uLink.RPCMode.Server, stream);
} else {
if (!(currentEquippedItem is BulletWeaponItem < ShotgunDataBlock > )) {
return false;
}
BulletWeaponItem < ShotgunDataBlock > item4 = currentEquippedItem as BulletWeaponItem < ShotgunDataBlock > ;
for (int i = 0; i < item4.datablock.numPellets; i++) {
stream.WriteByte(9);
stream.Write < NetEntityID > (NetEntityID.Get((UnityEngine.MonoBehaviour) targetCharacter), new object[0]);
stream.WriteVector3(targetCharacter.transform.position);
}
item4.itemRepresentation.ActionStream(1, uLink.RPCMode.Server, stream);
}
return true;
}