Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix range weapon sfx #381

Merged
merged 1 commit into from
Sep 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Codigo/Protocol.bas
Original file line number Diff line number Diff line change
Expand Up @@ -3592,9 +3592,6 @@ Private Sub HandleWorkLeftClick(ByVal UserIndex As Integer)
UserList(tU).Counters.timeFx = 2
212 Call SendData(SendTarget.ToPCAliveArea, tU, PrepareMessageCreateFX(UserList(tU).Char.charindex, FX, 0, UserList(tU).Pos.X, UserList(tU).Pos.y))
End If
If ObjData(.invent.MunicionEqpObjIndex).CreaFX > 0 Then
Call SendData(SendTarget.ToPCAliveArea, UserIndex, PrepareMessagePlayWave(ObjData(.invent.MunicionEqpObjIndex).CreaFX, UserList(UserIndex).pos.x, UserList(UserIndex).pos.y))
End If
If ProjectileType > 0 And (.flags.Oculto = 0 Or Not MapInfo(.pos.Map).KeepInviOnAttack) Then
Call SendData(SendTarget.ToPCAliveArea, UserIndex, PrepareCreateProjectile(UserList(UserIndex).Pos.X, UserList(UserIndex).Pos.y, X, y, ProjectileType))
End If
Expand Down Expand Up @@ -3644,7 +3641,9 @@ Private Sub HandleWorkLeftClick(ByVal UserIndex As Integer)
242 With .Invent
If WeaponData.Proyectil = 1 And WeaponData.Municion > 0 Then
244 DummyInt = .MunicionEqpSlot

If ObjData(.WeaponEqpObjIndex).CreaWav > 0 Then
Call SendData(SendTarget.ToPCAliveArea, UserIndex, PrepareMessagePlayWave(ObjData(.WeaponEqpObjIndex).CreaWav, UserList(UserIndex).pos.x, UserList(UserIndex).pos.y))
End If
If DummyInt <> 0 Then
'Take 1 arrow away - we do it AFTER hitting, since if Ammo Slot is 0 it gives a rt9 and kicks players
246 If consumirMunicion Then
Expand Down