diff --git a/scripts/commands/setwaypointactivestatus.py b/scripts/commands/setwaypointactivestatus.py index e8ff2891..70d5b50c 100644 --- a/scripts/commands/setwaypointactivestatus.py +++ b/scripts/commands/setwaypointactivestatus.py @@ -5,6 +5,8 @@ def setup(): def run(core, actor, target, commandString): playerObject = actor.getSlottedObject('ghost') + if target is None: + return waypointTarget = core.objectService.getObject(target.getObjectID()) wp = playerObject.getWaypointFromList(target) if wp.isActive() == True: diff --git a/scripts/commands/waypoint.py b/scripts/commands/waypoint.py index 3d7b5c12..64e33136 100644 --- a/scripts/commands/waypoint.py +++ b/scripts/commands/waypoint.py @@ -33,7 +33,7 @@ def run(core, actor, target, commandString): #/wp X Z Y NAME if isFloat(commandArgs[0]) and isFloat(commandArgs[1]) and isFloat(commandArgs[2]): - waypoint = core.objectService.createObject('object/waypoint/shared_waypoint.iff', actor.getPlanet(), actor.getWorldPosition().x, actor.getWorldPosition().z, actor.getWorldPosition().y) + waypoint = core.objectService.createObject('object/waypoint/shared_waypoint.iff', actor.getPlanet(), float(commandArgs[0]), float(commandArgs[2]), float(commandArgs[1])) waypoint.setActive(True) waypoint.setColor(WaypointObject.BLUE) name = commandString.split(" ", 3)