Skip to content

Commit

Permalink
simplified 'get player position'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cubitect committed Oct 3, 2016
1 parent fbc6c87 commit 7687a0a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
10 changes: 4 additions & 6 deletions ASMEventMarker.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,10 @@ def create_mod(util):
pos = findOps(lines,pos+1,[['ldc','culling']])
if pos is None:
break
pos = findOps(lines,pos+1,[['dstore']])
playerX = endw(lines[pos],1)
pos = findOps(lines,pos+1,[['dstore']])
playerY = endw(lines[pos],1)
pos = findOps(lines,pos+1,[['dstore']])
playerZ = endw(lines[pos],1)
pos = findOps(lines,pos+1,[['dload'],['dload'],['dload']])
playerX = endw(lines[pos-2],1)
playerY = endw(lines[pos-1],1)
playerZ = endw(lines[pos ],1)
pos = findOps(lines,pos+1,[['ldc','hand']])
lines.insert(pos+2,'dload '+playerX+'\n')
lines.insert(pos+3,'dload '+playerY+'\n')
Expand Down
Binary file modified ASMEventMarker.pyc
Binary file not shown.
10 changes: 4 additions & 6 deletions ASMVillageMarker.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,10 @@ def create_mod(util):
pos = findOps(lines,pos+1,[['ldc','culling']])
if pos is None:
break
pos = findOps(lines,pos+1,[['dstore']])
playerX = endw(lines[pos],1)
pos = findOps(lines,pos+1,[['dstore']])
playerY = endw(lines[pos],1)
pos = findOps(lines,pos+1,[['dstore']])
playerZ = endw(lines[pos],1)
pos = findOps(lines,pos+1,[['dload'],['dload'],['dload']])
playerX = endw(lines[pos-2],1)
playerY = endw(lines[pos-1],1)
playerZ = endw(lines[pos ],1)
pos = findOps(lines,pos+1,[['ldc','hand']])
lines.insert(pos+2,'dload '+playerX+'\n')
lines.insert(pos+3,'dload '+playerY+'\n')
Expand Down
Binary file modified ASMVillageMarker.pyc
Binary file not shown.

0 comments on commit 7687a0a

Please sign in to comment.