mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-03 04:16:19 -04:00
fixed #337 and removed some lock contention
This commit is contained in:
@@ -23,6 +23,8 @@ def run(core, actor, target, commandString):
|
||||
arg3 = commandArgs[3]
|
||||
if len(commandArgs) > 4:
|
||||
arg4 = commandArgs[4]
|
||||
if len(commandArgs) > 5:
|
||||
arg5 = commandArgs[5]
|
||||
|
||||
if not command:
|
||||
return
|
||||
@@ -41,7 +43,14 @@ def run(core, actor, target, commandString):
|
||||
elif command == 'teleport' and arg2 and arg3 and arg4:
|
||||
position = Point3D(float(arg2), float(arg3), float(arg4))
|
||||
core.simulationService.transferToPlanet(actor, core.terrainService.getPlanetByName(arg1), position, actor.getOrientation(), None)
|
||||
|
||||
|
||||
elif command == 'teleportplayer' and arg1 and arg2 and arg3 and arg4 and arg5:
|
||||
player = core.chatService.getObjectByFirstName(arg1)
|
||||
if player:
|
||||
position = Point3D(float(arg3), float(arg4), float(arg5))
|
||||
core.simulationService.transferToPlanet(player, core.terrainService.getPlanetByName(arg2), position, player.getOrientation(), None)
|
||||
|
||||
|
||||
elif command == 'credits' and arg1:
|
||||
actor.setCashCredits(actor.getCashCredits() + int(arg1))
|
||||
actor.sendSystemMessage('The Galactic Empire has transferred ' + arg1 + ' credits to you for your service.', 0)
|
||||
|
||||
@@ -13,7 +13,7 @@ def run(core, actor, target, commandString):
|
||||
return
|
||||
|
||||
|
||||
if target.getPosition().getDistance2D(actor.getWorldPosition()) > float(20):
|
||||
if target.getWorldPosition().getDistance2D(actor.getWorldPosition()) > float(20):
|
||||
actor.sendSystemMessage(target.getCustomName() + ' is too far away to watch.', 0)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user