diff --git a/sku.0/sys.server/compiled/game/script/ai/ai.script b/sku.0/sys.server/compiled/game/script/ai/ai.script index 72b89248a..520937134 100644 --- a/sku.0/sys.server/compiled/game/script/ai/ai.script +++ b/sku.0/sys.server/compiled/game/script/ai/ai.script @@ -3077,7 +3077,7 @@ trigger OnGiveItem (obj_id item, obj_id giver) location locGoodLocation = locations.getGoodLocationAroundLocationAvoidCollidables(currentLoc, searchSize, searchSize, searchSize, searchSize, false, false, 6.0f); if(locGoodLocation==null) { - locGoodLocation = currentLoc; + locGoodLocation = (location)currentLoc.clone(); } int mobCount = rand(1, 3); diff --git a/sku.0/sys.server/compiled/game/script/ai/dancing_droid.script b/sku.0/sys.server/compiled/game/script/ai/dancing_droid.script index 27c1c8336..154322225 100644 --- a/sku.0/sys.server/compiled/game/script/ai/dancing_droid.script +++ b/sku.0/sys.server/compiled/game/script/ai/dancing_droid.script @@ -48,7 +48,7 @@ trigger OnObjectMenuSelect(obj_id player, int item) droidName = "@" + droidName; //use current location as default - location holoOneLocation = startLocation; + location holoOneLocation = (location)startLocation.clone(); boolean goodLocation = false; //loop 10 times looking for a good location in a circle around the droid @@ -83,7 +83,7 @@ trigger OnObjectMenuSelect(obj_id player, int item) setName(holo_01, droidName); //start finding location for hologram 2 - location holoTwoLocation = startLocation; + location holoTwoLocation = (location)startLocation.clone(); goodLocation = false; //loop 10 times looking for a suitable location @@ -276,7 +276,7 @@ messageHandler moveDancingDroidNewLocation() if(utils.hasScriptVar(self, "music.stillPlaying")) { - location moveToLoc = startLocation; + location moveToLoc = (location)startLocation.clone(); boolean goodLocation = false; for(int i = 0; i < 10; ++i) { diff --git a/sku.0/sys.server/compiled/game/script/ai/override_behavior/scout.script b/sku.0/sys.server/compiled/game/script/ai/override_behavior/scout.script index 585a73c14..ab91c3999 100644 --- a/sku.0/sys.server/compiled/game/script/ai/override_behavior/scout.script +++ b/sku.0/sys.server/compiled/game/script/ai/override_behavior/scout.script @@ -383,7 +383,7 @@ messageHandler callLambdaSupport() location tmp = utils.getRandomLocationInRing(there, 5f, 10f); if ( tmp != null ) - there = tmp; + there = (location)tmp.clone(); if ( there != null ) gcw.spawnViaLambdaPerGeo(there, d); diff --git a/sku.0/sys.server/compiled/game/script/event/gcwraids/cheerleader.script b/sku.0/sys.server/compiled/game/script/event/gcwraids/cheerleader.script index 5b89c526b..43ca22614 100644 --- a/sku.0/sys.server/compiled/game/script/event/gcwraids/cheerleader.script +++ b/sku.0/sys.server/compiled/game/script/event/gcwraids/cheerleader.script @@ -106,7 +106,7 @@ messageHandler spawnEscortsAndCeleb() { int type = getIntObjVar(self, "event.gcwraids.cheerleader_type"); location here = getLocation(self); - location celebSpot = here; + location celebSpot = (location)here.clone(); celebSpot.z -= 12; obj_id celeb = create.object(CELEB[type], celebSpot); @@ -390,4 +390,4 @@ messageHandler escortDied() } return SCRIPT_CONTINUE; -} \ No newline at end of file +} diff --git a/sku.0/sys.server/compiled/game/script/faction_perk/minefield/field.script b/sku.0/sys.server/compiled/game/script/faction_perk/minefield/field.script index 264240d20..334a47e87 100644 --- a/sku.0/sys.server/compiled/game/script/faction_perk/minefield/field.script +++ b/sku.0/sys.server/compiled/game/script/faction_perk/minefield/field.script @@ -1007,7 +1007,7 @@ commandHandler cmdDefuseMinefield() pvpSetFactionEnemyFlag(target, mFac); location here = getLocation(target); - location there = locs[idx]; + location there = (location)locs[idx].clone(); float travel = getDistance(here, there); location minefield = getLocation(self); diff --git a/sku.0/sys.server/compiled/game/script/fishing/player.script b/sku.0/sys.server/compiled/game/script/fishing/player.script index 7fbaef451..294448561 100644 --- a/sku.0/sys.server/compiled/game/script/fishing/player.script +++ b/sku.0/sys.server/compiled/game/script/fishing/player.script @@ -451,7 +451,7 @@ messageHandler handleReelIn() /*LOG("fishing","handleReelIn: setting location scriptvar to " + updatedLoc.toString()); utils.setScriptVar(self, minigame.SCRIPTVAR_LOCATION, updatedLoc);*/ - location markerLoc = updatedLoc; + location markerLoc = (location)updatedLoc.clone(); markerLoc.y = getWaterTableHeight(markerLoc); setLocation(marker, markerLoc); @@ -601,4 +601,4 @@ messageHandler handleCleanupSplash() destroyObject(splash); return SCRIPT_CONTINUE; -} \ No newline at end of file +} diff --git a/sku.0/sys.server/compiled/game/script/grouping/group_object.script b/sku.0/sys.server/compiled/game/script/grouping/group_object.script index b0900967e..6880479fe 100644 --- a/sku.0/sys.server/compiled/game/script/grouping/group_object.script +++ b/sku.0/sys.server/compiled/game/script/grouping/group_object.script @@ -115,7 +115,7 @@ location calculateNearestGroupMission(obj_id self) { // no nearestGroupMission, start with the first mission // in the locations list - nearestGroupMission = missionLocations[0]; + nearestGroupMission = (location)missionLocations[0].clone(); } else { @@ -139,7 +139,7 @@ location calculateNearestGroupMission(obj_id self) for(missionLocationIndex = 0; missionLocationIndex < missionLocations.length; ++missionLocationIndex) { // initialize the location under consideration - location currentLocation = missionLocations[missionLocationIndex]; + location currentLocation = (location)missionLocations[missionLocationIndex].clone(); // verify that the mission being considered is on the same // planet as the group member @@ -189,13 +189,13 @@ location calculateNearestGroupMission(obj_id self) // this location has the most votes(so far) if(votes > mostVotes) { - nearestGroupMission = missionLocations[locationIndex.intValue()]; + nearestGroupMission = (location)missionLocations[locationIndex.intValue()].clone(); mostVotes = votes; } } // update the nearest group mission waypoint for everyone in the group - result = nearestGroupMission; + result = (location)nearestGroupMission.clone(); scriptVars.put("nearestGroupMission", nearestGroupMission); } else @@ -256,7 +256,7 @@ messageHandler missionLocationResponse() location nearestGroupMission = scriptVars.getLocation("nearestGroupMission"); if(nearestGroupMission == null) { - nearestGroupMission = missionLocation[0]; + nearestGroupMission = (location)missionLocation[0].clone(); scriptVars.put("nearestGroupMission", nearestGroupMission); } } diff --git a/sku.0/sys.server/compiled/game/script/item/firework/launcher.script b/sku.0/sys.server/compiled/game/script/item/firework/launcher.script index ae6ab1288..2adcccc12 100644 --- a/sku.0/sys.server/compiled/game/script/item/firework/launcher.script +++ b/sku.0/sys.server/compiled/game/script/item/firework/launcher.script @@ -40,7 +40,7 @@ messageHandler handleFireworkLaunch() location here = getLocation(self); location there = utils.getRandomLocationInRing(here, 0.5f, 1f); if ( there == null ) - there = here; + there = (location)here.clone(); params.put("loc", there); diff --git a/sku.0/sys.server/compiled/game/script/item/parrot_cage/parrot_cage.script b/sku.0/sys.server/compiled/game/script/item/parrot_cage/parrot_cage.script index c87110076..9bc119463 100644 --- a/sku.0/sys.server/compiled/game/script/item/parrot_cage/parrot_cage.script +++ b/sku.0/sys.server/compiled/game/script/item/parrot_cage/parrot_cage.script @@ -171,7 +171,7 @@ messageHandler specialMessage() debug.debugAllMsg("DEBUG", self, "#############creating special message and location############"); location parrotLoc = getLocation(parrot); - location desiredLoc = parrotLoc; + location desiredLoc = (location)parrotLoc.clone(); desiredLoc = findSpotNear(parrot, parrotLoc, LOOT_RADIUS_MAX); for(int i=0; i < 5 && !isValidLocation(desiredLoc, SPECIAL_LOC_RADIUS); ++i) diff --git a/sku.0/sys.server/compiled/game/script/item/publish_gift/holopet_emitter.script b/sku.0/sys.server/compiled/game/script/item/publish_gift/holopet_emitter.script index 1d2e5bcdf..8ec7a758f 100644 --- a/sku.0/sys.server/compiled/game/script/item/publish_gift/holopet_emitter.script +++ b/sku.0/sys.server/compiled/game/script/item/publish_gift/holopet_emitter.script @@ -270,7 +270,7 @@ void turnOn(obj_id self, obj_id player, string type) // TRY AND MAKE THE CREATURES NOT SPAWN RIGHT ON THE EMITTER for(int i = 0; i < 50; i++) { - newLoc = myLoc; + newLoc = (location)myLoc.clone(); newLoc = utils.getRandomAwayLocation(newLoc, 1f, 1.5f); @@ -278,7 +278,7 @@ void turnOn(obj_id self, obj_id player, string type) if(isValidInteriorLocation(newLoc)) break; else if(i == 49) - newLoc = myLoc; + newLoc = (location)myLoc.clone(); } obj_id pet = createObject(template, newLoc); @@ -977,4 +977,4 @@ messageHandler OnPack() if(isTurnedOn(self)) turnOff(self, player); return SCRIPT_CONTINUE; -} \ No newline at end of file +} diff --git a/sku.0/sys.server/compiled/game/script/library/battlefield.scriptlib b/sku.0/sys.server/compiled/game/script/library/battlefield.scriptlib index 709190f62..f81c41eef 100644 --- a/sku.0/sys.server/compiled/game/script/library/battlefield.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/battlefield.scriptlib @@ -2702,7 +2702,7 @@ location getFactionStartLocation(obj_id master_object, string faction) return null; location[] start_locations = getLocationArrayObjVar(master_object, VAR_START_LOCATIONS); - location loc = start_locations[idx]; + location loc = (location)start_locations[idx].clone(); // If all three coordinates are 0, then the starting location was not specified. if (loc.x == 0.0f && loc.y == 0.0f && loc.z == 0.0f) @@ -3783,7 +3783,7 @@ void createBattlefieldObjects(obj_id master_object, int idx) location[] start_locations = getLocationArrayObjVar(master_object, VAR_START_LOCATIONS); if(start_locations != null && start_locations.length > 0) { // Zero length array check - start_locations[jidx] = faction_start; + start_locations[jidx] = (location)faction_start.clone(); setObjVar(master_object, VAR_START_LOCATIONS, start_locations); } } diff --git a/sku.0/sys.server/compiled/game/script/library/camping.scriptlib b/sku.0/sys.server/compiled/game/script/library/camping.scriptlib index bf826d08d..0922ef268 100644 --- a/sku.0/sys.server/compiled/game/script/library/camping.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/camping.scriptlib @@ -911,7 +911,7 @@ void initializeAdvancedCamp(obj_id deed, obj_id camp, obj_id player, location lo { if(ovl.getFloatObjVar(modules[i]) != 0.0f) { - location tempLoc = loc; + location tempLoc = (location)loc.clone(); location nodeLoc = getAdvancedCampNodeLocation(camp, tempLoc, nodeCount); int nodeYaw = getAdvancedCampNodeYaw(camp, nodeCount); diff --git a/sku.0/sys.server/compiled/game/script/library/city.scriptlib b/sku.0/sys.server/compiled/game/script/library/city.scriptlib index ea5228f40..2b3a83e0c 100644 --- a/sku.0/sys.server/compiled/game/script/library/city.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/city.scriptlib @@ -1227,7 +1227,7 @@ void setCloneInfo(int city_id, location cityCloneLoc, location cityCloneRespawn, void updateLocation(int city_id, location new_loc) { obj_id cityHall = cityGetCityHall(city_id); - location cityLoc = new_loc; + location cityLoc = (location)new_loc.clone(); citySetLocation(city_id, new_loc); } diff --git a/sku.0/sys.server/compiled/game/script/library/cloninglib.scriptlib b/sku.0/sys.server/compiled/game/script/library/cloninglib.scriptlib index 1f6c6dbce..c60c7145a 100644 --- a/sku.0/sys.server/compiled/game/script/library/cloninglib.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/cloninglib.scriptlib @@ -516,8 +516,8 @@ Vector getAvailableCloningFacilities(obj_id player) { playerFacility = idList[i]; playerFacilityName = nameList[i]; - playerFacilityLoc = locList[i]; - playerFacilitySpawnLoc = respawnList[i]; + playerFacilityLoc = (location)locList[i].clone(); + playerFacilitySpawnLoc = (location)respawnList[i].clone(); playerCityDist = dist; } break; @@ -556,8 +556,8 @@ Vector getAvailableCloningFacilities(obj_id player) { factionFacility = idList[i]; factionFacilityName = nameList[i]; - factionFacilityLoc = locList[i]; - factionFacilitySpawnLoc = respawnList[i]; + factionFacilityLoc = (location)locList[i].clone(); + factionFacilitySpawnLoc = (location)respawnList[i].clone(); factionFacilityDist = dist; } } @@ -569,8 +569,8 @@ Vector getAvailableCloningFacilities(obj_id player) { factionFacility = idList[i]; factionFacilityName = nameList[i]; - factionFacilityLoc = locList[i]; - factionFacilitySpawnLoc = respawnList[i]; + factionFacilityLoc = (location)locList[i].clone(); + factionFacilitySpawnLoc = (location)respawnList[i].clone(); factionFacilityDist = dist; } } @@ -587,8 +587,8 @@ Vector getAvailableCloningFacilities(obj_id player) { pvpAdvancedFacility = idList[i]; pvpAdvancedFacilityName = nameList[i]; - pvpAdvancedFacilityLoc = locList[i]; - pvpAdvancedFacilitySpawnLoc = respawnList[i]; + pvpAdvancedFacilityLoc = (location)locList[i].clone(); + pvpAdvancedFacilitySpawnLoc = (location)respawnList[i].clone(); pvpAdvancedFacilityDist = dist; } @@ -606,8 +606,8 @@ Vector getAvailableCloningFacilities(obj_id player) { pvpAdvancedFacility = idList[i]; pvpAdvancedFacilityName = nameList[i]; - pvpAdvancedFacilityLoc = locList[i]; - pvpAdvancedFacilitySpawnLoc = respawnList[i]; + pvpAdvancedFacilityLoc = (location)locList[i].clone(); + pvpAdvancedFacilitySpawnLoc = (location)respawnList[i].clone(); pvpAdvancedFacilityDist = dist; } @@ -617,8 +617,8 @@ Vector getAvailableCloningFacilities(obj_id player) { playerCamp = idList[i]; playerCampName = nameList[i]; - playerCampLoc = locList[i]; - playerCampSpawnLoc = respawnList[i]; + playerCampLoc = (location)locList[i].clone(); + playerCampSpawnLoc = (location)respawnList[i].clone(); playerCampDist = dist; } diff --git a/sku.0/sys.server/compiled/game/script/library/create.scriptlib b/sku.0/sys.server/compiled/game/script/library/create.scriptlib index a0e1a1c11..384e19a83 100644 --- a/sku.0/sys.server/compiled/game/script/library/create.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/create.scriptlib @@ -71,7 +71,7 @@ obj_id staticObject( string objectName, location spawnLocation ) return creature; } -/* -----------------12/5/2002 2:49PM----------------- +/* ---------------------------------- * creates an object from template, creature datatable or npc datatable * * @param objectName the templatename, creature or NPC type to create @@ -242,7 +242,7 @@ obj_id themeParkObject( string objectName, float xOffset, float zOffset ) } -/* -----------------12/11/2002 3:31PM---------------- +/* --------------------------------- * Used to create an NPC of a specified species or from a specific species-list * * @params creatureName the name of the creature to spawn diff --git a/sku.0/sys.server/compiled/game/script/library/groundquests.scriptlib b/sku.0/sys.server/compiled/game/script/library/groundquests.scriptlib index ba6dd9b9c..30dd5e60f 100644 --- a/sku.0/sys.server/compiled/game/script/library/groundquests.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/groundquests.scriptlib @@ -948,7 +948,7 @@ location getRandom2DLocationAroundLocation(obj_id player, float relativeOffsetX, if(!isValidQuestSpawnPoint(player, newLocation, onAFloor, inACell)) { //absolute failure to find a good point, use the original location - newLocation = playerLocation; + newLocation = (location)playerLocation.clone(); } } } @@ -998,7 +998,7 @@ boolean isValidQuestSpawnPoint(obj_id player, location newLocation, boolean onAF */ location getRandom2DLocationInRing(location startLocation, float minimumRadius, float maximumRadius) { - location newLocation = startLocation; + location newLocation = (location)startLocation.clone(); float deltaX = rand(minimumRadius, maximumRadius); if(rand(1,2) == 2) deltaX = -deltaX; diff --git a/sku.0/sys.server/compiled/game/script/library/minigame.scriptlib b/sku.0/sys.server/compiled/game/script/library/minigame.scriptlib index 2e64ae6f3..19d69fe19 100644 --- a/sku.0/sys.server/compiled/game/script/library/minigame.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/minigame.scriptlib @@ -685,7 +685,7 @@ boolean isLocationFishable(location loc) { if ( loc != null ) { - location testLoc = loc; + location testLoc = (location)loc.clone(); testLoc.y = getHeightAtLocation(loc.x, loc.z); return isBelowWater(testLoc); //temp hack } diff --git a/sku.0/sys.server/compiled/game/script/library/player_structure.scriptlib b/sku.0/sys.server/compiled/game/script/library/player_structure.scriptlib index 2d4c5b2e1..4e654c5a2 100644 --- a/sku.0/sys.server/compiled/game/script/library/player_structure.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/player_structure.scriptlib @@ -6899,7 +6899,7 @@ location transformDeltaWorldCoord(location here, float dx, float dz, float yaw) float[] xz = transformDeltaWorldCoord(dx, dz, rotation); if ( xz != null & xz.length == 2 ) { - location there = here; + location there = (location)here.clone(); there.x += xz[0]; there.z += xz[1]; @@ -7536,13 +7536,13 @@ obj_id createStructureSign(obj_id structure, float sYaw) } } - location spawn = there; + location spawn = (location)there.clone(); if ( sYaw != 0f ) { location newspawn = transformDeltaWorldCoord(here, x, z, sYaw); newspawn.y = there.y; - spawn = newspawn; + spawn = (location)newspawn.clone(); //LOG("structureSign","createStructureSign: spawn = " + spawn.toString()); } diff --git a/sku.0/sys.server/compiled/game/script/library/storyteller.scriptlib b/sku.0/sys.server/compiled/game/script/library/storyteller.scriptlib index b6d4e1c9b..ca781dfde 100755 --- a/sku.0/sys.server/compiled/game/script/library/storyteller.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/storyteller.scriptlib @@ -524,7 +524,7 @@ location rotateLocationXZ(location locOrigin, location locPoint, float fltAngle) float fltC = (float)Math.cos(fltRadians); float fltS = (float) Math.sin(fltRadians); - location locNewOffset = locOrigin; + location locNewOffset = (location)locOrigin.clone(); locNewOffset.x += (dx * fltC) + (dz * fltS); locNewOffset.y = locPoint.y; @@ -1170,7 +1170,7 @@ location rotateSavedBlueprintDataXZ(location locOrigin, location locPoint, float float fltC = (float)Math.cos(fltRadians); float fltS = (float) Math.sin(fltRadians); - location locNewOffset = locOrigin; + location locNewOffset = (location)locOrigin.clone(); locNewOffset.x += -(dx * fltC) + (dz * fltS); locNewOffset.y = locPoint.y; diff --git a/sku.0/sys.server/compiled/game/script/library/target_dummy.scriptlib b/sku.0/sys.server/compiled/game/script/library/target_dummy.scriptlib index ed1022553..e942a959d 100644 --- a/sku.0/sys.server/compiled/game/script/library/target_dummy.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/target_dummy.scriptlib @@ -161,7 +161,7 @@ obj_id createTargetDummy(obj_id controller, obj_id player) location controllerLocation = getLocation(controller); location awayLoc = utils.getRandomAwayLocation(controllerLocation, 1.f, 2.f); if((awayLoc.cell != null) || isIdValid(awayLoc.cell)) - awayLoc = controllerLocation; + awayLoc = (location)controllerLocation.clone(); if(!permittedToCallTargetDummy(player, awayLoc)) return obj_id.NULL_ID; @@ -194,7 +194,7 @@ obj_id recreateTargetDummy(obj_id controller, obj_id player) if(getTargetDummyCreatureType(controller).equals("tcg_target_dummy")) { float controllerYaw = getYaw(controller); - location offsetLoc = where; + location offsetLoc = (location)where.clone(); offsetLoc.x += 2f; location pathToLoc = utils.rotatePointXZ(where, offsetLoc, controllerYaw); pathTo(targetDummyObj, pathToLoc); diff --git a/sku.0/sys.server/compiled/game/script/library/theater.scriptlib b/sku.0/sys.server/compiled/game/script/library/theater.scriptlib index 169c2c4ff..3a73fe045 100644 --- a/sku.0/sys.server/compiled/game/script/library/theater.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/theater.scriptlib @@ -306,7 +306,7 @@ obj_id[] spawnRadial(obj_id target) } else { - spawnLoc = goodLoc; + spawnLoc = (location)goodLoc.clone(); } if ( spawnLoc.cell == obj_id.NULL_ID ) @@ -466,7 +466,7 @@ obj_id[] spawnDatatableOffset(obj_id target) float dz = fltZ[i]; float yaw =fltYaw[i]; - location here = myLoc; + location here = (location)myLoc.clone(); here = player_structure.transformDeltaWorldCoord(here, dx, dz, tYaw); @@ -659,7 +659,7 @@ void spawnDatatableOffsetQueued(obj_id target, int intIndex) float dz = fltZ[i]; float yaw =fltYaw[i]; - location here = myLoc; + location here = (location)myLoc.clone(); here = player_structure.transformDeltaWorldCoord(here, dx, dz, tYaw); @@ -678,7 +678,7 @@ void spawnDatatableOffsetQueued(obj_id target, int intIndex) float dz = fltZ[i]; float yaw =fltYaw[i]; - location here = myLoc; + location here = (location)myLoc.clone(); here = player_structure.transformDeltaWorldCoord(here, dx, dz, tYaw); @@ -697,7 +697,7 @@ void spawnDatatableOffsetQueued(obj_id target, int intIndex) float dz = fltZ[i]; float yaw =fltYaw[i]; - location here = myLoc; + location here = (location)myLoc.clone(); here = player_structure.transformDeltaWorldCoord(here, dx, dz, tYaw); child = createObject(tpf, here); @@ -714,7 +714,7 @@ void spawnDatatableOffsetQueued(obj_id target, int intIndex) float dy = fltY[i]; float dz = fltZ[i]; float yaw =fltYaw[i]; - location here = myLoc; + location here = (location)myLoc.clone(); here = player_structure.transformDeltaWorldCoord(here, dx, dz, tYaw); child = createObject(tpf, here); if(isIdValid(child)) @@ -732,7 +732,7 @@ void spawnDatatableOffsetQueued(obj_id target, int intIndex) float dy = fltY[i]; float dz = fltZ[i]; float yaw =fltYaw[i]; - location here = myLoc; + location here = (location)myLoc.clone(); here = player_structure.transformDeltaWorldCoord(here, dx, dz, tYaw); child = createObject(tpf, here); @@ -809,7 +809,7 @@ void spawnDatatableOffsetQueued(obj_id target, int intIndex) float fltC = (float)Math.cos(fltRadians); float fltS = (float)Math.sin(fltRadians); - location here = myLoc; + location here = (location)myLoc.clone(); here.x += (dx * fltC) - (dz * fltS); here.y += dy; diff --git a/sku.0/sys.server/compiled/game/script/library/utils.scriptlib b/sku.0/sys.server/compiled/game/script/library/utils.scriptlib index e5c40a62d..d0c924d2d 100644 --- a/sku.0/sys.server/compiled/game/script/library/utils.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/utils.scriptlib @@ -190,10 +190,10 @@ float getDistance2D( location locTarget1, location locTarget2 ) if ( locTarget1 == null || locTarget2 == null) return -1.00f; - location loc1 = locTarget1; + location loc1 = (location)locTarget1.clone(); loc1.y = 0f; - location loc2 = locTarget2; + location loc2 = (location)locTarget2.clone(); loc2.y = 0f; return getDistance(loc1, loc2); @@ -2707,7 +2707,7 @@ location getRandomLocationInRing(location locOrigin, float fltMinDistance, float location rotatePointXZ(location locOrigin, float fltDistance, float fltAngle) { - location locOffset = locOrigin; + location locOffset = (location)locOrigin.clone(); locOffset.x = locOrigin.x + fltDistance; locOffset.z = locOrigin.z; @@ -2723,7 +2723,7 @@ location rotatePointXZ(location locOrigin, location locPoint, float fltAngle) float fltC = (float)Math.cos(fltRadians); float fltS = (float) Math.sin(fltRadians); - location locNewOffset = locOrigin; + location locNewOffset = (location)locOrigin.clone(); locNewOffset.x += (dx * fltS) - (dz * fltC); locNewOffset.y = locPoint.y; locNewOffset.z += (dx * fltC) + (dz * fltS); @@ -2739,7 +2739,7 @@ location rotatePointXZ(location locPoint, float fltAngle) float fltC = (float) Math.cos(fltRadians); float fltS = (float) Math.sin(fltRadians); //LOG("player_spawner", "locPoint is "+locPoint); - location locNewPoint = locPoint; + location locNewPoint = (location)locPoint.clone(); locNewPoint.x += (locPoint.x * fltC) - (locPoint.z * fltS); locNewPoint.z += (locPoint.x * fltS) + (locPoint.z * fltC); diff --git a/sku.0/sys.server/compiled/game/script/npe/millennium_falcon_manager.script b/sku.0/sys.server/compiled/game/script/npe/millennium_falcon_manager.script index 89090cc03..dfe150c20 100644 --- a/sku.0/sys.server/compiled/game/script/npe/millennium_falcon_manager.script +++ b/sku.0/sys.server/compiled/game/script/npe/millennium_falcon_manager.script @@ -85,25 +85,25 @@ messageHandler setupArea() utils.setScriptVar(self, "shipsRemaining", 3); - location point1 = locSelf; + location point1 = (location)locSelf.clone(); point1.x += 200; point1.y += 40; obj_id objPoint1 = create.object("object/tangible/npe/npe_node.iff", point1); utils.setScriptVar(self, "objPoint1", objPoint1); - location point2 = locSelf; + location point2 = (location)locSelf.clone(); point2.z += 200; point2.y += 40; obj_id objPoint2 = create.object("object/tangible/npe/npe_node.iff", point2); utils.setScriptVar(self, "objPoint2", objPoint2); - location point3 = locSelf; + location point3 = (location)locSelf.clone(); point3.x += -200; point3.y += 40; obj_id objPoint3 = create.object("object/tangible/npe/npe_node.iff", point3); utils.setScriptVar(self, "objPoint3", objPoint3); - location point4 = locSelf; + location point4 = (location)locSelf.clone(); point4.z += -200; point4.y += 40; obj_id objPoint4 = create.object("object/tangible/npe/npe_node.iff", point4); diff --git a/sku.0/sys.server/compiled/game/script/systems/combat/combat_base.script b/sku.0/sys.server/compiled/game/script/systems/combat/combat_base.script index e5beeb7d3..a99329028 100644 --- a/sku.0/sys.server/compiled/game/script/systems/combat/combat_base.script +++ b/sku.0/sys.server/compiled/game/script/systems/combat/combat_base.script @@ -753,7 +753,7 @@ void startDelayedAttack(obj_id attacker, obj_id target, obj_id objWeapon, string } else if(eggPosition == 3) // LOCATION { - where = actionData.targetLoc; + where = (location)actionData.targetLoc.clone(); } @@ -1184,7 +1184,7 @@ boolean doCombatPreCheck(combat_data actionData, attacker_data attackerData, wea } else { - location where = actionData.targetLoc; + location where = (location)actionData.targetLoc.clone(); where.y += 0.5f; // gotta raise the loc, or canSee will fail as it will collide with the terrain at that location. woohoo. cansee = canSee(attackerData.id, where); //sendSystemMessageTestingOnly(obj_id.getObjId(10014554), "CanSee 1"); @@ -1327,7 +1327,7 @@ obj_id[] getCombatDefenders(obj_id self, obj_id target, weapon_data weaponData, { if(weaponData.weaponType == WEAPON_TYPE_DIRECTIONAL) { - location where = actionData.targetLoc; + location where = (location)actionData.targetLoc.clone(); // Width is an angle to the sides of your target; IE: 20 degree width is a total of 40 degrees. defenders = pvpGetTargetsInCone(self, self, where, length, width); diff --git a/sku.0/sys.server/compiled/game/script/systems/treasure_map/base/treasure_map.script b/sku.0/sys.server/compiled/game/script/systems/treasure_map/base/treasure_map.script index 1295bc423..50fd418d0 100644 --- a/sku.0/sys.server/compiled/game/script/systems/treasure_map/base/treasure_map.script +++ b/sku.0/sys.server/compiled/game/script/systems/treasure_map/base/treasure_map.script @@ -1168,7 +1168,7 @@ location getMapLocation(obj_id map, obj_id player) } else { - treasureLoc = storedLoc; + treasureLoc = (location)storedLoc.clone(); } return treasureLoc; }