Update of /cvsroot/wpdev/xmlscripts/scripts/commands
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11747/commands
Modified Files:
move.py wipe.py
Log Message:
command improvements
Index: wipe.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/wipe.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** wipe.py 20 Sep 2004 04:02:11 -0000 1.5
--- wipe.py 21 Sep 2004 12:36:11 -0000 1.6
***************
*** 73,78 ****
def wipeBoundingBox( socket, target1, target2 ):
count = 0
! iterator = wolfpack.itemregion( target1.pos.x, target1.pos.y, target2.pos.x, target2.pos.y, target2.pos.map )
item = iterator.first
while item:
--- 73,83 ----
def wipeBoundingBox( socket, target1, target2 ):
+ x1 = min(target1.pos.x, target2.pos.x)
+ x2 = max(target1.pos.x, target2.pos.x)
+ y1 = min(target1.pos.y, target2.pos.y)
+ y2 = max(target1.pos.y, target2.pos.y)
+
count = 0
! iterator = wolfpack.itemregion( x1, y1, x2, x2, target2.pos.map )
item = iterator.first
while item:
Index: move.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/move.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** move.py 28 Aug 2004 16:14:10 -0000 1.2
--- move.py 21 Sep 2004 12:36:11 -0000 1.3
***************
*** 90,112 ****
return True
elif target.char:
! if target.char.npc:
! npc = target.char
! pos = npc.pos
! if type(newmap) == int:
! newposition = "%i,%i,%i,%i" % ( (pos.x + xmod) , (pos.y + ymod ), (pos.z + zmod), newmap )
! else:
! newposition = "%i,%i,%i,%i" % ( (pos.x + xmod) , (pos.y + ymod ), (pos.z + zmod), pos.map )
! npc.pos = newposition
! npc.update()
! return True
else:
! player = target.char
! pos = player.pos
! if type(newmap) == int:
! newposition = "%i,%i,%i,%i" % ( (pos.x + xmod) , (pos.y + ymod ), (pos.z + zmod), newmap )
! else:
! newposition = "%i,%i,%i,%i" % ( (pos.x + xmod) , (pos.y + ymod ), (pos.z + zmod), pos.map )
! player.pos = newposition
! player.update()
! return True
return True
--- 90,104 ----
return True
elif target.char:
! char = target.char
! pos = char.pos
! if type(newmap) == int:
! newposition = wolfpack.coord( (pos.x + xmod) , (pos.y + ymod ), (pos.z + zmod), newmap )
else:
! newposition = wolfpack.coord( (pos.x + xmod) , (pos.y + ymod ), (pos.z + zmod), pos.map )
! char.removefromview()
! char.moveto( newposition )
! char.update()
! if char.socket:
! char.socket.resendworld()
! return True
return True
|