Skip to content

Commit 73cbf6f

Browse files
authored
Fix some mistakes in combat override (#46)
* Added New Flag . * Fix wrong definitions They are used as SWING_SWINGING in combat_override, but defined as war_swing_swinging. * Fix wrong combat flag checks
1 parent 0821545 commit 73cbf6f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

_incomplete/combat_override.scp

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ endif
4545
if (<CanSee <src>>) // If I can see my target.
4646
// And my target is being ridden (should not happen) or ! CanSeeLos (Ignoring windows if i'm shooting).
4747
if ( (<src.brain> && <src.flags>&statf_ridden) || !<CanSeeLosFlag <src>,<qval ( <Action>==archery || <action>==throwing )? LOS_NB_WINDOWS : 0>>)
48-
if ( !<serv.CombatFlags>&200 || <Swing>!=SWING_SWINGING) // I'm going to stop (unless i'm preparing to hit and Combat_StayInRange is not set).
48+
if ( !<serv.CombatFlags>&0200 || <Swing>!=SWING_SWINGING) // I'm going to stop (unless i'm preparing to hit and Combat_StayInRange is not set).
4949
argn1 SWING_READY
5050
return 1
5151
endif
5252
argn1 SWING_EQUIPPING
5353
return 1
5454
endif
5555
else
56-
if ( !<serv.CombatFlags>&200 || <Swing>!=SWING_SWINGING) // same here but without LOS check.
56+
if ( !<serv.CombatFlags>&0200 || <Swing>!=SWING_SWINGING) // same here but without LOS check.
5757
argn1 SWING_READY
5858
return 1
5959
endif
@@ -94,7 +94,7 @@ if (<weapon>)
9494

9595
if ( <local.dist> > <local.maxdist ) // If my target is far than my weapon's max distance...
9696

97-
if ( !<serv.CombatFlags>&200 || <Swing>!=SWING_SWINGING) // and I'm not preparing to hit or not Combat_StayInRange
97+
if ( !<serv.CombatFlags>&0200 || <Swing>!=SWING_SWINGING) // and I'm not preparing to hit or not Combat_StayInRange
9898
argn1 SWING_READY
9999
return 1
100100
endif

core/defs.scp

+3-3
Original file line numberDiff line numberDiff line change
@@ -577,9 +577,9 @@ can_u_none 020
577577
can_o_nosleep 010000000
578578

579579
[DEFNAME swing_types]
580-
war_swing_equipping 0 // we are recoiling our weapon.
581-
war_swing_ready 1 // we can swing at any time.
582-
war_swing_swinging 2 // we are swinging our weapon.
580+
swing_equipping 0 // we are recoiling our weapon.
581+
swing_ready 1 // we can swing at any time.
582+
swing_swinging 2 // we are swinging our weapon.
583583

584584
[DEFNAME theme_packs]
585585
theme_gothic 1

0 commit comments

Comments
 (0)