Boars should not keep changing facing direction once locked in by scratching the ground. Removed the Upper flag from all Second Chapter end zones in the stage (accidentally copy-pasted). Added a check that crashes the game if these are detected. Release Build 10186.
This commit is contained in:
parent
55b5cb4738
commit
64f726b50d
@ -81,6 +81,7 @@ void Monster::STRATEGY::BOAR(Monster&m,float fElapsedTime,std::string strategy){
|
|||||||
float distanceToChargePoint=geom2d::line<float>(m.GetPos(),chargeTargetPoint).length();
|
float distanceToChargePoint=geom2d::line<float>(m.GetPos(),chargeTargetPoint).length();
|
||||||
m.F(A::TARGET_TIMER)=distanceToChargePoint/(100.f*m.GetMoveSpdMult()); //This should be how long a charge takes.
|
m.F(A::TARGET_TIMER)=distanceToChargePoint/(100.f*m.GetMoveSpdMult()); //This should be how long a charge takes.
|
||||||
m.target=chargeTargetPoint;
|
m.target=chargeTargetPoint;
|
||||||
|
m.UpdateFacingDirection(game->GetPlayer()->GetPos());
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
case PhaseName::SCRATCH:{
|
case PhaseName::SCRATCH:{
|
||||||
@ -94,7 +95,6 @@ void Monster::STRATEGY::BOAR(Monster&m,float fElapsedTime,std::string strategy){
|
|||||||
|
|
||||||
m.AddBuff(BuffType::COLLISION_KNOCKBACK_STRENGTH,15,ConfigFloat("Charge Knockback Amount"));
|
m.AddBuff(BuffType::COLLISION_KNOCKBACK_STRENGTH,15,ConfigFloat("Charge Knockback Amount"));
|
||||||
}
|
}
|
||||||
m.UpdateFacingDirection(game->GetPlayer()->GetPos());
|
|
||||||
}break;
|
}break;
|
||||||
case PhaseName::CHARGE:{
|
case PhaseName::CHARGE:{
|
||||||
m.F(A::TARGET_TIMER)-=fElapsedTime;
|
m.F(A::TARGET_TIMER)-=fElapsedTime;
|
||||||
|
@ -138,7 +138,6 @@ private:
|
|||||||
std::map<int,SpawnerTag>SpawnerData; //Spawn groups have IDs, mobs associate which spawner they are tied to via this ID.
|
std::map<int,SpawnerTag>SpawnerData; //Spawn groups have IDs, mobs associate which spawner they are tied to via this ID.
|
||||||
std::optional<std::queue<MonsterSpawnerID>>spawnControllerIDs;
|
std::optional<std::queue<MonsterSpawnerID>>spawnControllerIDs;
|
||||||
std::map<std::string,std::vector<::ZoneData>> ZoneData;
|
std::map<std::string,std::vector<::ZoneData>> ZoneData;
|
||||||
const std::map<std::string,std::vector<::ZoneData>>&GetZones()const;
|
|
||||||
public:
|
public:
|
||||||
bool skipLoadoutScreen=false;
|
bool skipLoadoutScreen=false;
|
||||||
const MapTag&GetMapData()const;
|
const MapTag&GetMapData()const;
|
||||||
@ -152,6 +151,7 @@ public:
|
|||||||
const bool HasMoreSpawns()const; //Returns whether or not there are more spawns for the spawn controller.
|
const bool HasMoreSpawns()const; //Returns whether or not there are more spawns for the spawn controller.
|
||||||
const int Spawn_pop(); //Grabs the next spawn controller ID and removes it from the stack.
|
const int Spawn_pop(); //Grabs the next spawn controller ID and removes it from the stack.
|
||||||
const Renderable*const GetOptimizedMap()const;
|
const Renderable*const GetOptimizedMap()const;
|
||||||
|
const std::map<std::string,std::vector<::ZoneData>>&GetZones()const;
|
||||||
std::string FormatLayerData(std::ostream& os, std::vector<LayerTag>tiles);
|
std::string FormatLayerData(std::ostream& os, std::vector<LayerTag>tiles);
|
||||||
std::string FormatSpawnerData(std::ostream& os, std::map<int,SpawnerTag>tiles);
|
std::string FormatSpawnerData(std::ostream& os, std::map<int,SpawnerTag>tiles);
|
||||||
friend std::ostream& operator << (std::ostream& os, Map& rhs);
|
friend std::ostream& operator << (std::ostream& os, Map& rhs);
|
||||||
|
@ -63,5 +63,10 @@ void Test::RunMapTests(){
|
|||||||
is("There is an EndZone in Dungeon "+key,
|
is("There is an EndZone in Dungeon "+key,
|
||||||
game->GetZones(key).count("EndZone"));
|
game->GetZones(key).count("EndZone"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(const ZoneData&endZone:value.GetZones().at("EndZone")){
|
||||||
|
if(endZone.isUpper&&(!value.GetZones().count("UpperZone")||value.GetZones().at("UpperZone").size()==0))ERR(std::format("WARNING! An End Zone was found in map {} with the upper flag when no upper transition zones have been defined in a stage!",value.GetMapDisplayName()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 2
|
#define VERSION_MINOR 2
|
||||||
#define VERSION_PATCH 3
|
#define VERSION_PATCH 3
|
||||||
#define VERSION_BUILD 10183
|
#define VERSION_BUILD 10186
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<map version="1.10" tiledversion="1.10.1" class="Map" orientation="orthogonal" renderorder="right-down" width="238" height="369" tilewidth="24" tileheight="24" infinite="0" nextlayerid="7" nextobjectid="127">
|
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="238" height="369" tilewidth="24" tileheight="24" infinite="0" nextlayerid="7" nextobjectid="127">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="Backdrop" propertytype="Backdrop" value="mountain_day"/>
|
<property name="Backdrop" propertytype="Backdrop" value="mountain_day"/>
|
||||||
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
<property name="Background Music" propertytype="BGM" value="foresty1_1"/>
|
||||||
@ -1877,7 +1877,11 @@
|
|||||||
</layer>
|
</layer>
|
||||||
<objectgroup id="5" name="Spawn Zones">
|
<objectgroup id="5" name="Spawn Zones">
|
||||||
<object id="2" name="Time Trial Clock" type="TrialClock" x="5112" y="8016" width="24" height="24"/>
|
<object id="2" name="Time Trial Clock" type="TrialClock" x="5112" y="8016" width="24" height="24"/>
|
||||||
<object id="5" name="End Ring" type="EndZone" x="3349" y="165" width="145" height="145"/>
|
<object id="5" name="End Ring" type="EndZone" x="3349" y="165" width="145" height="145">
|
||||||
|
<properties>
|
||||||
|
<property name="Upper?" type="bool" value="false"/>
|
||||||
|
</properties>
|
||||||
|
</object>
|
||||||
<object id="15" name="Spawn Group 1" type="SpawnGroup" x="4439" y="7869" width="496" height="424">
|
<object id="15" name="Spawn Group 1" type="SpawnGroup" x="4439" y="7869" width="496" height="424">
|
||||||
<ellipse/>
|
<ellipse/>
|
||||||
</object>
|
</object>
|
||||||
|
@ -1703,7 +1703,7 @@
|
|||||||
<object id="68" name="Player Spawn" type="PlayerSpawnLocation" x="264" y="1752" width="24" height="24"/>
|
<object id="68" name="Player Spawn" type="PlayerSpawnLocation" x="264" y="1752" width="24" height="24"/>
|
||||||
<object id="69" name="End Zone" type="EndZone" x="4872" y="42" width="72" height="72">
|
<object id="69" name="End Zone" type="EndZone" x="4872" y="42" width="72" height="72">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="Upper?" type="bool" value="true"/>
|
<property name="Upper?" type="bool" value="false"/>
|
||||||
</properties>
|
</properties>
|
||||||
</object>
|
</object>
|
||||||
</objectgroup>
|
</objectgroup>
|
||||||
|
@ -1180,7 +1180,7 @@
|
|||||||
<object id="70" name="Player Spawn" type="PlayerSpawnLocation" x="1536" y="2136" width="24" height="24"/>
|
<object id="70" name="Player Spawn" type="PlayerSpawnLocation" x="1536" y="2136" width="24" height="24"/>
|
||||||
<object id="71" name="End Zone" type="EndZone" x="4914" y="1182" width="120" height="126">
|
<object id="71" name="End Zone" type="EndZone" x="4914" y="1182" width="120" height="126">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="Upper?" type="bool" value="true"/>
|
<property name="Upper?" type="bool" value="false"/>
|
||||||
</properties>
|
</properties>
|
||||||
</object>
|
</object>
|
||||||
</objectgroup>
|
</objectgroup>
|
||||||
|
@ -1266,7 +1266,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<object id="82" name="End Zone" type="EndZone" x="7326" y="2094" width="114" height="114">
|
<object id="82" name="End Zone" type="EndZone" x="7326" y="2094" width="114" height="114">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="Upper?" type="bool" value="true"/>
|
<property name="Upper?" type="bool" value="false"/>
|
||||||
</properties>
|
</properties>
|
||||||
</object>
|
</object>
|
||||||
<object id="83" name="Player Spawn" type="PlayerSpawnLocation" x="312" y="3600" width="24" height="24"/>
|
<object id="83" name="Player Spawn" type="PlayerSpawnLocation" x="312" y="3600" width="24" height="24"/>
|
||||||
|
@ -1654,7 +1654,7 @@
|
|||||||
<object id="82" name="Player Spawn" type="PlayerSpawnLocation" x="5016" y="4440" width="24" height="24"/>
|
<object id="82" name="Player Spawn" type="PlayerSpawnLocation" x="5016" y="4440" width="24" height="24"/>
|
||||||
<object id="83" name="End Zone" type="EndZone" x="216" y="2592" width="114" height="114">
|
<object id="83" name="End Zone" type="EndZone" x="216" y="2592" width="114" height="114">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="Upper?" type="bool" value="true"/>
|
<property name="Upper?" type="bool" value="false"/>
|
||||||
</properties>
|
</properties>
|
||||||
</object>
|
</object>
|
||||||
</objectgroup>
|
</objectgroup>
|
||||||
|
@ -803,7 +803,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<object id="73" name="End Zone" type="EndZone" x="10224" y="1104" width="120" height="120">
|
<object id="73" name="End Zone" type="EndZone" x="10224" y="1104" width="120" height="120">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="Upper?" type="bool" value="true"/>
|
<property name="Upper?" type="bool" value="false"/>
|
||||||
</properties>
|
</properties>
|
||||||
</object>
|
</object>
|
||||||
<object id="74" name="Player Spawn" type="PlayerSpawnLocation" x="264" y="1104" width="24" height="24"/>
|
<object id="74" name="Player Spawn" type="PlayerSpawnLocation" x="264" y="1104" width="24" height="24"/>
|
||||||
|
@ -1436,7 +1436,7 @@
|
|||||||
<object id="70" name="Player Spawn" type="PlayerSpawnLocation" x="3480" y="4704" width="24" height="24"/>
|
<object id="70" name="Player Spawn" type="PlayerSpawnLocation" x="3480" y="4704" width="24" height="24"/>
|
||||||
<object id="71" name="End Zone" type="EndZone" x="804" y="4716" width="168" height="168">
|
<object id="71" name="End Zone" type="EndZone" x="804" y="4716" width="168" height="168">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="Upper?" type="bool" value="true"/>
|
<property name="Upper?" type="bool" value="false"/>
|
||||||
</properties>
|
</properties>
|
||||||
</object>
|
</object>
|
||||||
</objectgroup>
|
</objectgroup>
|
||||||
|
@ -1524,7 +1524,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<object id="141" name="End Zone" type="EndZone" x="3120" y="378" width="120" height="120">
|
<object id="141" name="End Zone" type="EndZone" x="3120" y="378" width="120" height="120">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="Upper?" type="bool" value="true"/>
|
<property name="Upper?" type="bool" value="false"/>
|
||||||
</properties>
|
</properties>
|
||||||
</object>
|
</object>
|
||||||
<object id="142" name="Player Spawn" type="PlayerSpawnLocation" x="936" y="4008" width="24" height="24"/>
|
<object id="142" name="Player Spawn" type="PlayerSpawnLocation" x="936" y="4008" width="24" height="24"/>
|
||||||
|
@ -887,7 +887,7 @@
|
|||||||
<object id="52" name="Player Spawn" type="PlayerSpawnLocation" x="264" y="2256" width="24" height="24"/>
|
<object id="52" name="Player Spawn" type="PlayerSpawnLocation" x="264" y="2256" width="24" height="24"/>
|
||||||
<object id="53" name="End Zone" type="EndZone" x="9462" y="630" width="120" height="120">
|
<object id="53" name="End Zone" type="EndZone" x="9462" y="630" width="120" height="120">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="Upper?" type="bool" value="true"/>
|
<property name="Upper?" type="bool" value="false"/>
|
||||||
</properties>
|
</properties>
|
||||||
</object>
|
</object>
|
||||||
</objectgroup>
|
</objectgroup>
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user