Address bug #13967: Animation glitches with terrain filters.
This needed both fixes in mainline and a bit of wmllint logic to ensure that incoming UMC gets converted.
This commit is contained in:
parent
f4bdbe09f0
commit
99cae53110
4 changed files with 14 additions and 7 deletions
|
@ -395,9 +395,9 @@
|
|||
start_time=0
|
||||
[filter]
|
||||
[filter_location]
|
||||
terrain=!,W*,Qx*,Ql*
|
||||
terrain_type=!,W*,Qx*,Ql*
|
||||
[or]
|
||||
terrain=Wwf,Wwr,*^V*
|
||||
terrain_type=Wwf,Wwr,*^V*
|
||||
[/or]
|
||||
[/filter_location]
|
||||
[/filter]
|
||||
|
@ -413,9 +413,9 @@
|
|||
submerge=0.01
|
||||
[filter]
|
||||
[filter_location]
|
||||
terrain=W*,Qx*,Ql*
|
||||
terrain_type=W*,Qx*,Ql*
|
||||
[not]
|
||||
terrain=Wwf,Wwr,*^V*
|
||||
terrain_type=Wwf,Wwr,*^V*
|
||||
[/not]
|
||||
[/filter_location]
|
||||
[/filter]
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
[/standing_anim]
|
||||
[standing_anim]
|
||||
start_time=-50
|
||||
terrain=Wo,Ww,Ww^Vm,Chs,Chw,Ss
|
||||
terrain_type=Wo,Ww,Ww^Vm,Chs,Chw,Ss
|
||||
[frame]
|
||||
image="units/goblins/wolf-rider-water.png"
|
||||
duration=50
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
[/standing_anim]
|
||||
[standing_anim]
|
||||
start_time=-50
|
||||
terrain=Wo,Ww,Ww^Vm,Chs,Chw,Ss
|
||||
terrain_type=Wo,Ww,Ww^Vm,Chs,Chw,Ss
|
||||
[frame]
|
||||
image="units/monsters/wolf-water.png"
|
||||
duration=50
|
||||
|
|
|
@ -1373,7 +1373,8 @@ def hack_syntax(filename, lines):
|
|||
lines[i] = lines[i].replace("{@campaigns/", "{~add-ons/")
|
||||
elif "@add-ons/" in lines[i]:
|
||||
lines[i] = lines[i].replace("{@add-ons/", "{~add-ons/")
|
||||
# Rename the terrAin definition tag
|
||||
# Rename the terrain definition tag
|
||||
in_standing_anim = False
|
||||
for i in range(len(lines)):
|
||||
if "no-syntax-rewrite" in lines[i]:
|
||||
break
|
||||
|
@ -1382,6 +1383,12 @@ def hack_syntax(filename, lines):
|
|||
# Ugh...relies on code having been wmlindented
|
||||
lines[i] = re.sub(r"^\[terrain\]", "[terrain_type]", lines[i])
|
||||
lines[i] = re.sub(r"^\[/terrain\]", "[/terrain_type]", lines[i])
|
||||
if "[standing_anim]" in lines[i]:
|
||||
in_standing_anim = True
|
||||
if "[/standing_anim]" in lines[i]:
|
||||
in_standing_anim = False
|
||||
if in_standing_anim:
|
||||
lines[i] = re.sub(r"terrain", "terrain_type", lines[i])
|
||||
# More syntax transformations would go here.
|
||||
return lines
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue