Items should be unuseable in the hub area. Reset ability cooldowns at the start of a stage.

pull/35/head
sigonasr2 1 year ago
parent 18810875a5
commit 51e838de24
  1. 2
      Adventures in Lestoria/Ability.h
  2. 7
      Adventures in Lestoria/AdventuresInLestoria.cpp
  3. 4
      Adventures in Lestoria/Player.cpp
  4. 2
      Adventures in Lestoria/TODO.txt
  5. 2
      Adventures in Lestoria/Version.h

@ -66,6 +66,8 @@ struct Ability{
bool canCancelCast=false;
InputGroup*input;
std::string icon;
//If set to true, this ability is tied to using an item.
bool itemAbility=false;
//If set to true, this ability instead activates immediately when a cast occurs. When the cast finishes, nothing happens instead.
bool actionPerformedDuringCast=false;
bool waitForRelease=false;

@ -1981,6 +1981,12 @@ void AiL::LoadLevel(MapName map){
counter++;
}
#pragma endregion
player->GetAbility1().cooldown=0.f;
player->GetAbility2().cooldown=0.f;
player->GetAbility3().cooldown=0.f;
player->GetAbility4().cooldown=0.f;
player->GetRightClickAbility().cooldown=0.f;
player->upperLevel=false; //Assume player starts on lower level.
player->ForceSetPos(MAP_DATA[map].MapData.playerSpawnLocation); //Normal set pos does one axis and then the other, so this will make sure that we actually end up at the right spot and ignore collision rules.
@ -2745,6 +2751,7 @@ void AiL::SetLoadoutItem(int slot,std::string itemName){
}
Ability itemAbility{itemName,"","","Item.Item Cooldown Time"_F,0,inputGroup,"items/"+itemName+".png",VERY_DARK_RED,DARK_RED,PrecastData{GetLoadoutItem(slot).lock()->CastTime(),0,0},true};
itemAbility.actionPerformedDuringCast=GetLoadoutItem(slot).lock()->UseDuringCast();
itemAbility.itemAbility=true;
switch(slot){
case 0:{

@ -672,7 +672,9 @@ bool Player::CanAct(){
}
bool Player::CanAct(Ability&ability){
return knockUpTimer==0&&!ability.waitForRelease&&(ability.canCancelCast||state!=State::CASTING)&&state!=State::ANIMATION_LOCK&&(GameState::STATE==GameState::states[States::GAME_RUN]||GameState::STATE==GameState::states[States::GAME_HUB]);
return knockUpTimer==0&&!ability.waitForRelease&&(ability.canCancelCast||state!=State::CASTING)&&state!=State::ANIMATION_LOCK&&
(GameState::STATE==GameState::states[States::GAME_RUN]
||GameState::STATE==GameState::states[States::GAME_HUB]&&!ability.itemAbility);
}
bool Player::HasIframes(){

@ -27,6 +27,8 @@ Settings Menu
- No equip sounds for weapons?
- When setting loadout items while loading the game it should highlight the correct item in the consumables inventory as well.
January 31st
============

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 3
#define VERSION_PATCH 0
#define VERSION_BUILD 6515
#define VERSION_BUILD 6517
#define stringify(a) stringify_(a)
#define stringify_(a) #a

Loading…
Cancel
Save