Merge pull request 'AnalogControllerOverworldFix' (#105) from AnalogControllerOverworldFix into master
All checks were successful
Emscripten Build / Build_and_Deploy_Web_Build (push) Successful in 6m44s
All checks were successful
Emscripten Build / Build_and_Deploy_Web_Build (push) Successful in 6m44s
Reviewed-on: #105
This commit is contained in:
commit
0f6aa66834
@ -111,7 +111,6 @@ void State_OverworldMap::OnUserUpdate(AiL*game){
|
||||
if(Unlock::IsUnlocked(cp)){
|
||||
UpdateCurrentConnectionPoint(cp);
|
||||
playerTargetPos=currentConnectionPoint->rect.pos+currentConnectionPoint->rect.size/2+vf2d{0,16};
|
||||
if(abs(game->KEY_SCROLLHORZ_L.Analog())>=0.2f||abs(game->KEY_SCROLLVERT_L.Analog()>=0.2f))analogMove=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -125,17 +124,16 @@ void State_OverworldMap::OnUserUpdate(AiL*game){
|
||||
if(game->KEY_DOWN.Pressed()||game->KEY_SCROLLVERT_L.Analog()>=0.2f)targetDirection=ConnectionPoint::SOUTH;
|
||||
if(game->KEY_LEFT.Pressed()||game->KEY_SCROLLHORZ_L.Analog()<=-0.2f)targetDirection=ConnectionPoint::WEST;
|
||||
|
||||
|
||||
if(neighborInd==-1){
|
||||
directionInd++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
ConnectionPoint&neighbor=ConnectionPointFromIndex(neighborInd);
|
||||
if(Unlock::IsUnlocked(neighbor.unlockCondition)&&targetDirection==directionInd){
|
||||
UpdateCurrentConnectionPoint(neighbor);
|
||||
playerTargetPos=currentConnectionPoint->rect.pos+currentConnectionPoint->rect.size/2+vf2d{0,16};
|
||||
if(abs(game->KEY_SCROLLHORZ_L.Analog())>=0.2f||abs(game->KEY_SCROLLVERT_L.Analog()>=0.2f))analogMove=true;
|
||||
if(abs(game->KEY_SCROLLHORZ_L.Analog())>=0.2f||abs(game->KEY_SCROLLVERT_L.Analog())>=0.2f)analogMove=true;
|
||||
break;
|
||||
}
|
||||
directionInd++;
|
||||
@ -143,9 +141,7 @@ void State_OverworldMap::OnUserUpdate(AiL*game){
|
||||
}
|
||||
#pragma endregion
|
||||
doneNavigating:
|
||||
if(abs(game->KEY_SCROLLVERT_L.Analog())<0.2f&&abs(game->KEY_SCROLLHORZ_L.Analog())<0.2f){
|
||||
analogMove=false;
|
||||
}
|
||||
if(analogMove&&abs(game->KEY_SCROLLVERT_L.Analog())<0.2f&&abs(game->KEY_SCROLLHORZ_L.Analog())<0.2f)analogMove=false;
|
||||
|
||||
game->ClearTimedOutGarbage();
|
||||
};
|
||||
|
||||
@ -15,6 +15,7 @@ Instead of the area buffs i switched to giving highest exp and locking extra lor
|
||||
For Demo Branch:
|
||||
Cherry pick b715dd994d4921e9be1811ceb7eb84120a5e6455 from MiscFixes
|
||||
Cherry pick f398adcde6bb5f8c3c0581f13f18e73d4417a46c from ConnectionPointFixes
|
||||
Cherry pick fb5a72267c5db89b7333287e12f05b614b71c23b from MiscFixes
|
||||
|
||||
DEMO
|
||||
====
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
License (OLC-3)
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
Copyright 2026 Amy Sigona <sigonasr2@gmail.com>
|
||||
Copyright 2024 Joshua Sigona <sigonasr2@gmail.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
@ -39,7 +39,7 @@ All rights reserved.
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 3
|
||||
#define VERSION_PATCH 0
|
||||
#define VERSION_BUILD 12316
|
||||
#define VERSION_BUILD 12329
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
||||
@ -803,6 +803,7 @@
|
||||
<object id="31" name="Stage B-II" type="StagePlate" x="233" y="65" width="42" height="14">
|
||||
<properties>
|
||||
<property name="Connection 2 - East" type="object" value="30"/>
|
||||
<property name="Connection 4 - West" type="object" value="24"/>
|
||||
<property name="Map" propertytype="Level" value="CAMPAIGN_2_B1"/>
|
||||
<property name="Type" propertytype="StageType" value="DUNGEON"/>
|
||||
<property name="Unlock Condition" propertytype="Level" value="CAMPAIGN_2_5"/>
|
||||
@ -1103,8 +1104,5 @@
|
||||
<property name="Unlock Condition" propertytype="Level" value="STORY_2_1"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object id="65" x="261" y="447" width="130" height="46">
|
||||
<text fontfamily="Courier New" pixelsize="9" wrap="1" color="#ff0000" bold="1">NOTE: Nothing should be connected to the initial stage plate!!</text>
|
||||
</object>
|
||||
</objectgroup>
|
||||
</map>
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user