Selaa lähdekoodia

only run the script in region, oops for invul

Emagi 1 vuosi sitten
vanhempi
commit
230db3ee00
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      EQ2/source/WorldServer/Spawn.cpp

+ 3 - 1
EQ2/source/WorldServer/Spawn.cpp

@@ -4463,7 +4463,9 @@ int32 Spawn::InsertRegionToSpawn(Region_Node* node, ZBSP_Node* bsp_root, WaterRe
 	status.inRegion = in_region;
 	status.regionType = regionType;
 	int32 returnValue = 0;
-	lua_interface->RunRegionScript(node->regionScriptName, "EnterRegion", GetZone(), this, RegionTypeUntagged, &returnValue);
+	if(in_region) {
+		lua_interface->RunRegionScript(node->regionScriptName, "EnterRegion", GetZone(), this, RegionTypeUntagged, &returnValue);
+	}
 	status.timerTic = returnValue;
 	status.lastTimerTic = returnValue ? Timer::GetCurrentTime2() : 0;
 	Regions.insert(make_pair(newMap, status));